Skip to main content

Kaldi/Vosk wake word plugin for OpenVoiceOS

Project description

Description

Mycroft wake word plugin for Vosk

Install

pip install ovos-ww-plugin-vosk

Configuration

Quick start

Add the following to your 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 and thats all!

a model wil be automatically downloaded for configured language

Single Keyword

Some wake words are hard to trigger, usually if missing from the language model, eg, hey mycroft is usually transcribed as hey microsoft, by default this plugin will check for the wake word name, but the keyword can be configured in a number of ways

  • model_folder- full path to a vosk model, optional, will be automatically downloaded
  • lang - lang code for model, optional, will use global value if not set. only used to download models
  • debug - if true will print extra info, like the transcription contents
  • rule - how to process the transcript for detections, see examples 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 transcriptions, if false (default) vosk will run in keyword mode
  • samples - list of samples to match the rules against, optional, by default uses 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 - if the transcript contains any of provided samples
  • equals - if the transcript exactly matches any of provided samples
  • starts - if the transcript starts with any of provided samples
  • ends - if the transcript ends with any of provided samples
  • fuzzy - fuzzy match transcript against samples

TIP: enable debug flag and check logs for what is being transcribed, then finetune the rule and samples

Each wake word must fit in 3 seconds, which is the length of audio the model parses at a time

You can try to improve performance by tweaking time_between_checks, Lower values will decrease performance, higher values will decrease accuracy, default value is 1.0

set full_vocab to transcribe all known words before applying detection rules, by default this is false and the plugin will only look for the wake word samples, depending on wake word this may improve or decrease accuracy

Multiple keywords

A single model per language can be used to 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"}
        }
    }

Project details


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.11a2.tar.gz (14.2 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.11a2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ovos_ww_plugin_vosk-0.1.11a2.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ovos_ww_plugin_vosk-0.1.11a2.tar.gz
Algorithm Hash digest
SHA256 0bb71fc3f79c6d387331d633e6611b0bffca67b939df28383a66c9f518aec58d
MD5 07617d4ce0f021c34194af9e528f2d7c
BLAKE2b-256 62a90ad75e5515fe3bce7521cd1f2ec301a43db941ae7bed1662cd96ebeffc27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ovos_ww_plugin_vosk-0.1.11a2-py3-none-any.whl
Algorithm Hash digest
SHA256 dac92d2c10caa40a80d3dbe44e8e31f59fd72d931f265e65f3ba68dd4f251ddd
MD5 5fd789340e5cb5412a4c581c4a44468d
BLAKE2b-256 3a232502f585f2f808d34684172b52dd605aaf6958e16e16ead3befc9b98f2ed

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 Pingdom Monitoring Sentry Error logging StatusPage Status page