A low-latency, offline voice-trigger / hotphrase runner designed for NVIDIA Jetson Orin (JetPack 6 / CUDA 12.x), but also works on x86 Linux and CPU-only ARM boards.
- WebRTC VAD (20ms frames) → short speech segments for low latency
faster-whisper(CTranslate2) CUDA on Jetson; auto fallback to CPU- Fuzzy phrase matching → run shell commands
- UDP control + remote triggers:
CTRL:PAUSE,CTRL:RESUMETRIGGER:<phrase>(must exist in triggers)CMD:<shell command>(optional; can be disabled)
- Optional model prefetch and warmup to avoid a slow first trigger
git clone <YOUR_REPO_URL>
cd jetson-voice-trigger
chmod +x scripts/install_orin.sh
./scripts/install_orin.shsource .venv/bin/activate
python self_test.py --model tiny.ensource .venv/bin/activate
python -m voice_trigger.app --asr_device auto --model medium.en --compute float16 --lang enYou can either edit defaults in src/voice_trigger/config.py, or provide an external JSON file:
triggers.json
{
"open browser": "xdg-open https://www.wikipedia.org",
"say hello": "bash -lc 'notify-send \"Trigger\" \"Hello\"'"
}Run with:
python -m voice_trigger.app --triggers triggers.jsonEnable UDP listener:
python -m voice_trigger.app --udp_in --udp_host 0.0.0.0 --udp_port 9999 --udp_token SECRETMessages (prepend SECRET: when token is used):
CTRL:PAUSECTRL:RESUMETRIGGER:<phrase>CMD:<shell command>(disabled by default; enable with--allow_udp_cmd)
- For medium/large:
--compute float16and--asr_device cuda(orauto) - Use
--prefetch-modelto download weights ahead of time - Use
--warmup-sec 1.0to warm kernels/cache
Example:
python -m voice_trigger.app --asr_device auto --model medium.en --compute float16 --prefetch-model --warmup-sec 1.0On Jetson/AArch64, you typically need to build CTranslate2 from source with CUDA:
./scripts/install_orin.shInstall:
libportaudio2 portaudio19-dev libasound2-dev
List devices:
python -c "import sounddevice as sd; print(sd.query_devices())"- UDP
CMD:executes arbitrary shell commands → disabled by default - If enabling it, always use
--udp_token
MIT