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
6737253b
Commit
6737253b
authored
Feb 08, 2018
by
Yoann HOUPERT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manage indice data
parent
adf5ed37
Pipeline
#10775
passed with stage
in 36 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
lib/webserver/routes.js
lib/webserver/routes.js
+17
-5
No files found.
lib/webserver/routes.js
View file @
6737253b
...
...
@@ -57,11 +57,23 @@ const routesFactory = config => {
return
res
.
status
(
interalServerCode
).
json
({
module
:
'
Offline transcription
'
,
error
:
'
Error during audio transcription
'
});
}
const
transcription
=
JSON
.
parse
(
json
.
transcript
).
transcript
;
const
jsonResponse
=
{
status
:
0
,
hypotheses
:
JSON
.
parse
(
transcription
),
id
:
uuidv1
()
};
let
jsonResponse
=
{};
// Depend on the offline server
try
{
jsonResponse
=
{
status
:
0
,
hypotheses
:
JSON
.
parse
(
transcription
),
id
:
uuidv1
()
};
}
catch
(
err
)
{
jsonResponse
=
{
status
:
0
,
hypotheses
:
[{
utterance
:
transcription
}],
id
:
uuidv1
()
};
}
return
res
.
status
(
200
).
json
({
message
:
'
Transcript done
'
,
transcript
:
jsonResponse
});
});
...
...
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