在 Apple Silicon Mac 上,用 mano-asr 为 OpenClaw 提供完全离线、零成本的语音转文字能力。无需任何云端 API Key。
项目说明功能将语音/音频消息自动转写为文字,注入 OpenClaw 对话上下文引擎Qwen3-ASR (1.7B-8bit) 或 Fun-ASR-Nano,基于 MLX 在 Apple Silicon 本地推理隐私音频不离开本机,完全离线处理支持格式.wav .mp3 .ogg .webm .m4a .flac支持语言中文、英文(取决于所选模型)适用渠道企业微信、Telegram、Discord、Signal、WebChat 等所有 OpenClaw 接入渠道
硬件: Apple Silicon Mac(M1/M2/M3/M4 系列)
系统: macOS Monterey (12.0) 或更高
软件:
验证 OpenClaw 状态:
bash
openclaw status
确认 Gateway 显示 running。
bash
brew tap Mininglamp-AI/tap
brew install mano-asr
验证安装成功:
bash
mano-asr --version
# 输出: mano-asr 0.1.4
bash
mano-asr doctor
正常输出示例:
text
Environment Check
───────────────────────────────────
✓ Python 3.13.x
✓ ffmpeg 7.x
✓ ffprobe (installed)
✓ MLX unknown
✓ Config file exists
✓ ASR model: Mano-ASR-0.8B-Instruct-1.0-MLX-8bit
───────────────────────────────────
bash
mano-asr start
⏳ 首次启动会自动下载 ASR 模型(约 1 GB),请确保网络通畅。 模型存储路径:
~/.mano-asr/models/
等待启动完成后确认状态:
bash
mano-asr status
text
mano-asr Service Status
───────────────────────────────────
Status: running
PID: xxxxx
Port: 8787
Uptime: 0h 1m
───────────────────────────────────
Engine: qwen3-asr (Qwen3-ASR)
ASR Model: Mano-ASR-0.8B-Instruct-1.0-MLX-8bit
───────────────────────────────────
用任意音频文件测试:
bash
mano-asr transcribe --format text /path/to/test.wav
# 输出转写文本
打开 ~/.openclaw/openclaw.json(或 openclaw.json5),找到 "tools" 字段,添加 media.audio 配置块:
json
{
"tools": {
"media": {
"audio": {
"enabled": true,
"models": [
{
"type": "cli",
"command": "mano-asr",
"args": ["transcribe", "--format", "text", "{{MediaPath}}"],
"timeoutSeconds": 120
}
]
}
}
}
}
json
{
"tools": {
"media": {
"audio": {
"enabled": true,
"maxBytes": 31457280,
"echoTranscript": true,
"echoFormat": "📝 \"{transcript}\"",
"models": [
{
"type": "cli",
"command": "mano-asr",
"args": [
"transcribe",
"--format", "text",
"--hotwords", "OpenClaw,mano-asr,MLX",
"{{MediaPath}}"
],
"timeoutSeconds": 120
}
]
}
}
}
}
如果你同时配置了云端 provider(如 OpenAI),可以让 mano-asr 优先,失败时回退到云端:
json
{
"tools": {
"media": {
"audio": {
"enabled": true,
"models": [
{
"type": "cli",
"command": "mano-asr",
"args": ["transcribe", "--format", "text", "{{MediaPath}}"],
"timeoutSeconds": 120
},
{
"provider": "openai",
"model": "gpt-4o-mini-transcribe"
}
]
}
}
}
}
OpenClaw 按顺序尝试
models数组中的条目,第一个成功的就返回结果。
字段类型说明enabledboolean是否启用音频转写maxBytesnumber最大文件大小(默认 20MB = 20971520)echoTranscriptboolean转写后是否先将文本回显给用户确认(默认 false)echoFormatstring回显格式, {transcript} 为占位符models[].typestring"cli" 表示本地命令行工具models[].commandstring可执行文件名或完整路径models[].argsstring[]命令参数, {{MediaPath}} 由 OpenClaw 替换为实际音频路径models[].timeoutSecondsnumber超时秒数(默认 60,长音频建议 120)--hotwords—mano-asr 的热词参数,提升专有名词识别准确率
bash
openclaw gateway restart
bash
openclaw config get tools.media.audio
通过任意已接入的渠道(企业微信、Telegram、WebChat 等)给 OpenClaw 发送一条语音消息。如果一切正常,AI 助手会基于转写后的文字内容进行回复。
text
┌─────────────┐ ┌──────────────┐ ┌───────────────────┐ ┌──────────────┐
│ 用户发送 │ │ OpenClaw │ │ mano-asr │ │ AI 模型 │
│ 语音消息 │───▶│ 接收音频文件 │───▶│ 本地 MLX 转写 │───▶│ 处理文本 │
└─────────────┘ └──────────────┘ └───────────────────┘ └──────────────┘
│
▼
纯文本 transcript
注入 {{Transcript}}
详细流程:
maxBytes 限制models 数组顺序调用第一个可用的转写引擎mano-asr transcribe --format text <音频路径>{{Transcript}} 模板变量bash
mano-asr model list
text
Available Models
───────────────────────────────────
Engine: qwen3-asr
ASR Models:
* Mano-ASR-0.8B-Instruct-1.0-MLX-8bit (active)
Fun-ASR-Nano-2512-8bit
───────────────────────────────────
bash
mano-asr model use Fun-ASR-Nano-2512-8bit
mano-asr restart
模型大小特点Mano-ASR-0.8B-Instruct-1.0-MLX-8bit1GB默认启动模型,兼顾速度和精度Fun-ASR-Nano-2512-8bit500MB更轻量,速度更快
bash
mano-asr config show
命令说明mano-asr start启动服务(首次自动下载模型)mano-asr stop停止服务mano-asr restart重启服务mano-asr status查看服务状态mano-asr logs查看服务日志mano-asr doctor环境检查
注意: OpenClaw 使用的是 CLI 模式 (
mano-asr transcribe)。即使后台服务未运行,CLI 也能工作(会临时加载模型)。但保持服务运行可以显著加速转写,因为模型已预加载在内存中。
json
{
"tools": {
"media": {
"audio": {
"enabled": true,
"scope": {
"default": "allow",
"rules": [
{ "action": "deny", "match": { "chatType": "group" } }
]
},
"models": [
{
"type": "cli",
"command": "mano-asr",
"args": ["transcribe", "--format", "text", "{{MediaPath}}"],
"timeoutSeconds": 120
}
]
}
}
}
}
json
{
"type": "cli",
"command": "/opt/homebrew/bin/mano-asr",
"args": ["transcribe", "--format", "text", "{{MediaPath}}"],
"timeoutSeconds": 120
}
json
{
"tools": {
"media": {
"audio": {
"enabled": true,
"maxBytes": 52428800,
"models": [...]
}
}
}
}
上例将限制设为 50MB。
检查清单:
bash
# 1. 确认 mano-asr 可用
mano-asr --version
# 2. 确认环境正常
mano-asr doctor
# 3. 确认 OpenClaw 配置
openclaw config get tools.media.audio
# 4. 手动测试转写
mano-asr transcribe --format text /path/to/audio.wav
# 5. 查看 OpenClaw 日志(verbose 模式会显示转写调用)
openclaw gateway restart --verbose
timeoutSeconds(默认 60,建议设为 120)mano-asr startffmpeg -versionmano-asr model use Mano-ASR-0.8B-Instruct-1.0-MLX-8bitbash
# 确认安装位置
which mano-asr
# 通常为 /opt/homebrew/bin/mano-asr
# 如果不在 PATH 中,在配置里使用完整路径
# "command": "/opt/homebrew/bin/mano-asr"
bash
brew upgrade mano-asr
mano-asr restart # 如果服务在运行