Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

OCP Pipeline

The OCP (Open Common Play) pipeline plugin turns media utterances into playback actions in OVOS. Utterances such as "play metallica", "put on some movie", "pause", or "next" pass through this plugin as an intent pipeline stage. On a match, the plugin searches registered media skills over the message bus and drives playback through the OCP API.

The plugin exposes two entry points under the opm.pipeline group:

  • ovos-ocp-pipeline-plugin (OCPPipelineMatcher), the main pipeline. It matches play, open, media_stop, next, prev, pause, resume, save_game, and load_game intents at high, medium, or low confidence.
  • ovos-ocp-pipeline-plugin-legacy (MycroftCPSLegacyPipeline), a bridge for older Mycroft CommonPlay skills, using the play:query / play:query.response / play:start handshake.

OCPPipelineMatcher also classifies media type, such as music, movie, or podcast. It extracts named entities with ahocorasick-ner, using per-language vocabulary files and optional user-supplied entity CSVs (the entity_csvs config option). It tracks player state per session through an OCPPlayerProxy, kept in sync with ovos.common_play.status and track.state bus events.

Architecture

image

image

Media classification

Media-type classification, the rich provider-ready descriptive Signals, and the content filter are all delegated to the standalone ovos-media-classifier. The pipeline builds the classifier's two context inputs from its own state — the per-session now-playing PlayerStatus and the skill-registered entities (ner_list) — so relative control follow-ups ("next", "pause", "something else") and entity routing work, and it forwards the classifier's lossless mediavocab.Signals (medium / playback_type / content_genres / content_form / programme_format / variant_kind / accessibility / picture_format) to the MediaProviders alongside the legacy media_type.

With no extra configuration the lean keyword (.voc) backend is used — the zero-ML-dependency floor (all heavy backends OFF, online OFF, adult content blocked). The classifier is configured under the pipeline config (or a nested media_classifier block); every key is optional.

Backend selection

Key Default Description
media_classifier_plugin unset name of an external opm.media.classifier entry-point plugin to load
media_classifier_onnx_model unset path to an opt-in ONNX trained bundle (requires the [onnx] extra)
media_classifier_embedding_router unset path to a learned embedding-router bundle (requires the [onnx] extra)
media_classifier_embedding_router_hybrid true run the router as a keyword+router hybrid (false = router standalone)

On any failure (missing extra, bad bundle, unknown plugin) the classifier falls back to the keyword backend, so the zero-ML default is always preserved.

Gazetteer / entity library (embedding-router backend only)

Key Default Description
media_classifier_gazetteer true inject the bundled offline gazetteer of common real titles so bare titles route without a network call
media_classifier_gazetteer_size classifier default cap on titles per media type
media_classifier_entity_library unset {label: [titles]} of the user's own media library, injected at runtime (no retraining)

Online metadata layer (embedding-router hybrid only)

Key Default Description
media_classifier_online_metadatarr false opt into the online metadatarr last-resort layer (adds latency)
media_classifier_online_timeout 4.0 per-request timeout, seconds
media_classifier_online_min_confidence 0.5 minimum confidence to accept an online answer

Content filter (applied at routing)

Blocked content (adult by default) is never routed to providers.

Key Default Description
allow_adult_content false top-level convenience flag; true lifts the default adult block
media_content_filter.enabled true master switch for the filter
media_content_filter.blocked_genres ["adult"] genres to block
media_content_filter.blocked_media_types [] media types to block

Install

pip install ovos-ocp-pipeline-plugin

Usage

OVOS core loads this plugin automatically once installed, through the opm.pipeline entry-point group. Enable it in mycroft.conf under the intents section:

{
  "intents": {
    "ovos-ocp-pipeline-plugin": {
      "entity_csvs": []
    }
  }
}

The plugin reads the pipeline's intents config block, then falls back to a legacy OCP config block for backward compatibility.

Media providers

Besides broadcasting a search over the message bus to OCP skills, the pipeline can query MediaProvider plugins in the same process. A provider is a plain catalog: it takes a parsed request and returns candidate releases, with no bus round trip and no skill to run.

Install the whole published set with the providers extra, or pick the ones you want one at a time:

pip install ovos-ocp-pipeline-plugin[providers]
pip install ovos-media-provider-somafm ovos-media-provider-local

Nothing else is needed to register them. Each plugin declares an opm.media.provider entry point, and the pipeline instantiates every installed provider at startup. A provider that needs credentials or a reachable server, such as Spotify or Music Assistant, loads anyway and answers nothing until you configure it.

Per-provider settings live in the OCP pipeline's own config block — mycroft.conf → intents → ovos-ocp-pipeline-plugin → media_providers — keyed by the provider name as it appears in its entry point. A top-level media_providers block is honoured only when the pipeline config carries no media_providers key at all, so keep the settings in the pipeline block. Set enabled to false on a provider to skip it entirely:

{
  "media_providers": {
    "local": {"paths": ["/home/ovos/Music"]},
    "spotify": {"enabled": false}
  }
}

To turn the in-process search off altogether and go back to bus skills alone, set enabled to false on a media_providers block inside the pipeline's own config. Be aware that a media_providers block in the pipeline config replaces the top-level one as the source of per-provider settings, so keep provider settings in one place or the other:

{
  "intents": {
    "ovos-ocp-pipeline-plugin": {
      "media_providers": {"enabled": false}
    }
  }
}

Both searches run for every query that does not name a specific skill, and they run at the same time, so a search costs the slower of the two rather than both added together. Their results are pooled and ranked together. A provider answer never displaces a skill answer: the only thing dropped is a provider entry pointing at a URI a skill already offered.

A provider may declare the media types it serves. When a request names a type, only the providers that claim that type are asked, and a provider that claims nothing is asked but ranked last: its answer plays when nothing else answered, and never wins against a provider or skill that claims the type. A request that names no type asks everything and ranks everything on merit.

License

Apache-2.0

Release files for ovos-ocp-pipeline-plugin 1.5.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-ocp-pipeline-plugin 1.5.3a1
File Size Uploaded
ovos_ocp_pipeline_plugin-1.5.3a1.tar.gz 212.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ovos-ocp-pipeline-plugin 1.5.3a1
File Interpreter ABI Platform
ovos_ocp_pipeline_plugin-1.5.3a1-py3-none-any.whl Python 3 none any Details

Total release size: 434.7 kB

Release files / ovos_ocp_pipeline_plugin-1.5.3a1.tar.gz

Download URL ovos_ocp_pipeline_plugin-1.5.3a1.tar.gz
Size 212.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f0a73fba2329038a7ec94cb2ad5740c8566c4dbb58024240f649f583a0fe15f7
BLAKE2b-256 checksum
How to use checksums
b6816b3cea99a25b99ece9ce9ec8279c53029e4b42d97cbc3df3187c8ce65e2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / ovos_ocp_pipeline_plugin-1.5.3a1-py3-none-any.whl

Download URL ovos_ocp_pipeline_plugin-1.5.3a1-py3-none-any.whl
Size 222.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c02605a5fbb912f758503048eeb4ef8a9a0212db68b3665efe61f003060ec740
BLAKE2b-256 checksum
How to use checksums
33f7944e035e5ce962303795a2570f3439605f74d4c1bc9844d30a449c6d34e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.5.3a1 This release

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.0.11

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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