A wake-word voice assistant for macOS:
“Jarvis” → record → transcribe → route to OpenClaw → speak the response.
- Wake-word detection via Picovoice Porcupine
- Local microphone recording
- Speech-to-text transcription using Whisper
- Command routing via OpenClaw CLI
- Text-to-speech using macOS
say - Environment-based secure configuration
- Optional Gemini fallback (via external keys)
- macOS (for built-in
say) - Python 3.10+
- A working microphone
- Picovoice Porcupine access key (required)
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install pvporcupine pyaudio openai-whisperIf installation fails:
brew install portaudio
pip install pyaudioexport PICOVOICE_KEY="your_picovoice_key_here"export WAKE_WORD="jarvis"
export WAKE_SENSITIVITY="0.6"
export WHISPER_MODEL="base"
export WHISPER_COMPUTE="auto" # auto | cpu | cuda
export OPENCLAW_BIN="openclaw"
export TTS_VOICE="" # macOS voice name
export TTS_RATE="200"
export OLLAMA_HOST=""Keys must NOT be committed.
export GEMINI_FALLBACK_KEYS="key1,key2,key3"export GEMINI_FALLBACK_KEYS_FILE="$HOME/.secrets/gemini_keys.txt"One key per line:
# comment allowed
your_key_here
another_key_here
Optional:
export GEMINI_FALLBACK_MODEL="gemini-2.0-flash"python3 jarvis.pyOr:
chmod +x jarvis.py
./jarvis.pyNever commit:
.env*.local*keys*.txt- Any secret/token file
~/.openclaw/
Suggested .gitignore additions:
.env
*.local
*.secrets
*keys*.txt
**/.openclaw/*All credentials must be injected at runtime via environment variables.
- Listens continuously for the configured wake word.
- When detected, records audio until silence.
- Transcribes audio using Whisper.
- Sends the transcription to OpenClaw CLI.
- Speaks the response using macOS TTS.
Make sure it is set:
echo $PICOVOICE_KEYIf empty, export it again.
brew install portaudio
pip install --force-reinstall pyaudio