mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
update funasr-wss-client
This commit is contained in:
parent
b8825902d9
commit
6f48509e8d
@ -189,7 +189,10 @@ class WebsocketClient {
|
||||
funasr::Audio audio(1);
|
||||
int32_t sampling_rate = audio_fs;
|
||||
std::string wav_format = "pcm";
|
||||
if(funasr::IsTargetFile(wav_path.c_str(), "pcm")){
|
||||
if (funasr::IsTargetFile(wav_path.c_str(), "wav")) {
|
||||
if (!audio.LoadWav(wav_path.c_str(), &sampling_rate, false))
|
||||
return;
|
||||
} else if(funasr::IsTargetFile(wav_path.c_str(), "pcm")){
|
||||
if (!audio.LoadPcmwav(wav_path.c_str(), &sampling_rate, false))
|
||||
return ;
|
||||
}else{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user