Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linstt-controller
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LINAGORA
L
LGS
Labs
linstt-controller
Commits
f3838b7b
Commit
f3838b7b
authored
Jan 12, 2018
by
Yoann HOUPERT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syncronisation respons offline online
parent
4142f7a5
Pipeline
#9690
failed with stage
in 2 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
lib/webserver/routes.js
lib/webserver/routes.js
+11
-1
No files found.
lib/webserver/routes.js
View file @
f3838b7b
...
...
@@ -21,6 +21,7 @@
const
routesFactory
=
config
=>
{
/* eslint new-cap: ["error", { "capIsNew": false }] */
const
routes
=
require
(
'
express
'
).
Router
();
const
uuidv1
=
require
(
'
uuid/v1
'
);
const
enhancer
=
require
(
'
../controller/speech-enhancement
'
)(
config
.
speechEnhancement
);
const
stt
=
require
(
'
../controller/speech-to-text
'
)(
config
.
gstreamer
);
const
offline
=
require
(
'
../controller/offline
'
)(
config
.
offline
);
...
...
@@ -41,7 +42,16 @@ const routesFactory = config => {
if
(
json
.
status
===
5
)
{
return
res
.
status
(
500
).
send
(
'
Error while transcript the audio.
'
);
}
return
res
.
status
(
200
).
json
({
message
:
'
transcript done
'
,
hypotheses
:
json
});
let
jsonResponse
=
{
status
:
0
,
hypotheses
:
[{
utterance
:
json
.
transcript
}],
id
:
uuidv1
()
};
return
res
.
status
(
200
).
json
({
message
:
'
transcript done
'
,
transcript
:
jsonResponse
});
});
}
else
{
stt
.
transcript
(
body
,
(
err
,
httpResponse
,
body
)
=>
{
...
...
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