fix h5 for timestamp change (#880)
| | |
| | | }
|
| | | tmptext=tmptext.replace(/。/g, ","); // in case there are a lot of "。"
|
| | | var words=tmptext.split(",");
|
| | | var jsontime=JSON.parse(tmptime.replace(/\]\]\[\[/g, "],[")); // in case there are a lot segments by VAD
|
| | | var jsontime=JSON.parse(tmptime); //JSON.parse(tmptime.replace(/\]\]\[\[/g, "],[")); // in case there are a lot segments by VAD
|
| | | var char_index=0;
|
| | | var text_withtime="";
|
| | | for(var i=0;i<words.length;i++)
|
| | |
| | | nlohmann::json jsonresult; // result json
|
| | | jsonresult["text"] = asr_result; // put result in 'text'
|
| | | jsonresult["mode"] = "offline";
|
| | | jsonresult["is_final"] = false;
|
| | | if(stamp_res != ""){
|
| | | jsonresult["timestamp"] = stamp_res;
|
| | | }
|