Commit daff7bb6 authored by Yoann HOUPERT's avatar Yoann HOUPERT

patch xo

parent f86cb660
Pipeline #9402 passed with stage
in 23 seconds
......@@ -28,7 +28,7 @@ module.exports = config => {
const uiid = uuidv1();
let myUuidString = uiid.toString();
let re = /-/g;
const re = /-/g;
myUuidString = re[Symbol.replace](myUuidString, '');
const options = {
......
......@@ -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);
......
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