Skip to main content

Wyoming Server for OpenVoiceOS Wake Word plugins

Project description

Wyoming OVOS Wake Word Bridge

MIT License Python Wyoming OVOS

Expose OpenVoiceOS wake word (hotword) plugins as a Wyoming protocol wake service for use with Home Assistant, Rhasspy, and other Wyoming-compatible voice pipelines.

                         ┌──────────────────────────────────────┐
  Wyoming client         │      wyoming-ovos-wakeword            │
  (Home Assistant,       │                                      │
   Rhasspy, etc.)        │  ┌────────────────────────────────┐  │
                         │  │ OVOSWakeWordEventHandler       │  │
  Detect(names) ────────►│  │                                │  │
  AudioStart ───────────►│  │ load_wakewords(names) ─────────►│  OVOSWakeWordFactory
  AudioChunk* ──────────►│  │ HotWordEngine.update(chunk)    │  └──> Hotword plugins
                         │  │ HotWordEngine.found_wake_word()│  │
  Detection ◄────────────│  │                                │  │
  AudioStop ────────────►│  │ (if no detection)              │  │
  NotDetected ◄──────────│  │                                │  │
                         │  └────────────────────────────────┘  │
  Describe ─────────────►│  Info(wake=[WakeProgram(...)])       │
  Info ◄─────────────────│                                      │
                         └──────────────────────────────────────┘

Features

  • Multiple simultaneous wake words — Clients select which models to activate via the Detect event
  • Lazy model loading — Hotword engines are loaded on demand and cached per connection
  • All configured hotwords advertised — Every entry under hotwords in mycroft.conf is exposed in the Wyoming Info response
  • Zeroconf / mDNS discovery — Optional service announcement on the local network
  • Error reporting — Failures are sent back as Wyoming Error events
  • Signal handling — Graceful shutdown on SIGINT/SIGTERM

Installation

From PyPI

pip install wyoming-ovos-wakeword

You also need to install the OVOS wake word engine(s) you intend to use, e.g.:

pip install ovos-ww-plugin-precise-lite
pip install ovos-ww-plugin-vosk

From source

git clone https://github.com/OpenVoiceOS/wyoming-ovos-wakeword.git
cd wyoming-ovos-wakeword
pip install -e .

Configuration

Wake word definitions are read from mycroft.conf under hotwords. The default active wake word (when no Detect event is received) is taken from listener.wake_word.

{
  "listener": {
    "wake_word": "hey_mycroft"
  },
  "hotwords": {
    "hey_mycroft": {
      "module": "ovos-ww-plugin-precise-lite",
      "model": "https://github.com/OpenVoiceOS/precise-lite-models/raw/master/wakewords/en/hey_mycroft.tflite",
      "expected_duration": 3,
      "trigger_level": 3,
      "sensitivity": 0.5,
      "listen": true
    },
    "hey_mycroft_vosk": {
      "module": "ovos-ww-plugin-vosk",
      "samples": ["hey mycroft"],
      "rule": "fuzzy",
      "listen": true
    },
    "wake_up": {
      "module": "ovos-ww-plugin-vosk",
      "rule": "fuzzy",
      "samples": ["wake up"],
      "lang": "en-us",
      "wakeup": true
    }
  }
}

All configured hotwords are advertised via Describe/Info and are selectable by name.

Usage

# Standard TCP server with zeroconf
wyoming-ovos-wakeword --uri tcp://0.0.0.0:7893 --zeroconf

# With custom zeroconf service name
wyoming-ovos-wakeword --uri tcp://0.0.0.0:7893 --zeroconf my-ovos-ww

# Unix socket
wyoming-ovos-wakeword --uri unix:///run/wyoming-ww.sock

# Over stdio
wyoming-ovos-wakeword

CLI Reference

Argument Required Default Description
--uri No stdio:// tcp://HOST:PORT, unix:///path, or stdio://
--zeroconf No disabled Enable mDNS/Zeroconf discovery (optional: service name, default: ovos-ww-plugin)
--debug No False Enable DEBUG-level logging
--log-format No %(levelname)s:%(name)s:%(message)s Python log format string
--version No Print version and exit

Zeroconf requires a tcp:// URI.

Wyoming Protocol

Wake word detection flow

Client → Describe
Server → Info(wake=[WakeProgram(models=[WakeModel(name="hey_mycroft", ...), ...])])

Client → Detect(names=["hey_mycroft", "wake_up"])
Client → AudioStart(rate=16000, width=2, channels=1)
       → AudioChunk (raw PCM bytes)
       → AudioChunk ...
       → Detection(name="hey_mycroft", timestamp=...)   ← on match
       → AudioChunk ...
       → AudioStop
Server → NotDetected                                  ← if no match

The connection stays open for continuous detection. Multiple detections can occur within a single audio stream. Audio is converted to 16 kHz / 16-bit / mono PCM automatically.

Supported Plugin Types

Any OVOS wake word plugin implementing HotWordEngine from ovos_plugin_manager.templates.hotwords:

  • ovos-ww-plugin-precise-lite — Mycroft Precise (TFLite)
  • ovos-ww-plugin-precise — Mycroft Precise (full)
  • ovos-ww-plugin-vosk — Vosk-based wake word
  • ovos-ww-plugin-pocketsphinx — CMU PocketSphinx
  • ovos-ww-plugin-snowboy — Snowboy (deprecated)
  • ovos-ww-plugin-openspeech — OpenSpeech
  • ovos-ww-plugin-porcupine — Porcupine

Zeroconf / mDNS Discovery

When --zeroconf is passed, the bridge announces itself on the local network. Home Assistant and other Wyoming clients can discover the service automatically without manual IP configuration. The service is registered as _wyoming._tcp.local..

Documentation

Detailed docs live in docs/:

Credits

Developed by TigreGótico for OpenVoiceOS.

NGI0 Commons Fund

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.

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

wyoming_ovos_wakeword-0.2.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

wyoming_ovos_wakeword-0.2.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file wyoming_ovos_wakeword-0.2.0.tar.gz.

File metadata

  • Download URL: wyoming_ovos_wakeword-0.2.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for wyoming_ovos_wakeword-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b57873fbf5e0f1be537b7ccbad8ea4eb592d6e592ec2f039d68a3154c2ec54d4
MD5 591327f3fd7f8eec3189396d47210998
BLAKE2b-256 cc3e6aff276160c0d6b7e6e6f37371ae7006713f3143df8a515dfb4886b95d07

See more details on using hashes here.

File details

Details for the file wyoming_ovos_wakeword-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wyoming_ovos_wakeword-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 297404e6034228120857e6eac15065a55839dc662dc4a87395b9e2cd854fdc42
MD5 dad6ac77f13fbe73864d4b6145cccf9c
BLAKE2b-256 015bb7782b5c01f5d86ffb3eeafe50ca367e35cf81bce449da57c53fb9a9aa4c

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