Skip to main content

OpenVoiceOS Utterance Cancel Plugin

Project description

ovos-utterance-plugin-cancel

PyPI License

An OpenVoiceOS utterance transformer plugin that cancels an utterance when the user says a cancel/nevermind phrase at the end.

Example: "Hey Mycroft, can you tell me the weather in… ugh, nevermind that" → utterance is dropped, no skill fires.

Installation

pip install ovos-utterance-plugin-cancel

How it works

The plugin runs before skill matching. It checks whether the utterance tail matches any phrase from locale/<lang>/cancel.intent. On a match, it returns an empty utterance list with context {"canceled": True, "cancel_word": "<phrase>"}.

Language selection is automatic via langcodes.closest_match. Phrases support bracket-expansion syntax (e.g. cancel (it|that)).

Supported languages

ca-ES · da-DK · de-DE · en-US · es-ES · fr-FR · gl-ES · it-IT · nl-NL · pt-BR · pt-PT

To add a language, create ovos_utterance_plugin_cancel/locale/<lang>/cancel.intent with one phrase per line.

Configuration

This plugin is enabled by default in ovos-config alongside the other standard utterance transformers:

"utterance_transformers": {
    "ovos-utterance-normalizer": {},
    "ovos-utterance-plugin-cancel": {},
    "ovos-utterance-corrections-plugin": {}
}

To disable it, add "enable": false to your config:

"utterance_transformers": {
    "ovos-utterance-plugin-cancel": {"enable": false}
}

Development

git clone https://github.com/OpenVoiceOS/ovos-utterance-plugin-cancel
cd ovos-utterance-plugin-cancel
uv pip install -e ".[dev]"
uv run pytest test/ -v --cov=ovos_utterance_plugin_cancel

Credits

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

ovos_utterance_plugin_cancel-0.2.8a1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

ovos_utterance_plugin_cancel-0.2.8a1-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file ovos_utterance_plugin_cancel-0.2.8a1.tar.gz.

File metadata

File hashes

Hashes for ovos_utterance_plugin_cancel-0.2.8a1.tar.gz
Algorithm Hash digest
SHA256 31aabc550704d708341b1acf5dd9638159ba2289b13adfba0928a9521e9c2c16
MD5 0852577d090267f912dfc99c2478347a
BLAKE2b-256 499387d2a2f716b3179ffab51fc979b94eae6fad50c62795a221536dff99b94d

See more details on using hashes here.

File details

Details for the file ovos_utterance_plugin_cancel-0.2.8a1-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_utterance_plugin_cancel-0.2.8a1-py3-none-any.whl
Algorithm Hash digest
SHA256 590cf0ff2067c3dd94ff4c2dfa600b2aa89ae70e7c358d73d37373f354c03020
MD5 300d90896a0150a6ab564adaf390a077
BLAKE2b-256 f6f1fcb903c3b56095c06129f5277a3fdb0e0510ec62892910d425142114a7c1

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