fix bug: paraformer_server FunASRRecogPCMBuffer

This commit is contained in:
lyblsgo 2023-04-14 17:53:05 +08:00
parent 58c119c508
commit 01c13a9aec

View File

@ -128,7 +128,7 @@ grpc::Status ASRServicer::Recognize(
stream->Write(res);
}
else {
FUNASR_RESULT Result= FunASRRecogPCMBuffer(AsrHanlde, tmp_data.c_str(), data_len_int, RASR_NONE, NULL);
FUNASR_RESULT Result= FunASRRecogPCMBuffer(AsrHanlde, tmp_data.c_str(), data_len_int, 16000, RASR_NONE, NULL);
std::string asr_result = ((FUNASR_RECOG_RESULT*)Result)->msg;
auto end_time = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();