使用 mlx-audio Whisper 模型将音频转录为文本,完全在 Apple Silicon 上运行,无需 API 密钥。
当用户请求以下操作时使用此技能:
注意: 本插件依赖
mlx-audioPython 库。使用前请确保已安装:bash
uv tool install mlx-audio --prerelease=allow
json
{
"action": "transcribe",
"audioPath": "/path/to/audio.mp3",
"language": "可选:语言代码 (zh/en 等)",
"task": "可选:transcribe 或 translate"
}
参数说明:
action: 必须是 "transcribe"audioPath: 音频文件路径(必需)language: 可选,语言代码(省略则自动检测)task: 可选,"transcribe"(转录)或 "translate"(翻译成英文)返回值:
json
{
"success": true,
"text": "转录的文本内容",
"language": "检测到的语言",
"duration": 5.2,
"segments": [
{
"start": 0.0,
"end": 2.5,
"text": "第一句话"
}
]
}
json
{
"action": "status"
}
返回 STT 服务器状态、加载的模型等信息。
json
{
"action": "reload"
}
无需重启 OpenClaw 即可重载 STT 配置。
模型语言描述内存需求whisper-large-v3-turbo (推荐默认)99+快速准确,日常使用2GBwhisper-large-v399+最高准确度6GBdistil-large-v3EN蒸馏版,更快~1.5GB
模型语言描述内存需求Qwen3-ASR-0.6BZH, EN, JA, KO 等轻量多语言 ASR1GBQwen3-ASR-1.7BZH, EN, JA, KO 等高精度多语言 ASR4GBQwen3-ForcedAligner-0.6BZH, EN, JA, KO 等词级时间戳对齐~1GB
模型语言描述内存需求Parakeet-TDT-0.6B-v325 EU 语言NVIDIA 高精度1.5GBVibeVoice-ASR-9B多语言说话人分离,长音频 (60min)2GBMoonshineENUseful Sensors 轻量 ASR18GBVoxtral-Mini-3B多语言Mistral 语音模型6GBCanary25 EU + RUNVIDIA 多语言 + 翻译500MBMMS1000+Meta 超大规模多语言可变Granite-SpeechEN, FR, DE, ES, PT, JAIBM ASR + 翻译4GB
命令描述/mlx-stt status查看 STT 服务器状态/mlx-stt transcribe <音频路径>转录音频文件/mlx-stt reload重载 STT 配置/mlx-stt models列出可用模型
json
{
"action": "transcribe",
"audioPath": "/tmp/recording.m4a"
}
json
{
"action": "transcribe",
"audioPath": "/tmp/chinese_audio.mp3",
"language": "zh"
}
json
{
"action": "transcribe",
"audioPath": "/tmp/foreign_audio.mp3",
"task": "translate"
}
在配置中指定,或使用时覆盖。
在 openclaw.json 中配置:
json
{
"plugins": {
"entries": {
"openclaw-mlx-audio": {
"config": {
"stt": {
"enabled": true,
"model": "mlx-community/whisper-large-v3-turbo",
"port": 19290,
"language": "zh",
"pythonEnvMode": "managed"
}
}
}
}
}
}
检查状态:
bash
/voice-stt status
如果显示未运行,检查配置中的 enabled 是否为 true。
可以循环调用 transcribe 处理多个文件。
结合音频录制工具,实现近实时的语音转文字。
Whisper v3 支持多语言混合音频的自动检测和转录。