| | |
| | | |
| | | funasr::FUNASR_RECOG_RESULT* p_result = new funasr::FUNASR_RECOG_RESULT; |
| | | p_result->snippet_time = audio->GetTimeLen(); |
| | | if(p_result->snippet_time == 0){ |
| | | return p_result; |
| | | } |
| | | // if(p_result->snippet_time == 0){ |
| | | // return p_result; |
| | | // } |
| | | |
| | | audio->Split(vad_online_handle, chunk_len, input_finished, mode); |
| | | |
| | |
| | | while(audio->FetchTpass(frame) > 0){ |
| | | string msg = asr_handle->Forward(frame->data, frame->len, frame->is_final); |
| | | string msg_punc = punc_online_handle->AddPunc(msg.c_str(), punc_cache[1]); |
| | | if(input_finished){ |
| | | msg_punc += "。"; |
| | | } |
| | | p_result->tpass_msg = msg_punc; |
| | | if(frame != NULL){ |
| | | delete frame; |