Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Yoann HOUPERT
hublot
Commits
3e171539
Commit
3e171539
authored
Jun 08, 2017
by
Tom Jorquera
Browse files
client: placeholder version of live recommendation
parent
0b37d60f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
client/robot/robot.js
client/robot/robot.js
+7
-0
client/robot/robot.test.js
client/robot/robot.test.js
+4
-0
No files found.
client/robot/robot.js
View file @
3e171539
...
...
@@ -5,6 +5,7 @@
/* global robot:true robotController robotLib MediaRecorder */
/* exported robot */
const
room
=
arguments
[
0
];
const
config
=
arguments
[
1
];
robotController
.
external
.
load
(
config
);
...
...
@@ -21,6 +22,7 @@ robot = {
},
start
:
()
=>
{
robotLib
.
stt
=
robotLib
.
stt
(
config
);
robotLib
.
reco
=
robotLib
.
reco
(
config
);
robotLib
.
archive
=
robotLib
.
archive
(
config
);
robotController
.
onAttendeePush
=
(
e
,
data
)
=>
{
...
...
@@ -28,5 +30,10 @@ robot = {
const
ws
=
robotLib
.
stt
.
getTranscriptSocket
(
e
=>
console
.
log
(
'
>
'
+
e
.
text
));
robot
.
processAudio
(
stream
,
e
=>
ws
.
send
(
e
.
data
),
100
);
};
robotLib
.
reco
.
start
(
room
);
setInterval
(
robotLib
.
reco
.
getOnlineReco
(
room
).
then
(
console
.
log
),
8000
);
}
};
client/robot/robot.test.js
View file @
3e171539
...
...
@@ -33,6 +33,10 @@ describe('client/robot', () => {
}
})
}),
reco
:
()
=>
({
start
:
()
=>
{},
getOnlineReco
:
()
=>
new
Promise
(()
=>
{},
()
=>
{})
}),
archive
:
()
=>
({})
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment