Pydantic models for OpenVoiceOS MessageBus messages — the typed protocol reference.
Project description
ovos-pydantic-models
Typed Pydantic v2 models for every message that flows over the OVOS MessageBus.
This package is the authoritative, machine-readable specification of the OVOS MessageBus protocol. Each message type is represented as a Pydantic model with validated fields, making it suitable for type-checking, serialization, documentation generation, and integration testing.
Installation
pip install ovos-pydantic-models
Usage
from ovos_pydantic_models import SpeakMessage, SpeakData
# Create a typed message
msg = SpeakMessage(data=SpeakData(utterance="Hello, world!", lang="en-us"))
print(msg.message_type) # "speak"
print(msg.model_dump()) # {"message_type": "speak", "data": {...}, "context": {...}}
# Roundtrip from dict (e.g. received over the bus)
raw = {"message_type": "speak", "data": {"utterance": "Hello"}, "context": {}}
restored = SpeakMessage.model_validate(raw)
print(restored.data.utterance) # "Hello"
from ovos_pydantic_models import RecognizerLoopUtteranceMessage, RecognizerLoopUtteranceData
msg = RecognizerLoopUtteranceMessage(
data=RecognizerLoopUtteranceData(utterances=["play some jazz"], lang="en-us")
)
print(msg.message_type) # "recognizer_loop:utterance"
Message Index
Messages are organized by subsystem:
Audio / TTS
| Message type | Class |
|---|---|
speak |
SpeakMessage |
mycroft.audio.service.play |
AudioServicePlayMessage |
mycroft.audio.service.pause |
AudioServicePauseMessage |
mycroft.audio.service.resume |
AudioServiceResumeMessage |
mycroft.audio.service.stop |
AudioServiceStopMessage |
mycroft.audio.queue |
MycroftAudioQueueMessage |
ovos.languages.tts |
OvosLanguagesTtsMessage |
ovos.languages.tts.response |
OvosLanguagesTtsResponseMessage |
Listener / STT
| Message type | Class |
|---|---|
recognizer_loop:utterance |
RecognizerLoopUtteranceMessage |
recognizer_loop:wakeword |
RecognizerLoopWakeWordMessage |
recognizer_loop:state.set |
RecognizerLoopStateSetMessage |
recognizer_loop:state.get |
RecognizerLoopStateGetMessage |
recognizer_loop:state.get.response |
RecognizerLoopStateResponseMessage |
mycroft.mic.mute |
MycroftMicMuteMessage |
mycroft.mic.listen |
MycroftMicListenMessage |
ovos.languages.stt |
OvosLanguagesSttMessage |
ovos.languages.stt.response |
OvosLanguagesSttResponseMessage |
opm.ww.query |
OpmWwQueryMessage |
Intent Pipeline
| Message type | Class |
|---|---|
ovos.utterance.handled |
OvosUtteranceHandledMessage |
ovos.utterance.cancelled |
OvosUtteranceCancelledMessage |
complete_intent_failure |
CompleteIntentFailureMessage |
add_context |
AddContextMessage |
remove_context |
RemoveContextMessage |
clear_context |
ClearContextMessage |
intent.service.skills.activate |
IntentServiceSkillsActivateMessage |
intent.service.skills.deactivate |
IntentServiceSkillsDeactivateMessage |
skill.converse.pong |
SkillConversePongMessage |
skill.converse.response |
SkillConverseResponseMessage |
ovos.skills.fallback.register |
OvosSkillsFallbackRegisterMessage |
ovos.skills.fallback.ping |
OvosSkillsFallbackPingMessage |
ovos.skills.fallback.pong |
OvosSkillsFallbackPongMessage |
stop:global |
StopGlobalMessage |
stop:skill |
StopSkillMessage |
mycroft.stop |
MycroftStopMessage |
mycroft.skills.abort_question |
MycroftSkillsAbortQuestionMessage |
mycroft.skills.abort_execution |
MycroftSkillsAbortExecutionMessage |
Skill Manager / Core
| Message type | Class |
|---|---|
mycroft.ready |
MycroftReadyMessage |
mycroft.skills.ready |
MycroftSkillsReadyMessage |
mycroft.skills.is_ready |
MycroftSkillsIsReadyMessage |
mycroft.skills.is_ready.response |
MycroftSkillsIsReadyResponseMessage |
mycroft.skills.list |
MycroftSkillsListMessage |
skillmanager.list |
SkillManagerListMessage |
skillmanager.deactivate |
SkillManagerDeactivateMessage |
mycroft.skills.error |
MycroftSkillsErrorMessage |
skill.settings.change |
SkillSettingsChangeMessage |
ovos.skills.settings_changed |
OvosSkillsSettingsChangedMessage |
ovos.skills.install |
OvosSkillsInstallMessage |
ovos.skills.install.failed |
OvosSkillsInstallFailedMessage |
ovos.pip.install |
OvosPipInstallMessage |
ovos.session.sync |
OvosSessionSyncMessage |
ovos.session.update_default |
OvosSessionUpdateDefaultMessage |
OCP (Common Play)
| Message type | Class |
|---|---|
ovos.common_play.query |
OvosCommonPlayQueryMessage |
ovos.common_play.query.response |
OvosCommonPlayQueryResponseMessage |
ovos.common_play.announce |
OvosCommonPlayAnnounceMessage |
ovos.common_play.player.state |
OvosCommonPlayPlayerStateMessage |
ovos.common_play.skills.detach |
OvosCommonPlaySkillsDetachMessage |
ovos.common_play.register_keyword |
OvosCommonPlayRegisterKeywordMessage |
ovos.common_play.skill.play |
OvosCommonPlaySkillPlayMessage |
Common Query
| Message type | Class |
|---|---|
question:query |
QuestionQueryMessage |
question:query.response |
QuestionQueryResponseMessage |
GUI / Homescreen
| Message type | Class |
|---|---|
homescreen.manager.app |
HomescreenManagerAppMessage |
Key Types
from ovos_pydantic_models import (
# Base
OpenVoiceOSMessage, MessageContext, Session,
# Enums
UtteranceState, ListeningState,
MediaType, PlaybackType, PlayerState, MediaState, MatchConfidence,
OcpMediaState, # IntEnum 0-8 (Qt QMediaPlayer states)
FallbackMode, ConverseMode, CQSMatchLevel,
# Data models
MediaEntry, Playlist, PluginStream,
)
Module Structure
ovos_pydantic_models/
message.py # OpenVoiceOSMessage base, MessageContext
session.py # Session, UtteranceState, IntentContextManager
audio/
playback.py # Speak, AudioService messages
ocp.py # OcpMediaState (Qt IntEnum)
opm.py # OPM TTS query/response messages
listener/
recognizer_loop.py
opm.py # OPM STT/WW query messages
intents/
core.py # context, utterance handled, intent get
converse.py # converse protocol (canonical)
fallbacks.py # fallback protocol (canonical)
stop.py # stop messages
skills/
ocp.py # OCP enums, MediaEntry, query messages
game.py # game skill messages
common_query.py # question:query protocol
converse.py # re-exports from intents/converse.py
fallback.py # re-exports from intents/fallbacks.py
core/
skill_manager.py # skill lifecycle messages
skill_settings.py
skill_installer.py
session.py # session sync messages
gui/
homescreen.py
phal/
connectivity.py
volume.py
License
Apache 2.0 — see LICENSE
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_pydantic_models-0.1.1.tar.gz.
File metadata
- Download URL: ovos_pydantic_models-0.1.1.tar.gz
- Upload date:
- Size: 95.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d1124d5e7bf58ecdb119536fd8d370ec7e5a996b6a35455c19d3cb8409df61a
|
|
| MD5 |
1ae3631841ff833d51d0cf7120e2be3c
|
|
| BLAKE2b-256 |
9bb4717ee39f42e3aa681af84d5d60c0eb71f5a3cba4e4e62a5300d918ad1756
|
File details
Details for the file ovos_pydantic_models-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ovos_pydantic_models-0.1.1-py3-none-any.whl
- Upload date:
- Size: 121.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b168663530bdfc6278794a409579fb187b26a3c7b18320dc31a49803215410da
|
|
| MD5 |
d234b7423c13058f6fff2c657c1d024d
|
|
| BLAKE2b-256 |
3d54d4a51c4800e35dc8fd7dfeb37882b5279431346d190c84056b2f4ef60ad7
|