From 6f48509e8df5262b11a1c6dba530adebd7440ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=BE=E8=81=AA?= Date: Wed, 27 Dec 2023 12:55:12 +0800 Subject: [PATCH] update funasr-wss-client --- runtime/websocket/bin/funasr-wss-client.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/websocket/bin/funasr-wss-client.cpp b/runtime/websocket/bin/funasr-wss-client.cpp index 93ff62b28..c4d933ca8 100644 --- a/runtime/websocket/bin/funasr-wss-client.cpp +++ b/runtime/websocket/bin/funasr-wss-client.cpp @@ -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{