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.11a1.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.11a1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ovos_ww_plugin_vosk-0.1.11a1.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.11a1.tar.gz
Algorithm Hash digest
SHA256 552c1846fed1c83284b10b5a6b7405c5584cac4e4cf386592a5a77cce2503582
MD5 bc0d39c7f719c40c1830b2e17c886c94
BLAKE2b-256 e5879ff61747004604d88773b291a2c70891ae304751e0b5c20e522a17696c18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ovos_ww_plugin_vosk-0.1.11a1-py3-none-any.whl
Algorithm Hash digest
SHA256 5925afe06524c7efc2a9eaf4849d14ceac230083097007210cd6d0f655673f83
MD5 f39224fe02804c1542b7d897920e3652
BLAKE2b-256 0fd964f46678a88da01d40ae2730756c5e41aee829acf919e06bf35d21852acf

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