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.
  • 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 length of audio the model parses at a time.

time_between_checks controls how often the plugin checks the buffered audio. Lower values run more checks and use more CPU. Higher values check less often and may miss short wake words. The default is 1.0.

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"}
        }
    }

Related projects

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos_ww_plugin_vosk-0.1.11a3.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_ww_plugin_vosk-0.1.11a3-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file ovos_ww_plugin_vosk-0.1.11a3.tar.gz.

File metadata

  • Download URL: ovos_ww_plugin_vosk-0.1.11a3.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ovos_ww_plugin_vosk-0.1.11a3.tar.gz
Algorithm Hash digest
SHA256 2ffdcb600248758731bb69ea4a540b4d04143ddf5598379556804f400bf9b492
MD5 4ea08f60ab9a66df4a15212fc01a8fbf
BLAKE2b-256 97ec1af6984f5934b854e16db6f7e100cd716f675a91d8d898b192727f3cbc50

See more details on using hashes here.

File details

Details for the file ovos_ww_plugin_vosk-0.1.11a3-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_ww_plugin_vosk-0.1.11a3-py3-none-any.whl
Algorithm Hash digest
SHA256 6284e7f1ba04d8797d78e68321b4180b1df61d132380660d10a052dfd183f465
MD5 01b0f669055e0072736f64cea5b11b75
BLAKE2b-256 9aa2b28f86b67ff002aaf69bec53fcd2e2bba6405888f4dc030455e839c49d9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page