| | |
| | | while (audio.Fetch(buff, len, flag, start_time) > 0) { |
| | | string msg = (offline_stream->asr_handle)->Forward(buff, len, true, hw_emb); |
| | | std::vector<std::string> msg_vec = funasr::split(msg, '|'); |
| | | if(msg_vec.size()==0){ |
| | | continue; |
| | | } |
| | | p_result->msg += msg_vec[0]; |
| | | //timestamp |
| | | if(msg_vec.size() > 1){ |
| | |
| | | // if (!audio->FfmpegLoad(sz_buf, n_len)) |
| | | // return nullptr; |
| | | LOG(ERROR) <<"Wrong wav_format: " << wav_format ; |
| | | exit(-1); |
| | | return nullptr; |
| | | } |
| | | |
| | | funasr::FUNASR_RECOG_RESULT* p_result = new funasr::FUNASR_RECOG_RESULT; |