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.

Metadata

Release files for ovos-simple-listener 0.3.2a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ovos-simple-listener 0.3.2a2
File Size Uploaded
ovos_simple_listener-0.3.2a2.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ovos-simple-listener 0.3.2a2
File Interpreter ABI Platform
ovos_simple_listener-0.3.2a2-py3-none-any.whl Python 3 none any Details

Total release size: 20.4 kB

Release files / ovos_simple_listener-0.3.2a2.tar.gz

Download URL ovos_simple_listener-0.3.2a2.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
071e62339a3c3af30c14a944c3c4893f72f070ded3fe7bc801927bf3a480ef9c
BLAKE2b-256 checksum
How to use checksums
5b845c3a61cce8afab3d2766b4e799e27d96f580ea690f45af73989762802af1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / ovos_simple_listener-0.3.2a2-py3-none-any.whl

Download URL ovos_simple_listener-0.3.2a2-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5fbad8f22527dbf1774c50020d14dbe8759a07f8da53f3ffe69efd491313461
BLAKE2b-256 checksum
How to use checksums
40fa78d7b846276620cf2c93f0a3ffd81a5e178671521398d158767cd6b7d4e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page