介绍
# Local STT (Parakeet / Whisper)
使用 ONNX Runtime 并采用 int8 量化的统一本地语音转文本方案。选择你的后端:
- **Parakeet**(默认):英语准确率最佳,能正确捕捉名称和填充词 - **Whisper**:推理最快,支持 99 种语言
## 用法
```bash # Default: Parakeet v2 (best English accuracy) ~/.openclaw/skills/local-stt/scripts/local-stt.py audio.ogg
# Explicit backend selection ~/.openclaw/skills/local-stt/scripts/local-stt.py audio.ogg -b whisper ~/.openclaw/skills/local-stt/scripts/local-stt.py audio.ogg -b parakeet -m v3
# Quiet mode (suppress progress) ~/.openclaw/skills/local-stt/scripts/local-stt.py audio.ogg --quiet ```
## 选项
- `-b/--backend`:`parakeet`(默认)、`whisper` - `-m/--model`:模型变体(见下文) - `--no-int8`:禁用 int8 量化 - `-q/--quiet`:隐藏进度 - `--room-id`:用于直接消息的 Matrix 房间 ID
## 模型
### Parakeet(默认后端) | 模型 | 描述 | |-------|-------------| | **v2**(默认) | 仅限英语,最佳准确度 | | v3 | 多语言 |
### Whisper | 模型 | 描述 | |-------|-------------| | tiny | 最快,准确度较低 | | **base**(默认) | 良好的平衡 | | small | 更高的准确度 | | large-v3-turbo | 最佳质量,较慢 |
## 基准测试(24秒音频)
| 后端/模型 | 时间 | RTF | 备注 | |---------------|------|-----|-------| | Whisper Base int8 | 0.43s | 0.018x | 最快 | | **Parakeet v2 int8** | 0.60s | 0.025x | 最佳准确度 | | Parakeet v3 int8 | 0.63s | 0.026x | 多语言 |
## openclaw.json
```json { "tools": { "media": { "audio": { "enabled": true, "models": [ { "type": "cli", "command": "~/.openclaw/skills/local-stt/scripts/local-stt.py", "args": ["--quiet", "{{MediaPath}}"], "timeoutSeconds": 30 } ] } } } } ```