From 37d6930561f4e798e76f81c37d912906c97b6bea Mon Sep 17 00:00:00 2001
From: pointerhacker <145901472+pointerhacker@users.noreply.github.com>
Date: 星期三, 20 十一月 2024 18:39:05 +0800
Subject: [PATCH] fix:添加音频码率验证以防止模型异常 (#2219)
---
examples/industrial_data_pretraining/qwen_audio/demo_chat_from_local.py | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/examples/industrial_data_pretraining/qwen_audio/demo_chat_from_local.py b/examples/industrial_data_pretraining/qwen_audio/demo_chat_from_local.py
index 2333217..99d4caf 100644
--- a/examples/industrial_data_pretraining/qwen_audio/demo_chat_from_local.py
+++ b/examples/industrial_data_pretraining/qwen_audio/demo_chat_from_local.py
@@ -7,14 +7,17 @@
from funasr import AutoModel
-model = AutoModel(model="Qwen-Audio-Chat",
- model_path="/nfs/zhifu.gzf/init_model/qwen/Qwen-Audio-Chat",
- )
+model = AutoModel(
+ model="Qwen-Audio-Chat",
+ model_path="/nfs/zhifu.gzf/init_model/qwen/Qwen-Audio-Chat",
+)
-audio_in = "https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav"
+audio_in = (
+ "https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav"
+)
# 1st dialogue turn
-prompt = 'what does the person say?'
+prompt = "what does the person say?"
cache = {"history": None}
res = model.generate(input=audio_in, prompt=prompt, cache=cache)
print(res)
@@ -24,4 +27,3 @@
prompt = 'Find the start time and end time of the word "middle classes"'
res = model.generate(input=None, prompt=prompt, cache=cache)
print(res)
-
--
Gitblit v1.9.1