fix(asr): 把 Qwen3-ASR-Flash 从 V1 拿掉,需独立客户端留给 V2

reviewer 指出 DashScope 的 Qwen3-ASR-Flash 不走 OpenAI Whisper 的
multipart `/audio/transcriptions`,而是 MultiModalConversation 协议
(messages=[{content:[{audio:...}]}])。核实两个独立公开实现
(xinnan-tech/xiaozhi-esp32-server、jianchang512/pyvideotrans)确认
属实——把 qwen 强行塞进 WhisperBatchASR 必然 transcription 失败。

按 PR 描述里"待复核风险 → 不通则降级到 V2"的预案:
- 从 ASR_PRESETS 删除 qwen 项
- 从 is_whisper_compatible_provider 拿掉 "qwen"
- i18n 删掉 asrQwen 文案
- 注释里点名 Qwen 留给 V2 的原因

剩下 SiliconFlow / GLM-ASR / Groq / OpenAI Whisper 四家都有公开
OpenAI 兼容 /audio/transcriptions 端点,继续走原通道。
This commit is contained in:
baiqing committed 2026-05-04 06:53:40 +08:00
1 parent 9809b19eab
commit d048107abb
4 files changed
+6 -5

No files matched your search

@@ -1559,11 +1559,15 @@ fn ensure_asr_credentials() -> Result<(), String> {
}
}
/// `whisper` 是 OpenAI 原生;`qwen` / `siliconflow` / `zhipu` / `groq` 都暴露
/// `whisper` 是 OpenAI 原生;`siliconflow` / `zhipu` / `groq` 都暴露
/// OpenAI 兼容的 `/audio/transcriptions`,统一走 `WhisperBatchASR`。
/// 新增 OpenAI 兼容 ASR 时只需在这里加一项。
///
/// 注:DashScope 的 Qwen3-ASR-Flash 不在此列——它用 MultiModalConversation
/// (messages=[{content:[{audio:...}]}]) 协议,不是 Whisper multipart,需要
/// 单独 ASR 客户端,留给 V2。
fn is_whisper_compatible_provider(id: &str) -> bool {
matches!(id, "whisper" | "qwen" | "siliconflow" | "zhipu" | "groq")
matches!(id, "whisper" | "siliconflow" | "zhipu" | "groq")
}
/// QA 路径专用:begin_qa_session 永远走 Volcengine 流式(低延迟要求),所以
-1
View File
@@ -282,7 +282,6 @@ export const en: typeof zhCN = {
openai: 'OpenAI',
custom: 'Custom',
asrVolcengine: 'Volcengine bigasr',
asrQwen: 'Qwen3-ASR (DashScope compatible mode)',
asrSiliconflow: 'SiliconFlow SenseVoice',
asrZhipu: 'Zhipu GLM-ASR',
asrGroq: 'Groq Whisper-large-v3',
-1
View File
@@ -280,7 +280,6 @@ export const zhCN = {
openai: 'OpenAI',
custom: '自定义',
asrVolcengine: '火山引擎 bigasr',
asrQwen: '通义千问 Qwen3-ASR(DashScope 兼容)',
asrSiliconflow: '硅基流动 SenseVoice',
asrZhipu: '智谱 GLM-ASR',
asrGroq: 'Groq Whisper-large-v3',
-1
View File
@@ -281,7 +281,6 @@ const ASR_DEFAULT_RESOURCE_ID = 'volc.seedasr.sauc.duration';
// 3. 在 i18n 的 `settings.providers.presets.<nameKey>` 加文案。
const ASR_PRESETS = [
{ id: 'volcengine', nameKey: 'asrVolcengine', baseUrl: '', model: '' },
{ id: 'qwen', nameKey: 'asrQwen', baseUrl: 'https://dashscope.aliyuncs.com/compatible-mode/v1', model: 'qwen3-asr-flash' },
{ id: 'siliconflow', nameKey: 'asrSiliconflow', baseUrl: 'https://api.siliconflow.cn/v1', model: 'FunAudioLLM/SenseVoiceSmall' },
{ id: 'zhipu', nameKey: 'asrZhipu', baseUrl: 'https://open.bigmodel.cn/api/paas/v4', model: 'glm-asr-2512' },
{ id: 'groq', nameKey: 'asrGroq', baseUrl: 'https://api.groq.com/openai/v1', model: 'whisper-large-v3-turbo' },