OpenVoiceOS Transcription Validator Plugin
Project description
OVOS Transcription Validator Plugin
A plugin for OVOS that uses an OpenAI-compatible Large Language Model (LLM) to validate transcriptions from speech-to-text (STT) before they are processed by your voice assistant.
It helps filter out garbled, nonsensical, or incomplete utterances—reducing confusion and improving the accuracy of downstream skills.
Features
- Multilingual transcription validation
- Powered by OpenAI-compatible LLMs (e.g., OpenAI API, Ollama, custom servers)
- Filters out invalid utterances before processing
- Optional feedback via error sound or dialog
- Fully configurable, with per-request overrides
How It Works
- The plugin receives an STT transcription and language code.
- A structured prompt with examples is sent to the configured OpenAI-compatible LLM API.
- The LLM responds with True (valid) or False (invalid).
- If invalid:
- The utterance is canceled.
- Optionally, a dialog prompt or error sound is triggered.
Installation
pip install ovos-transcription-validator-plugin
Configuration
Add the plugin to the utterance_transformers section of your mycroft.conf.
The plugin defaults to using https://llama.smartgic.io/v1 with qwen2.5:7b and a placeholder API key sk-xxxx.
{
"utterance_transformers": {
"ovos-transcription-validator-plugin": {
"api_url": "https://llama.smartgic.io/v1",
"api_key": "sk-xxxx",
"model": "qwen2.5:7b",
"prompt_template_system": "/path/to/system_template.txt",
"prompt_template_user": "/path/to/user_template.txt",
"error_sound": true,
"mode": "ignore"
}
}
}
Available Settings
| Key | Description | Default Value |
|---|---|---|
| api_url | The URL of your OpenAI-compatible LLM API endpoint. | https://llama.smartgic.io/v1 |
| api_key | Your API key for the LLM service. Set to null or omit if no key is required (e.g., some local Ollama setups). | sk-xxxx (placeholder) |
| model | The name of the LLM model to use (e.g., qwen2.5:7b, gpt-3.5-turbo, gemma3:1b). | qwen2.5:7b |
| prompt_template_system | (Optional) Path to a .txt file to override the default system prompt for the LLM. | (internal default) |
| prompt_template_user | (Optional) Path to a .txt file to override the default user prompt template for the LLM. | (internal default) |
| error_sound | true to play a sound on error, false to disable, or a string path to a custom sound file. | false |
| mode | reprompt to ask the user to repeat the utterance, or ignore to silently cancel the invalid input. | ignore |
| max_tokens | Maximum number of tokens for the LLM's response. | 3 |
| temperature | LLM generation temperature. Lower values (e.g., 0.0) make the output more deterministic (good for True/False responses). | 0.0 |
| top_p | LLM sampling parameter. | 0.2 |
| stop_token | A list of strings that, if encountered, will cause the LLM to stop generating further tokens. | ["\n", " "] |
| api_timeout | Timeout in seconds for the LLM API request. | 10 |
Requirements & Notes
- Requires an OpenAI-compatible LLM API endpoint to be accessible ( e.g., OpenAI API, Ollama running locally, or another custom server).
- You must have a supported model already available on your chosen LLM server.
- The plugin can adapt to different languages based on the LLM's capabilities and training.
Feedback & Contributions
Found a bug or want to contribute? PRs and issues are welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ovos_transcription_validator_plugin-0.1.1a1.tar.gz.
File metadata
- Download URL: ovos_transcription_validator_plugin-0.1.1a1.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
345928767af405e93448c4f748d698102ec74ba678f4ad83dad0870ed7e8d03a
|
|
| MD5 |
1b52e654749f4fdc66e4e749b4b6331a
|
|
| BLAKE2b-256 |
a424dd6fc96e8e6dcf616f23bf00ddde60f8e0c9075886ad3352821e219b7c49
|
File details
Details for the file ovos_transcription_validator_plugin-0.1.1a1-py3-none-any.whl.
File metadata
- Download URL: ovos_transcription_validator_plugin-0.1.1a1-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e17a14157ac1512d4888450b3ed1f2dae603fc09fb40e464f2a2b409be51557
|
|
| MD5 |
2bf3133625d4a89a5831dba90cf680fc
|
|
| BLAKE2b-256 |
259860f53feb893da233b2b82f1320576cf3adf7edf37bd681dfc2c815ca3abb
|