Commit eee97a35 authored by Yoann HOUPERT's avatar Yoann HOUPERT

add persistance resume

parent 8bdc8b34
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:*"
......@@ -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;
......
......@@ -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
......
......@@ -55,7 +55,7 @@ class Asd extends EventEmitter {
this.init();
}, 2000);
}
try {
const controlTcpClient = new net.Socket();
controlTcpClient.once('error', err => {
......
......@@ -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);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment