This release is a pre-release and may not be stable for production use.
ovos-ww-plugin-efficientword-net
An OVOS wake-word plugin for EfficientWord-Net, a few-shot hotword detector. You give it 4 or more recordings of a wake word, and it detects that word. It needs no training.
The plugin embeds the last 1.5 s of audio with EfficientWord-Net's ResNet-50 ArcFace model and compares the embedding with the embeddings of your recordings. A detection is a score of 0.7 or more, where the score is (cosine similarity + 1) / 2 against the closest recording.
Install
pip install --pre ovos-ww-plugin-efficientword-net
The plugin needs only onnxruntime and numpy. It carries the quantized EfficientWord-Net model (22 MB) and the upstream sample references, so it works offline and does not install PyAudio.
Configuration
Use one of the bundled wake words: alexa, balloon, computer, lights_off, lights_on, mobile or mycroft.
"hotwords": {
"computer": {
"module": "ovos-ww-plugin-efficientword-net",
"listen": true
}
},
"listener": {"wake_word": "computer"}
Or give your own recordings: a folder of 16-bit WAV files, one wake word per file, at least 4 files. Any sample rate works.
"hotwords": {
"hey_computer": {
"module": "ovos-ww-plugin-efficientword-net",
"samples": "~/wakewords/hey_computer",
"listen": true
}
}
| Key | Default | Meaning |
|---|---|---|
wakeword |
key phrase, spaces as _ |
Name of a bundled reference |
samples |
Folder or list of WAV recordings; replaces the bundled reference | |
reference_file |
A *_ref.json file made by EfficientWord-Net's generate_reference |
|
threshold |
0.7 |
Minimum score for a detection, between 0 and 1 |
hop_seconds |
0.5 |
Audio between two scores |
relaxation_seconds |
2.0 |
Audio after a detection with no new detection |
model |
bundled quantized model | Path to another EfficientWord-Net ResNet-50 ArcFace ONNX file |
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 and the bundled references.
| Wake word | Positive clips detected | Other clips detected |
|---|---|---|
| computer | 103 of 120 human recordings (community dataset); 93 of 120 synthetic "hey computer" | 1 of 300 speech clips (not-wake-words-speech-en), 0 of 60 human "athena", 0 of 120 synthetic "alexa" |
| alexa | 119 of 120 synthetic (synthetic-wakewords) | 0 of 300 speech clips (not-wake-words-speech-en), 0 of 120 human "computer" |
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.
The quantized model gives scores within 0.005 of the full-precision model on the upstream recordings. One score takes about 50 ms on a laptop CPU, and the plugin scores every hop_seconds. Increase hop_seconds on slow hardware.
Limits
- Detection quality depends on the recordings. Record in the room and with the microphone that the device uses.
- The bundled references are English words.
- A wake word longer than 1.5 s does not fit in the window.
Credits
EfficientWord-Net is by ANT-BRaiN, Apache-2.0. The plugin carries its model, its sample references and a numpy version of its inference code. See NOTICE for the changes.
Report problems at the issue tracker.
Funding
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-efficientword-net 0.0.1a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ovos_ww_plugin_efficientword_net-0.0.1a2.tar.gz | 18.4 MB | Without provenance | Details for ovos_ww_plugin_efficientword_net-0.0.1a2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ovos_ww_plugin_efficientword_net-0.0.1a2-py3-none-any.whl | Python 3 | none | any | Details for ovos_ww_plugin_efficientword_net-0.0.1a2-py3-none-any.whl |
Total release size: 36.7 MB
Release files / ovos_ww_plugin_efficientword_net-0.0.1a2.tar.gz
| Download URL | ovos_ww_plugin_efficientword_net-0.0.1a2.tar.gz |
|---|---|
| Size | 18.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0aeb6fe89ef8859437184b9cbc4bdbbba9366c951b67c740b3dff846d8c0144e
|
|
BLAKE2b-256 checksum How to use checksums |
d074d1165ae89eccd3c65e061dad0a793dfb42ba6fbc7652447ec63a90d06017
|
| 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_efficientword_net-0.0.1a2-py3-none-any.whl
| Download URL | ovos_ww_plugin_efficientword_net-0.0.1a2-py3-none-any.whl |
|---|---|
| Size | 18.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c211a8292743fc45fda91c345eed16be402e33be15f2ff3f998e240b8321d574
|
|
BLAKE2b-256 checksum How to use checksums |
80e6da56911a9ca6863c6a11fbe462d97ad1cced2c132d20412dd97a6e241e41
|
| 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-efficientword-net 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.