diff --git a/runtime/websocket/bin/funasr-wss-client-2pass.cpp b/runtime/websocket/bin/funasr-wss-client-2pass.cpp index 0cbd10e23..6533dd556 100644 --- a/runtime/websocket/bin/funasr-wss-client-2pass.cpp +++ b/runtime/websocket/bin/funasr-wss-client-2pass.cpp @@ -192,10 +192,7 @@ class WebsocketClient { funasr::Audio audio(1); int32_t sampling_rate = audio_fs; std::string wav_format = "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 (funasr::IsTargetFile(wav_path.c_str(), "pcm")) { if (!audio.LoadPcmwav(wav_path.c_str(), &sampling_rate, false)) return; } else { wav_format = "others"; diff --git a/runtime/websocket/bin/funasr-wss-client.cpp b/runtime/websocket/bin/funasr-wss-client.cpp index 1dc9e3e33..7af3fbbda 100644 --- a/runtime/websocket/bin/funasr-wss-client.cpp +++ b/runtime/websocket/bin/funasr-wss-client.cpp @@ -193,10 +193,7 @@ class WebsocketClient { funasr::Audio audio(1); int32_t sampling_rate = audio_fs; std::string wav_format = "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(funasr::IsTargetFile(wav_path.c_str(), "pcm")){ if (!audio.LoadPcmwav(wav_path.c_str(), &sampling_rate, false)) return ; }else{