Commit daff7bb6 authored by Yoann HOUPERT's avatar Yoann HOUPERT
Browse files

patch xo

parent f86cb660
Pipeline #9402 passed with stage
in 23 seconds
...@@ -28,7 +28,7 @@ module.exports = config => { ...@@ -28,7 +28,7 @@ module.exports = config => {
const uiid = uuidv1(); const uiid = uuidv1();
let myUuidString = uiid.toString(); let myUuidString = uiid.toString();
let re = /-/g; const re = /-/g;
myUuidString = re[Symbol.replace](myUuidString, ''); myUuidString = re[Symbol.replace](myUuidString, '');
const options = { const options = {
......
...@@ -35,7 +35,7 @@ const routesFactory = config => { ...@@ -35,7 +35,7 @@ const routesFactory = config => {
return res.status(500).send('Error while enhancing audio.' + err); return res.status(500).send('Error while enhancing audio.' + err);
} }
if(config.isOffline){ if (config.isOffline) {
offline.transcript(body, (err, httpResponse, body) => { offline.transcript(body, (err, httpResponse, body) => {
const json = JSON.parse(body); const json = JSON.parse(body);
if (json.status === 5) { if (json.status === 5) {
...@@ -43,8 +43,7 @@ const routesFactory = config => { ...@@ -43,8 +43,7 @@ const routesFactory = config => {
} }
return res.status(200).json({message: 'transcript done', hypotheses: json}); return res.status(200).json({message: 'transcript done', hypotheses: json});
}); });
} else {
} else{
stt.transcript(body, (err, httpResponse, body) => { stt.transcript(body, (err, httpResponse, body) => {
if (err) { if (err) {
return res.status(500).send('Error while transcript the audio.' + err); return res.status(500).send('Error while transcript the audio.' + err);
......
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