feat: Phase 5 STT — DashScope Gummy 实时语音识别 + 本地 Whisper 回退

- DashScope WebSocket STT 客户端 (gummy-chat-v1)
- 双引擎架构: DashScope 优先, Whisper 本地回退
- 实时流式 STT WebSocket 端点
- DevTools 模型搜索框焦点修复

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 22:15:43 +08:00
parent 0717928496
commit b1e89c606e
9 changed files with 545 additions and 84 deletions
@@ -9,6 +9,10 @@ type Config struct {
WhisperModel string
WhisperLanguage string
MaxAudioSize int64 // 字节
// DashScope STT 配置
DashScopeAPIKey string
DashScopeModel string
}
// Load 从环境变量加载配置
@@ -19,6 +23,8 @@ func Load() *Config {
WhisperModel: getEnv("WHISPER_MODEL", "./whisper.cpp/models/ggml-small.bin"),
WhisperLanguage: getEnv("WHISPER_LANGUAGE", "zh"),
MaxAudioSize: 10 * 1024 * 1024, // 10MB
DashScopeAPIKey: getEnv("DASHSCOPE_API_KEY", ""),
DashScopeModel: getEnv("DASHSCOPE_STT_MODEL", "gummy-chat-v1"),
}
}