| | |
| | | int len; |
| | | int flag = 0; |
| | | |
| | | int n_step = 0; |
| | | int n_total = audio.GetQueueSize(); |
| | | float start_time = 0.0; |
| | | std::string cur_stamp = "["; |
| | | std::string lang = (offline_stream->asr_handle)->GetLang(); |
| | |
| | | cur_stamp += "["+std::to_string((int)(1000*begin))+","+std::to_string((int)(1000*end))+"],"; |
| | | } |
| | | } |
| | | n_step++; |
| | | if (fn_callback) |
| | | fn_callback(n_step, n_total); |
| | | } |
| | | if(cur_stamp != "["){ |
| | | cur_stamp.erase(cur_stamp.length() - 1); |
| | |
| | | return mm; |
| | | } |
| | | #ifdef USE_GPU |
| | | auto paraformer_torch = dynamic_cast<funasr::ParaformerTorch*>(offline_stream->asr_handle.get()); |
| | | auto paraformer_torch = dynamic_cast<funasr::ParaformerTorch*>(tpass_stream->asr_handle.get()); |
| | | if(paraformer_torch !=nullptr){ |
| | | if (paraformer_torch->lm_){ |
| | | mm = new funasr::WfstDecoder(paraformer_torch->lm_.get(), |