AstrBot icon indicating copy to clipboard operation
AstrBot copied to clipboard

【语音 Live】MiMo STT 返回 Invalid API Key,真实语音识别仍需有效凭证

Open YonganZhang opened this issue 5 months ago • 1 comments

背景

Live 语音链路已经完成本轮代码修复与现网重启:

  • 普通用户进入 WebChat / Live 所需的专家、组织树、模型列表接口已放行。
  • /api/config/provider/list 对普通用户只允许读取 chat_completion,并会移除 api_key / token / secret / password 等敏感字段。
  • 前端普通用户登录后不再调用管理员配置接口做 onboarding 检查。
  • Live WebSocket 测试可握手,首帧返回:stt=mimo_stt_api、tts=edge_tts。
  • 当前现网 TTS 已切到 edge_tts,可以真实生成 wav。

相关提交:0bfb9e0e fix: stabilize live voice dashboard access

当前阻塞

MiMo STT 的真实 API 调用仍失败,服务端返回:

HTTP 401
message: Invalid API Key
code: 401
type: invalid_key

已确认:

  • 本机 data/cmd_config.json 里 mimo_stt.api_key 字段有值,但远端判定无效。
  • STT model 已从错误的 mimo-v2.5-tts 修正为 mimo-v2-omni。
  • MiniMax TTS 原配置缺少 minimax-group-id,因此当前改用无需 key 的 edge_tts 作为可测 fallback。

已通过测试

.venv/bin/python -m pytest -q \
  tests/contract/test_dashboard_auth_scope.py \
  tests/contract/test_anchor_09_live_mode.py \
  tests/contract/test_voice_provider_selection.py \
  tests/voice/test_voice_real_call.py::test_edge_tts_real_call \
  tests/voice/test_voice_real_call.py::test_live_chat_ws_handshake \
  tests/voice/test_voice_real_call.py::test_live_chat_ws_real_pcm_stream \
  --run-voice-real -p no:cacheprovider

结果:50 passed。

其中 PCM 流测试收到 ready -> metrics -> metrics -> error,说明 Live WS 与前端链路已通,最后 error 来自 STT provider 的 401。

需要处理

  1. 更换/补充一枚有效的 MiMo STT API key,或改接另一个可用 STT provider。
  2. 如果继续使用 MiniMax TTS,需要补 minimax-group-id;否则保持 edge_tts。
  3. 配好后重跑:
.venv/bin/python -m pytest -q tests/voice/test_voice_real_call.py::test_mimo_stt_real_call --run-voice-real -s -p no:cacheprovider

通过后再跑完整 Live PCM 流测试。

注意

不要把 API key / group id 写入 issue、PR、日志或提交。运行配置 data/cmd_config.json 是 gitignored,本 issue 只记录脱敏证据。

YonganZhang avatar Jun 19 '26 18:06 YonganZhang

发错仓库:这是 Gaia-2.0 私有/派生项目的本地 Live 语音配置问题,不属于 AstrBot upstream。已在正确仓库重建。

YonganZhang avatar Jun 19 '26 18:06 YonganZhang