Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ovos-ww-plugin-local-wake

An OVOS wake-word plugin for local-wake. You give it 3 or 4 recordings of a wake word, and it detects that word. It needs no training.

The plugin turns the last second or two of audio into frames of Google's speech-embedding model and compares them with the frames of your recordings by dynamic time warping (DTW). A detection is a DTW distance below 0.16 to any recording.

Install

pip install --pre ovos-ww-plugin-local-wake

The plugin needs only onnxruntime and numpy, and carries the 2.4 MB speech-embedding model. It does not install PyTorch, librosa or sounddevice.

Recordings

Record the wake word 3 or 4 times, with the microphone and in the room that the device uses. Save each recording as a 16-bit WAV file, one wake word per file. Any sample rate works. For example, on Linux:

arecord -d 2 -r 16000 -c 1 -f S16_LE ~/wakewords/hey_computer/1.wav

The plugin cuts the silence before and after the word when it loads the recordings. A recording must hold only the wake word: other sounds in it become part of the match.

Configuration

"hotwords": {
  "hey_computer": {
    "module": "ovos-ww-plugin-local-wake",
    "samples": "~/wakewords/hey_computer",
    "listen": true
  }
},
"listener": {"wake_word": "hey_computer"}
Key Default Meaning
samples required Folder or list of WAV recordings of the wake word
threshold 0.16 Largest DTW distance for a detection
buffer_seconds longest recording + 0.25 s Audio compared with the recordings, at least 0.775 s
hop_seconds 0.25 Audio between two comparisons
silence_db 20 A buffer this many dB quieter than the recordings is not compared

The best threshold depends on the recordings and the microphone. A lower value gives fewer false detections and more misses. The local-wake benchmark found optimal thresholds between 0.14 and 0.21.

Measured results

Each clip was streamed through the plugin with 1 s of silence before and after it, in chunks of 1024 samples, with the default settings.

With 4 synthetic "alexa" recordings (synthetic-wakewords) as references:

Clips Detected
116 other synthetic "alexa" 116
300 one-second speech clips (not-wake-words-speech-en) 1
60 human "athena" (community dataset) 0
120 human "computer" 0
120 synthetic "hey computer" 0

With 2 of the 3 "okay rhasspy" recordings from rhasspy-wake-raven as references, the third gives a distance of 0.15 and speech clips give 0.24 or more.

Noisy recordings do not work. With 4 human recordings from the community dataset as references, the speech clips matched as well as the wake word at every threshold from 0.12 to 0.20. Those recordings are 1.5 to 4 s long, and their background noise is only about 20 dB below the voice, so the noise becomes part of the match. Make your recordings in a quiet room, close to the microphone, with only the wake word in each file. The plugin logs a warning when a recording holds more than 2.5 s of sound.

300 one-second speech clips are not enough to estimate false activations per hour. Measure on your own audio before you use a wake word.

Limits

  • local-wake matches one voice best. The upstream benchmark reports 98.6% detection for the speaker who made the recordings and 81.9% for other speakers, on clean audio.
  • The speech-embedding model needs 0.775 s of audio. A shorter wake word is compared together with the sound around it.
  • Each comparison runs the model over the whole buffer. Increase hop_seconds on slow hardware.

Credits

local-wake is by Stanislau Matskevich, MIT. The speech-embedding model is by Google, Apache-2.0. See NOTICE for the changes.

Report problems at the issue tracker.

Funding

NGI0 Commons Fund

This project was funded through the NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101135429.

Metadata

Release files for ovos-ww-plugin-local-wake 0.0.1a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ovos-ww-plugin-local-wake 0.0.1a2
File Size Uploaded Provenance Actions
ovos_ww_plugin_local_wake-0.0.1a2.tar.gz 1.6 MB Without provenance Details for ovos_ww_plugin_local_wake-0.0.1a2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ovos-ww-plugin-local-wake 0.0.1a2
File Interpreter ABI Platform Actions
ovos_ww_plugin_local_wake-0.0.1a2-py3-none-any.whl Python 3 none any Details for ovos_ww_plugin_local_wake-0.0.1a2-py3-none-any.whl

Total release size: 3.1 MB

Release files / ovos_ww_plugin_local_wake-0.0.1a2.tar.gz

Download URL ovos_ww_plugin_local_wake-0.0.1a2.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
0a8ea71873fd1a1014856718cfd5248ec3396ec56a14c3bb2ad88058bc149095
BLAKE2b-256 checksum
How to use checksums
e3c36676ba3735f1cf57af2156d71ff8a0030ecd924b10ead683661423999e81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ovos_ww_plugin_local_wake-0.0.1a2-py3-none-any.whl

Download URL ovos_ww_plugin_local_wake-0.0.1a2-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b8413315ff43e00fee997f94ae6a879c89a05b75786bb2c4366e7d3ae8c7830d
BLAKE2b-256 checksum
How to use checksums
2a9dfbfb6066a54c139ffa92e44e6eb13dc124026d3074a6c379d5c8683c88ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for ovos-ww-plugin-local-wake 0.0.1a2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page