From eb92e79fb94e7b3df8f27c8ce3e607a70dff2a2e Mon Sep 17 00:00:00 2001
From: 语帆 <yf352572@alibaba-inc.com>
Date: 星期三, 28 二月 2024 15:21:32 +0800
Subject: [PATCH] test
---
examples/industrial_data_pretraining/fsmn_vad_streaming/demo.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/examples/industrial_data_pretraining/fsmn_vad_streaming/demo.py b/examples/industrial_data_pretraining/fsmn_vad_streaming/demo.py
index 8084dec..f043123 100644
--- a/examples/industrial_data_pretraining/fsmn_vad_streaming/demo.py
+++ b/examples/industrial_data_pretraining/fsmn_vad_streaming/demo.py
@@ -6,10 +6,9 @@
from funasr import AutoModel
wav_file = "https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/vad_example.wav"
-chunk_size = 60000 # ms
-model = AutoModel(model="damo/speech_fsmn_vad_zh-cn-16k-common-pytorch", model_revision="v2.0.2")
+model = AutoModel(model="damo/speech_fsmn_vad_zh-cn-16k-common-pytorch", model_revision="v2.0.4")
-res = model.generate(input=wav_file, chunk_size=chunk_size, )
+res = model.generate(input=wav_file)
print(res)
@@ -20,6 +19,7 @@
wav_file = os.path.join(model.model_path, "example/vad_example.wav")
speech, sample_rate = soundfile.read(wav_file)
+chunk_size = 200 # ms
chunk_stride = int(chunk_size * sample_rate / 1000)
cache = {}
@@ -32,6 +32,8 @@
cache=cache,
is_final=is_final,
chunk_size=chunk_size,
+ disable_pbar=True,
)
+ # print(res)
if len(res[0]["value"]):
print(res)
--
Gitblit v1.9.1