Skip to main content
Pre-release

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

hivemind-audio-binary-protocol

Binary audio plugin for hivemind-core.

The plugin adds server-side WakeWord detection, VAD, STT, and TTS to a hivemind-core hub. Lightweight satellites, such as hivemind-mic-satellite, stream raw audio to the hub and receive transcriptions or synthesized speech. The satellites do not run those models locally.

This plugin replaces the old "HiveMind-listener" proof-of-concept.

Where it fits

hivemind-core
  └── hivemind-plugin-manager  (BinaryDataHandlerFactory loads plugins by entry-point)
        └── hivemind-audio-binary-protocol  ← this repo
              ├── ovos-simple-listener  (WakeWord + VAD + STT pipeline)
              └── OVOSTTSFactory / OVOSSTTFactory / OVOSVADFactory / OVOSWakeWordFactory

The plugin registers under the hivemind.binary.protocol entry-point group as hivemind-audio-binary-protocol-plugin.

Install

pip install hivemind-audio-binary-protocol

You also need OVOS STT, TTS, VAD, and WakeWord plugins. Install them as you would in a standard OVOS setup:

pip install ovos-stt-plugin-server ovos-tts-plugin-piper ovos-vad-plugin-silero \
            ovos-ww-plugin-precise-lite

Quickstart

Add the binary_protocol block to ~/.config/hivemind-core/server.json:

{
  "binary_protocol": {
    "module": "hivemind-audio-binary-protocol-plugin",
    "hivemind-audio-binary-protocol-plugin": {
      "stt": {
        "module": "ovos-stt-plugin-server",
        "ovos-stt-plugin-server": {"url": "https://stt.openvoiceos.org"}
      },
      "tts": {
        "module": "ovos-tts-plugin-piper",
        "ovos-tts-plugin-piper": {"voice": "en_US-lessac-medium"}
      },
      "vad": {
        "module": "ovos-vad-plugin-silero"
      },
      "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"
        }
      }
    }
  }
}

Then start hivemind-core with the listen subcommand:

hivemind-core listen

Audio streaming modes

This plugin handles three binary audio flows:

Mode Client sends Hub returns Use case
Microphone stream Raw PCM audio chunks Bus messages (wakeword/utterance events) Mic satellite. The hub runs the full pipeline.
STT transcription Raw PCM audio recognizer_loop:transcribe.response Client wants a transcription without triggering skills.
STT handle Raw PCM audio Triggers recognizer_loop:utterance on the bus Client wants the hub to handle the utterance.

The bus triggers TTS (speak:synth or speak:b64_audio) and returns binary WAV audio or a Base64-encoded string to the client.

Configuration reference

The plugin's config block mirrors the OVOS plugin config convention. Each sub-plugin (stt, tts, vad) takes its standard OVOS config:

Key Description
stt STT plugin config. module selects the OVOS STT plugin.
tts TTS plugin config. module selects the OVOS TTS plugin.
vad VAD plugin config. module selects the OVOS VAD plugin.
wake_word WakeWord name (key into hotwords).
hotwords Dict of wakeword configurations, keyed by wakeword name.
utterance_transformers List of OVOS utterance transformer plugin names.
dialog_transformers List of OVOS dialog transformer plugin names.
metadata_transformers List of OVOS metadata transformer plugin names.

If the config block is omitted, the plugin falls back to reading mycroft.conf (the standard OVOS configuration file) to select plugins.

Access control

This plugin respects hivemind-core's per-client allowed_types whitelist. Clients must have the correct access to send binary audio or receive TTS output.

Related projects

License

Apache License 2.0. See LICENSE.

Docs

Download files

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

Source Distribution

hivemind_audio_binary_protocol-2.1.7a1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file hivemind_audio_binary_protocol-2.1.7a1.tar.gz.

File metadata

File hashes

Hashes for hivemind_audio_binary_protocol-2.1.7a1.tar.gz
Algorithm Hash digest
SHA256 ed8a3f994dcf81d19da9040c38a6efa559b098a56b6dc2d0e6bcb18451ba364e
MD5 65a63d2a63f36b4cc55cdc493760fbf2
BLAKE2b-256 1d071c5752d17533fc8087c8ba71b66e6951063a20f936ff7949ced3899bdaab

See more details on using hashes here.

File details

Details for the file hivemind_audio_binary_protocol-2.1.7a1-py3-none-any.whl.

File metadata

File hashes

Hashes for hivemind_audio_binary_protocol-2.1.7a1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ee7fe26a5b106b9bc923e6a709fc72266213bae17f0d15d962aa8b3d51be640
MD5 6b66cd3a11127da2cc9f0e1fb90784c9
BLAKE2b-256 cbbe5e565102f5007097e90c506488e49530628b361743ad2f2c4243663952a6

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