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
LINAGORA
L
LGS
Labs
linstt-controller
Commits
daff7bb6
Commit
daff7bb6
authored
Jan 05, 2018
by
Yoann HOUPERT
Browse files
patch xo
parent
f86cb660
Pipeline
#9402
passed with stage
in 23 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
lib/controller/offline.js
lib/controller/offline.js
+1
-1
lib/webserver/routes.js
lib/webserver/routes.js
+9
-10
No files found.
lib/controller/offline.js
View file @
daff7bb6
...
...
@@ -28,7 +28,7 @@ module.exports = config => {
const
uiid
=
uuidv1
();
let
myUuidString
=
uiid
.
toString
();
le
t
re
=
/-/g
;
cons
t
re
=
/-/g
;
myUuidString
=
re
[
Symbol
.
replace
](
myUuidString
,
''
);
const
options
=
{
...
...
lib/webserver/routes.js
View file @
daff7bb6
...
...
@@ -35,16 +35,15 @@ const routesFactory = config => {
return
res
.
status
(
500
).
send
(
'
Error while enhancing audio.
'
+
err
);
}
if
(
config
.
isOffline
){
offline
.
transcript
(
body
,
(
err
,
httpResponse
,
body
)
=>
{
const
json
=
JSON
.
parse
(
body
);
if
(
json
.
status
===
5
)
{
return
res
.
status
(
500
).
send
(
'
Error while transcript the audio.
'
);
}
return
res
.
status
(
200
).
json
({
message
:
'
transcript done
'
,
hypotheses
:
json
});
});
}
else
{
if
(
config
.
isOffline
)
{
offline
.
transcript
(
body
,
(
err
,
httpResponse
,
body
)
=>
{
const
json
=
JSON
.
parse
(
body
);
if
(
json
.
status
===
5
)
{
return
res
.
status
(
500
).
send
(
'
Error while transcript the audio.
'
);
}
return
res
.
status
(
200
).
json
({
message
:
'
transcript done
'
,
hypotheses
:
json
});
});
}
else
{
stt
.
transcript
(
body
,
(
err
,
httpResponse
,
body
)
=>
{
if
(
err
)
{
return
res
.
status
(
500
).
send
(
'
Error while transcript the audio.
'
+
err
);
...
...
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