Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hublot
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yoann HOUPERT
hublot
Commits
eee97a35
Commit
eee97a35
authored
May 25, 2018
by
Yoann HOUPERT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add persistance resume
parent
8bdc8b34
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
113 deletions
+44
-113
.env
.env
+5
-7
client/robot/robot.js
client/robot/robot.js
+2
-3
docker-compose.yml
docker-compose.yml
+4
-0
lib/asd.js
lib/asd.js
+1
-1
lib/proxy.js
lib/proxy.js
+4
-7
lib/resume.js
lib/resume.js
+28
-95
No files found.
.env
View file @
eee97a35
MODELS_PATH=../models/current_model/hublot_model/
MODEL_PATH_OFFLINE=../models/current_model/
MODELS_PATH=/home/yhoupert/1To/Models/MODEL_BIG/current_model/hublot_model/
MODEL_PATH_OFFLINE=/home/yhoupert/1To/Models/MODEL_BIG/current_model/
RESUME_PATH=/home/yhoupert/1To/Hublot/Developpement/hublot/resume
OFFLINE_PORT=8888
YAML=/opt/models/gmm_hmm3.yaml
NB_WORKERS=2
ASD_SERVER_IP="localhost"
ASD_CONTROL_PORT=8881
ASD_STREAM_PORT=8882
DEBUG="lib:*"
\ No newline at end of file
NB_WORKERS=1
DEBUG="lib:*"
client/robot/robot.js
View file @
eee97a35
...
...
@@ -103,8 +103,7 @@ robot = {
},
recordParticipant
(
easyrtcid
)
{
robot
.
socket
.
emit
(
'
new_user
'
,
{
userId
:
easyrtcid
,
roomId
:
robot
.
room
});
robot
.
socket
.
emit
(
'
new_user
'
,
{
userId
:
easyrtcid
,
roomId
:
robot
.
room
});
robot
.
getUserStream
(
easyrtcid
);
robot
.
recordedParticipantsWS
.
push
(
easyrtcid
);
},
...
...
@@ -158,7 +157,7 @@ robot = {
console
.
log
(
e
);
});
robot
.
socket
.
on
(
'
resume_data_
'
+
room
,
hyp
=>
{
robot
.
socket
.
on
(
'
resume_data_
'
+
room
,
hyp
=>
{
if
(
hyp
.
status
===
0
)
{
if
(
hyp
.
result
!==
undefined
&&
hyp
.
result
.
final
)
{
const
transcription
=
((
hyp
.
result
.
hypotheses
)[
0
]).
transcript
;
...
...
docker-compose.yml
View file @
eee97a35
...
...
@@ -11,8 +11,12 @@ services:
-
offline-server
volumes
:
-
./media:/opt/media
-
${RESUME_PATH}:/usr/src/app/hublot/resume
ports
:
-
"
3000:3000"
env_file
:
.env
environment
:
-
RESUME_PATH
recommender
:
image
:
linagora/recommender
...
...
lib/asd.js
View file @
eee97a35
...
...
@@ -55,7 +55,7 @@ class Asd extends EventEmitter {
this
.
init
();
},
2000
);
}
try
{
const
controlTcpClient
=
new
net
.
Socket
();
controlTcpClient
.
once
(
'
error
'
,
err
=>
{
...
...
lib/proxy.js
View file @
eee97a35
...
...
@@ -95,7 +95,6 @@ module.exports = config => {
connectionToClient
.
send
(
xmlHttp
.
responseText
);
}
catch
(
err
)
{
console
.
error
(
'
proxy: recoRecoWS error
'
,
err
);
console
.
error
(
'
It is probably already close
'
);
}
}
else
{
console
.
error
(
'
Online reco: error trying to reach http://%s:%s/resources
'
,
...
...
@@ -121,13 +120,12 @@ module.exports = config => {
connectionToKaldi
.
on
(
'
open
'
,
()
=>
{
connectionToKaldi
.
on
(
'
message
'
,
message
=>
{
try
{
const
msgJson
=
JSON
.
parse
(
message
);
msgJson
.
userId
=
userId
;
msgJson
.
roomId
=
roomId
;
console
.
log
(
'
room transcription
'
+
roomId
+
'
====
'
,
msgJson
)
socket
.
emit
(
'
resume_data_
'
+
roomId
,
msgJson
);
console
.
log
(
'
room transcription
'
+
roomId
+
'
====
'
,
msgJson
);
socket
.
emit
(
'
resume_data_
'
+
roomId
,
msgJson
);
}
catch
(
err
)
{
// Sometimes, the client will close the connection unexpectedly
// (e.g. when stopping). This is expected
...
...
@@ -167,9 +165,9 @@ module.exports = config => {
socket
.
on
(
'
new_user
'
,
async
data
=>
{
const
userId
=
data
.
userId
;
const
roomId
=
data
.
roomId
;
resume
.
createFolder
(
'
_
'
+
roomId
);
resume
.
createFolder
(
'
_
'
+
roomId
);
const
streamData
=
resume
.
generateStream
(
roomId
)
const
streamData
=
resume
.
generateStream
(
roomId
)
;
let
transcriptor
;
if
(
config
.
asd
.
isUse
)
{
...
...
@@ -215,7 +213,6 @@ module.exports = config => {
return
{
create
:
resume
=>
{
//resume.createFolder();
const
stompClient
=
createStompClient
();
audioSocket
(
resume
);
...
...
lib/resume.js
View file @
eee97a35
This diff is collapsed.
Click to expand it.
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