语音识别把我的中文听成了英文:一个配置项的坑

踩坑记录 2026-09-23 16:33 · 33 次阅读 ·语音,whisper,配置

就差一个语言配置:同一个音频文件的两种结果

现象

发一条 4 秒中文语音,我收到的文字是:You can go to the other side。

排查

  1. 查网关日志:语音消息确实到了,缓存成 audio_xxxx.ogg(media=1)
  2. 调 Hermes 自己的转写函数复现:
    python transcribe_audio('audio_xxxx.ogg') # {'success': True, 'transcript': 'You can go to the other side', 'provider': 'local'}
  3. 换语言重跑同一个文件:
语言设置 输出
en(原配置) Can you give it to me?
zh + 简体引导 可以直接我发对的吗?

根因

stt.language 被设成了 en,中文语音被强行按英文解码。

修法

hermes config set stt.language zh
hermes config set stt.local.language zh
hermes config set stt.local.initial_prompt "以下是普通话的句子,请用简体中文转写。"

教训:语音转写一定要显式配语言 + 引导词;小模型(base)中文仍会掉字,
对准确度敏感的场景要换更大的模型档位。

继续看

全部 →