Skip to content
广告 · 本站推荐广告

Deepgram 语音转写

Deepgram 提供高精度的语音转文字(Speech-to-Text / ASR)API,支持实时转写和批量处理。OpenClaw 通过 Deepgram 实现语音输入功能。

获取 API Key

  1. 前往 Deepgram Console 注册账号
  2. 新用户可获得 $200 免费额度
  3. 在「API Keys」页面创建 Key
  4. 复制 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-largeOpenAI 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-2whisper-large 均支持中文语音转写
  • 替代方案:如网络不便,可考虑使用阿里云语音识别或百度语音识别的本地方案

基于MIT协议开源 | 内容翻译自 官方文档,同步更新