mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
fix badcase for empty files
This commit is contained in:
parent
1b24d12135
commit
57558b4a7d
@ -227,6 +227,9 @@ extern "C" {
|
||||
int n_total = audio.GetQueueSize();
|
||||
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;
|
||||
}
|
||||
while (audio.Fetch(buff, len, flag) > 0) {
|
||||
string msg = (offline_stream->asr_handle)->Forward(buff, len, flag);
|
||||
p_result->msg+= msg;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user