OpenClaw Voice Control
OpenClaw Voice Control is a local macOS voice-control integration for OpenClaw.
Repository source:
It provides:
- - wakeword activation
- local microphone capture
- local ASR with FunASR / SenseVoice
- forwarding recognized text to a local OpenClaw agent
- macOS TTS playback
- optional overlay UI
- launchd-based background resident behavior
- auto-start after user login
Platform
Safety Warning
This skill adds a voice entrypoint, and that entrypoint is not identity-bound.
That means:
- - anyone near the microphone may be able to trigger it
- any capability exposed through the connected OpenClaw agent may become reachable by voice
Recommended safety practice:
- - add explicit safety constraints to the connected agent prompt
- require confirmation for high-risk actions
- avoid broad autonomous permissions for the voice-facing agent
- use least privilege for tools and connected systems
Main Path
Treat this as a local deployment skill, not as a prompt-only helper.
When this skill is installed into OpenClaw:
- - work inside the current installed skill directory for the current conversation agent
- use the declared GitHub repository as the source of truth
- do not silently switch to another local clone or an already-prepared environment
- do not continue until the workspace contains the real repository files, not just INLINECODE0
The main installation guide is the repository README.md.
README.zh-CN.md is the Chinese companion guide.
Use this as the standard install path:
- 1. sync the full repository into the current installed skill workspace
- create and activate INLINECODE3
- run INLINECODE4
- download or populate the SenseVoice model directory
- download or populate the VAD model directory
- copy
.env.example to INLINECODE6 - fill the required values in INLINECODE7
- use the default openWakeWord route
- run direct-run validation with both the voice service and overlay process
- ask whether the user wants background resident behavior and auto-start
- if yes, run INLINECODE8
- if no, stop after direct-run validation
Before running any system-changing step in that path, explicitly tell the user
what you are about to do and get confirmation for:
- - fetching and checking out the repository into the skill workspace
- running
pip install -e . from the repository - downloading large local models or wakeword assets
- enabling background resident behavior or launchd auto-start
Minimum command path:
CODEBLOCK0
Direct-run validation is not complete unless both commands above are running at
the same time from the same installed skill workspace.
Before any next step after direct-run validation, stop that test
first.
This includes:
- - background resident deployment
- auto-start validation
- starting another direct-run test
If an old direct-run service and overlay are left running, two active voice
runtimes can respond to the same wakeword and produce duplicate replies.
What Must Exist Before Setup
Before setup begins, make sure these prerequisites exist or can be provided:
- - Python 3.11 or newer
- a running local OpenClaw service
- INLINECODE10
- macOS microphone permission
- a way to download the local SenseVoice and VAD model directories
For the default route, the remaining setup can usually be handled by the AI or
operator:
- - copy
.env.example to INLINECODE12 - download the SenseVoice model directory
- download or populate the VAD model directory
- let openWakeWord download the selected pretrained wakeword model on first run
Recommended Defaults
The default public route is:
- - INLINECODE13
- INLINECODE14
- INLINECODE15
- INLINECODE16
- INLINECODE17
Prefer that route unless the user explicitly asks for something else.
Default Route Variables
These are the main values for the default route:
- - required in INLINECODE18
-
OPENCLAW_BASE_URL
-
OPENCLAW_TOKEN
-
SENSEVOICE_MODEL_PATH
-
SENSEVOICE_VAD_MODEL_PATH
- - usually left at their documented defaults unless the user wants customization
-
WAKEWORD_PROVIDER=openwakeword
-
OPENWAKEWORD_MODEL_NAME=hey jarvis
-
OPENCLAW_AGENT_ID=main
-
OPENCLAW_MODEL=openclaw:main
- INLINECODE27
If the user changes the macOS TTS voice, first make sure that voice has been
downloaded in:
- - System Settings
- Accessibility
- Spoken Content
- the
i button next to System Voice - Language
- Voice
Optional Porcupine Route
Picovoice / Porcupine is an optional fallback route, not the default path.
Only switch to it when the user explicitly wants to use a local .ppn wakeword
model.
If that route is chosen, set:
- - INLINECODE30
- INLINECODE31
- INLINECODE32
Only ask for those Porcupine-specific values when the user explicitly chooses
that route.
Switching openWakeWord Models
To switch the default openWakeWord wakeword, change:
Common official pretrained examples include:
- - INLINECODE34
- INLINECODE35
- INLINECODE36
- INLINECODE37
Those pretrained wakeword models are downloaded automatically on first use.
The code path already supports changing OPENWAKEWORD_MODEL_NAME, but only the
default hey jarvis route has been smoke-tested in this repository so far.
Execution Rules
When using this skill, follow these rules:
- 1. Use the declared GitHub repository first.
- Start from
https://github.com/CarrotYuan/openclaw-voice-control.git
- Do not substitute another repository just because it looks similar.
- 2. Keep deployment work in the current installed skill workspace.
- Do not silently switch to another local clone.
- If GitHub access fails and a local clone exists, ask before using it.
- 3. Do not silently reuse an old environment.
- Do not assume an existing
.venv, local model cache, previous
.env, or private runtime should be reused.
- If reusing cached assets might save time, explain that and ask first.
- 4. Do not invent missing values.
- When writing
.env, use the exact variable names required by the project, especially
OPENCLAW_TOKEN.
- If required values or local assets are missing, stop and point to the documented source of truth.
- 5. Handle secrets conservatively.
- Do not print real tokens or keys back into the conversation unless the user explicitly asks to see them.
- For this project, use the OpenClaw token from
~/.openclaw/openclaw.json, specifically the
gateway configuration.
- Do not use
~/.openclaw/identity/device-auth.json as the token source for this project.
- 6. Ask before any system-changing action.
- Do not assume you should fetch the repository, run
pip install -e ., download models, or enable launchd behavior without user approval.
- Explain the action first, then continue only after the user confirms.
- 7. Ask before enabling background resident behavior.
- Foreground validation comes first.
- Direct-run validation means starting both
python -m openclaw_voice_control --config config/default.yaml --env-file .env and
python -m openclaw_voice_control.overlay_app --config config/default.yaml --env-file .env from the same installed skill workspace.
- Only run
./scripts/deploy_macos.sh when the user explicitly wants background resident behavior or auto-start.
Daily Maintenance
Primary scripts:
- - deploy background runtime: INLINECODE52
- restart installed background services: INLINECODE53
- uninstall installed background services: INLINECODE54
- inspect local installation and environment issues: INLINECODE55
Double-click .command wrappers are also available in scripts/ for macOS users who prefer Finder-based execution.
Shutdown Intents
Treat shutdown requests as one of these two user intents:
- - temporarily disable voice functionality
- stop the running direct-run process, or stop the deployed background runtime
- do not delete the skill folder
- - delete the skill completely
- remove the skill folder itself
- only do this when the user explicitly asks for full removal
If the user says something ambiguous like "turn it off" or "stop voice", ask one short clarification question before acting.
Background Architecture
The canonical background startup path is:
INLINECODE59 builds the required host apps automatically.
Configuration Surface
Default-route required values:
- - INLINECODE60
- INLINECODE61
- INLINECODE62
- INLINECODE63
Default-route configurable values:
- - INLINECODE64
- INLINECODE65
- INLINECODE66
- INLINECODE67
- INLINECODE68
- INLINECODE69
If the user explicitly switches to the optional Porcupine route, also configure:
- - INLINECODE70
- INLINECODE71
Interpreter override variables still exist:
- - INLINECODE72
- INLINECODE73
They are troubleshooting knobs only, not the main deployment model.
INLINECODE74 still exists as a tuning variable, but it is a
troubleshooting adjustment rather than a first-run requirement.
As a rule, machine-specific secrets and paths belong in .env, while wakeword
timing and threshold tuning should normally be adjusted in config/default.yaml.
Where To Get Missing Requirements
After syncing the repository into the current installed skill workspace, read these sections in README.md:
- - INLINECODE78
- INLINECODE79
- INLINECODE80
Practical source notes:
- -
OPENCLAW_BASE_URL: use the full OpenClaw chat completions endpoint, not only the host and port root. For the default local setup, use INLINECODE82 - INLINECODE83 : obtain it from the local OpenClaw gateway configuration in
~/.openclaw/openclaw.json, under INLINECODE85 - default wakeword route: use openWakeWord with the built-in English
hey jarvis model - optional Porcupine route: obtain
PICOVOICE_ACCESS_KEY and the local .ppn file from Picovoice - if GitHub clone fails, report that first rather than switching to an unrelated local directory
Related Files
- -
README.md in the cloned repository - INLINECODE90 in the cloned repository
- INLINECODE91 in the cloned repository
OpenClaw 语音控制
OpenClaw 语音控制是 OpenClaw 的本地 macOS 语音控制集成方案。
仓库来源:
它提供以下功能:
- - 唤醒词激活
- 本地麦克风采集
- 基于 FunASR / SenseVoice 的本地语音识别
- 将识别文本转发至本地 OpenClaw 智能体
- macOS TTS 语音播报
- 可选叠加层界面
- 基于 launchd 的后台常驻运行
- 用户登录后自动启动
平台
安全警告
本技能新增了语音入口,且该入口不具备身份绑定机制。
这意味着:
- - 麦克风附近的任何人都可能触发该入口
- 通过所连接的 OpenClaw 智能体暴露的任何能力都可能通过语音被调用
推荐的安全实践:
- - 在连接的智能体提示词中添加明确的安全约束
- 对高风险操作要求确认
- 避免为语音智能体授予宽泛的自主权限
- 对工具和连接系统采用最小权限原则
主要安装路径
请将其视为本地部署技能,而非仅提示词辅助工具。
当本技能安装到 OpenClaw 时:
- - 在当前对话智能体的已安装技能目录内工作
- 以声明的 GitHub 仓库作为唯一可信来源
- 不要静默切换到其他本地克隆或已准备好的环境
- 在工作区包含真实仓库文件(而非仅 SKILL.md)之前,不要继续操作
主要安装指南为仓库中的 README.md。
README.zh-CN.md 是中文辅助指南。
请按以下标准安装路径操作:
- 1. 将完整仓库同步到当前已安装的技能工作区
- 创建并激活 .venv
- 运行 pip install -e .
- 下载或准备 SenseVoice 模型目录
- 下载或准备 VAD 模型目录
- 复制 .env.example 为 .env
- 填写 .env 中的必需值
- 使用默认的 openWakeWord 路径
- 同时运行语音服务和叠加层进程进行直接运行验证
- 询问用户是否需要后台常驻运行和自动启动
- 如果需要,运行 ./scripts/deploy_macos.sh
- 如果不需要,在直接运行验证后停止
在执行该路径中任何更改系统的步骤之前,明确告知用户即将执行的操作,并在以下操作前获得确认:
- - 获取并检出仓库到技能工作区
- 从仓库运行 pip install -e .
- 下载大型本地模型或唤醒词资源
- 启用后台常驻运行或 launchd 自动启动
最小命令路径:
bash
从当前对话智能体的已安装技能目录执行
git init
git remote add origin https://github.com/CarrotYuan/openclaw-voice-control.git
git fetch --depth 1 origin main
git checkout -B main FETCH_HEAD
在工作区包含 scripts/、src/、config/、
launchagents/ 和 README.md 之前,不要继续操作
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
./.venv/bin/modelscope download --model iic/SenseVoiceSmall --local_dir models/SenseVoiceSmall
./.venv/bin/python - <
from funasr import AutoModel
AutoModel(model=fsmn-vad, disable_update=True)
PY
cp .env.example .env
终端 1,从当前已安装的技能工作区执行
python -m openclawvoicecontrol --config config/default.yaml --env-file .env
终端 2,从同一工作区执行
python -m openclawvoicecontrol.overlay_app --config config/default.yaml --env-file .env
直接运行验证只有在上述两个命令从同一已安装技能工作区同时运行时才算完成。
在直接运行验证后的任何下一步操作之前,先停止该测试。
这包括:
- - 后台常驻部署
- 自动启动验证
- 启动另一个直接运行测试
如果旧版的直接运行服务和叠加层仍在运行,两个活跃的语音运行时可能会响应同一个唤醒词并产生重复回复。
设置前必须存在的条件
在开始设置之前,请确保以下先决条件已存在或可提供:
- - Python 3.11 或更新版本
- 正在运行的本地 OpenClaw 服务
- OPENCLAW_TOKEN
- macOS 麦克风权限
- 能够下载本地 SenseVoice 和 VAD 模型目录的方式
对于默认路径,其余设置通常可由 AI 或操作员处理:
- - 复制 .env.example 为 .env
- 下载 SenseVoice 模型目录
- 下载或准备 VAD 模型目录
- 让 openWakeWord 在首次运行时下载选定的预训练唤醒词模型
推荐默认配置
推荐的默认公共路径为:
- - WAKEWORDPROVIDER=openwakeword
- OPENWAKEWORDMODELNAME=hey jarvis
- OPENCLAWAGENTID=main
- OPENCLAWMODEL=openclaw:main
- OPENCLAW_USER=openclaw-voice-control
除非用户明确要求其他配置,否则优先使用该路径。
默认路径变量
以下是默认路径的主要值:
- OPENCLAWBASEURL
- OPENCLAW_TOKEN
- SENSEVOICEMODELPATH
- SENSEVOICEVADMODEL_PATH
- WAKEWORD_PROVIDER=openwakeword
- OPENWAKEWORDMODELNAME=hey jarvis
- OPENCLAWAGENTID=main
- OPENCLAW_MODEL=openclaw:main
- OPENCLAW_USER=openclaw-voice-control
如果用户更改 macOS TTS 语音,请首先确保该语音已在以下位置下载:
- - 系统设置
- 辅助功能
- 语音内容
- 系统语音旁边的 i 按钮
- 语言
- 语音
可选的 Porcupine 路径
Picovoice / Porcupine 是可选的后备路径,并非默认路径。
仅当用户明确希望使用本地 .ppn 唤醒词模型时才切换到该路径。
如果选择该路径,请设置:
- - WAKEWORDPROVIDER=porcupine
- PICOVOICEACCESSKEY
- WAKEWORDFILE
仅在用户明确选择该路径时才询问这些 Porcupine 特定的值。
切换 openWakeWord 模型
要切换默认的 openWakeWord 唤醒词,请更改:
常见的官方预训练示例包括:
- - hey jarvis
- hey mycroft
- hey rhasspy
- alexa
这些预训练的唤醒词模型会在首次使用时自动下载。
代码路径已支持更改 OPENWAKEWORDMODELNAME,但本仓库目前仅对默认的 hey jarvis 路径进行了冒烟测试。
执行规则
使用本技能时,请遵循以下规则:
- 1. 优先使用声明的 GitHub 仓库。
- 从 https://github.com/CarrotYuan/openclaw-voice-control.git 开始
- 不要仅因外观相似就替换为其他仓库。
- 2. 将部署工作保留在当前已安装的技能工作区中。
- 不要静默切换到其他本地克隆。
- 如果 GitHub 访问失败且存在本地克隆,请在使用前询问。
- 3. 不要静默重用旧环境。
- 不要假设现有的 .venv、本地模型缓存、之前的 .env 或私有运行时应该被重用。
- 如果重用缓存资源可能节省时间,请解释并先询问。
- 4. 不要编造缺失的值。
- 编写 .env 时,使用项目要求的精确变量名,特别是 OPENCLAW_TOKEN。
- 如果必需的值或本地资源缺失,请停止并指向文档中的可信来源。
- 5. 保守处理机密信息。
- 除非用户明确要求查看,否则不要将真实的令牌或密钥打印回对话中。
- 对于本项目,使用 ~/.openclaw/openclaw.json 中的 OpenClaw 令牌,具体为 gateway 配置。
- 不要使用 ~/.openclaw/identity/device-auth.json 作为本项目的令牌来源。
- 6. 在执行任何更改系统的操作前先询问。
- 不要假设你可以在未经用户批准的情况下获取仓库、运行 pip install -e .、下载模型或启用 launchd 行为。
- 先解释操作,然后在用户确认后继续。
- 7. 在启用后台常驻运行行为前先询问。
- 前台验证优先。