Skip to main content
Pre-release

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

OVOS Simple Listener

ovos-simple-listener is a lightweight alternative to ovos-dinkum-listener. It handles wake word detection, voice activity detection (VAD), and speech-to-text (STT) transcription for the Open Voice OS (OVOS) framework.

It was built to power hivemind-listener and hivemind-mic-satellite. You can also use it in place of ovos-dinkum-listener in your OVOS setup.

At around 150 lines of code, this repo is a clean reference for how to use OVOS audio plugins in your own applications.

Features

  • Wake Word Detection: supports customizable wake word engines to start listening.
  • Voice Activity Detection (VAD): detects silence and speech to optimize audio processing.
  • Speech Recognition: uses various speech-to-text (STT) engines to transcribe audio input.
  • Callback System: gives a flexible callback mechanism to handle state changes and processed audio.
  • Multithreading Support: runs in a separate thread so it does not block the main application flow.

This repo is lighter than ovos-dinkum-listener, so it is also missing some features:

  • Audio Transformer plugins
  • Continuous Listening
  • Hybrid Listening
  • Recording Mode
  • Sleep Mode
  • Multiple WakeWords

Installation

Install ovos-simple-listener with pip:

pip install ovos-simple-listener

OVOS Usage

Run ovos_simple_listener/__main__.py in place of ovos-dinkum-listener. Plugins are selected from the default OVOS config at ~/.config/mycroft/mycroft.conf.

Library Usage

Initialize ovos-simple-listener with the components you want (microphone, STT, VAD, and wake word), as shown below.

from ovos_simple_listener import SimpleListener
from ovos_plugin_manager.microphone import OVOSMicrophoneFactory
from ovos_plugin_manager.stt import OVOSSTTFactory
from ovos_plugin_manager.vad import OVOSVADFactory
from ovos_plugin_manager.wakewords import OVOSWakeWordFactory

listener = SimpleListener(
    mic=OVOSMicrophoneFactory.create(),
    vad=OVOSVADFactory.create(),
    wakeword=OVOSWakeWordFactory.create_hotword("hey_mycroft"),
    stt=OVOSSTTFactory.create()
)

listener.run()

Callbacks

You can add your own callbacks by extending the ListenerCallbacks class. Use it to handle events such as starting a command, ending listening, processing audio, errors, and recognizing text.

from ovos_simple_listener import ListenerCallbacks

class MyCallbacks(ListenerCallbacks):
    @classmethod
    def listen_callback(cls):
        # Handle when the listener starts processing a command
        pass

    @classmethod
    def end_listen_callback(cls):
        # Handle when the listener stops processing a command
        pass

    @classmethod
    def audio_callback(cls, audio):
        # Handle processed audio data
        pass

    @classmethod
    def error_callback(cls, audio):
        # Handle STT errors
        pass

    @classmethod
    def text_callback(cls, utterance, lang):
        # Handle recognized text
        pass

Related Projects

See docs/index.md for a full overview, and docs/architecture.md for the pipeline architecture in detail.

Contributing

Contributions are welcome. Open an issue or submit a pull request for any improvements or bug fixes.

Acknowledgements

License

This project is licensed under the terms in LICENSE.

Download files

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

Source Distribution

ovos_simple_listener-0.3.1a2.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

ovos_simple_listener-0.3.1a2-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file ovos_simple_listener-0.3.1a2.tar.gz.

File metadata

  • Download URL: ovos_simple_listener-0.3.1a2.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ovos_simple_listener-0.3.1a2.tar.gz
Algorithm Hash digest
SHA256 b602bd49ba5c253cf302bea06e3a5956319dc5d7e43473839d6df544d210cd53
MD5 e87965a2f55ab007fce388752fe953bf
BLAKE2b-256 59af58ecb7281d4b03acec0f5c015a644a535c5de9074416e157f8629efd8901

See more details on using hashes here.

File details

Details for the file ovos_simple_listener-0.3.1a2-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_simple_listener-0.3.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 b20323da477502aa1a47a289821079be6a311d80bbc82657ebc9285a5b27d2bb
MD5 3d5a08865884df6288b9c381bf031e61
BLAKE2b-256 6fe996f24b9c04b4e52eae4e87c8e1b268f57d2b964161b47ca296e88ae61883

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