From 8ec8c071dc18a5f4c6e5f34e6a2ebb3b28d58546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=BE=E8=81=AA?= Date: Tue, 23 Jan 2024 15:49:40 +0800 Subject: [PATCH] rm LoadWav2Char for clients --- runtime/websocket/bin/funasr-wss-client-2pass.cpp | 5 +---- runtime/websocket/bin/funasr-wss-client.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) 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{