Deepgram 语音转写
Deepgram 提供高精度的语音转文字(Speech-to-Text / ASR)API,支持实时转写和批量处理。OpenClaw 通过 Deepgram 实现语音输入功能。
获取 API Key
- 前往 Deepgram Console 注册账号
- 新用户可获得 $200 免费额度
- 在「API Keys」页面创建 Key
- 复制 API Key
配置 OpenClaw
bash
openclaw models auth login --provider deepgram
# 按提示输入 API Key或手动编辑配置文件:
jsonc
// ~/.openclaw/config.json
{
"models": {
"providers": {
"deepgram": {
"apiKey": "xxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}支持的模型
| 模型 ID | 说明 | 语言支持 |
|---|---|---|
nova-2 | 最新版,精度最高 | 多语言 |
nova-2-general | 通用场景 | 多语言 |
nova-2-meeting | 会议转写优化 | 英语 |
nova-2-phonecall | 电话语音优化 | 英语 |
whisper-large | OpenAI Whisper 托管版 | 多语言 |
使用语音输入
bash
# 开启语音输入模式
openclaw chat --voice
# 指定转写模型
openclaw chat --voice --transcription-model deepgram/nova-2环境变量
bash
export DEEPGRAM_API_KEY="xxxxxxxxxxxxxxxxxxxxxxxx"故障排查
转写质量差
- 确保麦克风音质良好
- 尝试使用
nova-2模型 - 减少背景噪音
API 调用失败
- 检查 API Key 是否有效
- 确认账户有足够额度
🇨🇳 中国用户须知
- 网络代理:Deepgram 需要从中国大陆配置代理访问
- 中文转写:
nova-2和whisper-large均支持中文语音转写 - 替代方案:如网络不便,可考虑使用阿里云语音识别或百度语音识别的本地方案
