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

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.3a1

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.3a1
File Size Uploaded
ovos_simple_listener-0.3.3a1.tar.gz 9.5 kB Details

Built distribution (wheel)

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

Total release size: 20.4 kB

Release files / ovos_simple_listener-0.3.3a1.tar.gz

Download URL ovos_simple_listener-0.3.3a1.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a56ddda8ba617f1663d8fb20b94fbec64f05c1441995dba1f83f325287f14f84
BLAKE2b-256 checksum
How to use checksums
42e8930faa23ea13cd684e75e1f2c5b5814c071a303387bb988bdc297cfa9189
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.3a1-py3-none-any.whl

Download URL ovos_simple_listener-0.3.3a1-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03e488aea591a30fd35401b1cec762847a57a40b699957dfc5fa5658f9a99d17
BLAKE2b-256 checksum
How to use checksums
21aabfcc12324eb2e9f135e1db90bba2fbf9deb26a4addaf8f5be4c84cab79eb
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