Picovoice Alternative for Python: Run an Offline ONNX Wake Word

August 2026 · Python · Linux / Windows / macOS

Picovoice no longer offers a continuing personal or non-commercial plan. This guide replaces the AccessKey-dependent runtime with a standard ONNX model and an open-source Python inference engine.

Goal: hear a live microphone, detect one custom phrase locally, and print the result. No Home Assistant installation and no runtime account key are required.

What changes when you migrate?

Porcupine workflowOpen ONNX workflow
Initialize the SDK with an AccessKeyLoad local model files directly
Use a platform-specific .ppnUse a standard ONNX model across desktop systems
Use the vendor runtimeUse ONNX Runtime plus open inference code

Prerequisites

Download the inference engine

git clone https://github.com/voicute/onnx-wakeword.git
cd onnx-wakeword
python -m venv .venv

Activate the environment with .venv\Scripts\activate on Windows, or source .venv/bin/activate on Linux and macOS.

Install the desktop dependencies

pip install onnxruntime numpy pyaudio

PyAudio may require the operating system's PortAudio package. On Debian or Ubuntu, install portaudio19-dev first. On macOS, install PortAudio with Homebrew if pip cannot build PyAudio.

Put the model files in one directory

The runtime needs a keyword model, model_info.json, and the supplied melspectrogram.onnx feature extractor. Keep the paths explicit while testing.

Start live detection

from python.wakeword_engine import WakeWordEngine

engine = WakeWordEngine()
engine.load("models/model_info.json", "models/melspectrogram.onnx")
engine.set_L1(True)
engine.start(lambda word, probability, info:
    print(f"Detected: {word} ({probability:.0%})"))

Say the trained phrase several times at a normal distance. A successful run prints the keyword and its probability without sending audio to a server.

Troubleshooting

No microphone input

Run python python/mic_test.py --list-devices, confirm OS microphone permission, and select the correct input device.

The model never triggers

Confirm 16 kHz mono audio, verify the model paths, start with the default threshold, and test in a quiet room before tuning.

Too many repeated triggers

Enable the cooldown layer after basic recognition works. Do not enable every filter before confirming the microphone and model are correct.

Use several commands instead of one wake word

The same runtime accepts a multi-keyword model. A callback can map “start”, “stop”, “next”, or device-specific phrases to local application actions without running full speech recognition.

Disclosure: Voicute develops the model-generation service. The Python inference engine is open source; generated models run locally without a Voicute account or AccessKey.
Create an offline model