Skip to main content
Pre-release

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

Description

Vosk wake word plugin for OpenVoiceOS. It uses the Vosk speech recognizer to transcribe short audio chunks and check the transcript against one or more wake word samples.

Install

pip install ovos-ww-plugin-vosk

Configuration

Quick start

Add the following to the hotwords section in mycroft.conf.

  "listener": {
    "wake_word": "hey_computer"
  },
  "hotwords": {
    "hey_computer": {
        "module": "ovos-ww-plugin-vosk",
        "listen": true
    }
  }

Replace hey_computer with your wake word. A model downloads automatically for the configured language.

Single keyword

Some wake words are hard to trigger, usually because the language model does not include them. For example, hey mycroft is often transcribed as hey microsoft. By default, this plugin checks for the wake word name, but you can configure the keyword in a number of ways.

  • model_folder - full path to a Vosk model. Optional; the plugin downloads one automatically.
  • lang - language code for the model. Optional; uses the global value if not set. Only affects which model downloads.
  • debug - if true, prints extra info, like the transcript contents.
  • rule - how to compare the transcript against the samples. See the rules below.
  • time_between_checks - the length in seconds between inferences. Must be between 0.2 and 3.
  • window_seconds - the length in seconds of the most recent audio each inference transcribes. Maximum 3. The default is the plugin's DEFAULT_WINDOW_SECONDS.
  • full_vocab - use the full model vocabulary for transcription. If false (default), Vosk runs in keyword mode.
  • samples - list of samples to match the rules against. Optional; defaults to the keyword name.
  "listener": {
    "wake_word": "hey_computer"
  },
  "hotwords": {
    "hey_computer": {
        "module": "ovos-ww-plugin-vosk",
        "listen": true,
        "full_vocab": true,
        "rule": "equals",
        "debug": true,
        "samples": ["hey computer", "a computer", "hey computed"],
        "model_folder": "/home/user/Downloads/vosk-model-small-en-us-0.4",
        "time_between_checks": 0.6
    }
  }

Keyword rules

You can define different rules to trigger a wake word.

  • contains - the transcript contains any of the samples.
  • equals - the transcript exactly matches any of the samples.
  • starts - the transcript starts with any of the samples.
  • ends - the transcript ends with any of the samples.
  • fuzzy - fuzzy match the transcript against the samples.

Enable the debug flag and check the logs to see what the plugin transcribes. Use this to tune the rule and samples.

Each wake word must fit in 3 seconds, the longest window_seconds allowed.

The plugin keeps the last window_seconds of audio. After every time_between_checks seconds of new audio, it transcribes that whole window, so a check boundary does not split a wake word. The check interval counts audio received, whatever the chunk size. Lower time_between_checks values run more checks and use more CPU. Higher values check less often and may miss short wake words. The default is 1.0. A longer window_seconds costs more CPU per check, and a window_seconds smaller than time_between_checks is raised to it. A window longer than time_between_checks catches more phrases but gives more false wake-ups on conversation than a window equal to it, which checks each stretch of audio once. After a detection the window is cleared, so one utterance triggers once.

Set full_vocab to transcribe all known words before applying the detection rules. By default this is false, and the plugin only looks for the wake word samples. Depending on the wake word, this may raise or lower accuracy.

Multiple keywords

A single model per language can check for multiple keywords at once. For example, to replace the default wake words:

  "hotwords": {
    "hey mycroft": {"active": false},
    "wake up": {"active": false},
    "hey xxx": {
        "module": "ovos-ww-plugin-vosk-multi",
        "listen": true,
        "wakeup": true,
        "keywords": {
           "hey mycroft": {"samples": ["hey mycroft", "hey microsoft", "hey minecraft"], "rule": "fuzzy"},
           "wake up": {"wakeup": true}
        }
    }

You can load any number of languages side by side.

  "hotwords": {
    "hey_xxx": {
        "module": "ovos-ww-plugin-vosk-multi",
        "listen": true,
        "full_vocab": false,
        "keywords": {
           "hey mycroft": {"samples": ["hey mycroft", "hey microsoft", "hey minecraft"], "rule": "fuzzy"},
           "hey neon": {},
           "hey computer": {},
           "hey jarvis": {},
           "computador": {"lang": "pt"},
           "jarbas": {"lang": "pt"}
        }
    }

License

Apache-2.0

Metadata

Release files for ovos-ww-plugin-vosk 0.1.13a1

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-vosk 0.1.13a1
File Size Uploaded Provenance Actions
ovos_ww_plugin_vosk-0.1.13a1.tar.gz 18.0 kB Without provenance Details for ovos_ww_plugin_vosk-0.1.13a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ovos-ww-plugin-vosk 0.1.13a1
File Interpreter ABI Platform Actions
ovos_ww_plugin_vosk-0.1.13a1-py3-none-any.whl Python 3 none any Details for ovos_ww_plugin_vosk-0.1.13a1-py3-none-any.whl

Total release size: 31.4 kB

Release files / ovos_ww_plugin_vosk-0.1.13a1.tar.gz

Download URL ovos_ww_plugin_vosk-0.1.13a1.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b629b9d2fdf4d00d79e92e20be1a1068ed89bad25b8cd93e88150aff47635bc9
BLAKE2b-256 checksum
How to use checksums
15129dc3d9751d250a1dbe63605277c7b686e2f9f3a979f57ff09f2d306d0cba
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_vosk-0.1.13a1-py3-none-any.whl

Download URL ovos_ww_plugin_vosk-0.1.13a1-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
473a1b69328d378a641e15cdf3a458a1a9b2a515c8e3d8fb413c048f57b95a16
BLAKE2b-256 checksum
How to use checksums
19077a1f12ac8b74481a5b98a14a2e42e5e706d6d31c1a58df6804bdd524b80f
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-vosk 0.1.13a1

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