Skip to content

The OCP Audio Plugin (ovos-plugin-common-play)

In a nutshell

OCP ("OVOS Common Play") is the voice media player behind "play some jazz" or "play the news". It ships as a plugin for the old audio service: the package ovos-plugin-common-play, which registers as an audio backend called ovos_common_play. This is the default way OVOS plays media. It still works and is enabled out of the box, but it is legacy: a dedicated replacement, ovos-media, is being built to take over the playback job. This page explains what the OCP audio plugin is, why it lives inside the audio service, and how ovos-media will replace it. For the intent side of OCP (deciding that "play X" is a media request) see the OCP Pipeline; for the skills that supply results see Media Skills.

What OCP means here

"OCP" names three different things in OVOS. Know which one a page is about:

  • The OCP pipeline plugin: matches utterances like "play some jazz" to a media request. See OCP Pipeline.
  • The OCP skill base class: OVOSCommonPlaybackSkill; skills built on it provide or embody media for the pipeline to find. See OCP Skills.
  • The legacy OCP audio plugin: ovos-plugin-common-play, the current default playback engine running inside ovos-audio. See The OCP Audio Plugin.

What it is

The OCP audio plugin is OCP packaged as a classic audio service backend. The pieces:

  • Package / repo: ovos-ocp-audio-plugin (PyPI name ovos-plugin-common-play, import name ovos_plugin_common_play).
  • Entry point: registers in the legacy mycroft.plugin.audioservice group under the type name ovos_common_play.
  • What it does: the full OCP player. It receives the chosen media (search results gathered by the OCP pipeline from OCP skills), then:
  • manages the now-playing queue and player state,
  • runs stream extractors,
  • exposes the player over MPRIS, and
  • drives the actual audio output through a lower-level audio backend (mpv, vlc, or simple in the shipped default order).
flowchart TD
    A["OCP pipeline / skills<br/>search results"] --> B["OCP audio plugin"]
    B --> C["Queue +<br/>player state"]
    C --> D["Stream extractors"]
    D --> E["MPRIS"]
    D --> F["Audio backend<br/>mpv / vlc / simple"]

Diagram: The flow starts at OCP pipeline and skill search results and ends at playback, and the stream extractors branch output to either MPRIS or the mpv/vlc/simple audio backend.

OCP is a coordinator, not an audio codec: it does the voice/queue/MPRIS logic and then hands the raw stream to one of the simple audio backends to make sound.


Background: why OCP is an "audio service plugin"

OCP predates OVOS as a standalone project. It was first built for mycroft-core, which was not extensible enough to add a real media player cleanly. At the time the only way to intercept playback requests (and to sync with the GUI for things like video) was the audio service, which had one job (play a sound file) and loaded small audio backend plugins (a VLC backend, an mpv backend) to do it. The only extension point for "something that plays media" was therefore the mycroft.plugin.audioservice group.

So OCP was bolted on as a hack: it registered itself as the audio backend (the ovos_common_play type, set as the default backend), captured every playback request, and then delegated the actual sound output back to a real audio backend. Messy, but it slotted into the machinery that existed. The result was a monolith: a single plugin doing everything, including NLP/intent matching, cross-skill search, the player state machine, and MPRIS.

Since OVOS became its own project that monolith has been split apart, repo by repo, and properly integrated into OVOS: intent matching moved to the OCP pipeline, stream resolution to stream-extractor plugins, shared types to ovos-utils, and so on. ovos-media is the final step. It gives the media player itself a proper home as a standalone service instead of masquerading as an audio backend inside ovos-audio.

This is media playback, not TTS/sound playback

The OCP audio plugin (and the ovos-media daemon that replaces it) handles media playback only: music, podcasts, video, streams. The spoken-response and sound-effect playback queue inside ovos-audio is a separate subsystem that is unaffected: turning OCP off (or switching to ovos-media) does not change how TTS or notification sounds are played.


Status today: legacy, but the default

The OCP audio plugin is still the default media playback path:

  • It is installed as part of ovos-audio's media extra (ovos_plugin_common_play[extractors]), so most installs already have it.
  • The default config ships with "enable_old_audioservice": true, which turns on the old audio service that loads OCP.
  • In the default config the "OCP" backend (type: ovos_common_play) is active.

So unless you have explicitly switched to ovos-media, your OVOS device is playing media through this plugin.

Legacy: bug fixes only, no new features

ovos-ocp-audio-plugin still receives bug fixes, but no new functionality — active development goes into ovos-media. Recent fixes worth knowing about if you rely on this plugin: skipping backwards through a shuffled queue no longer re-shuffles the remaining tracks, and stream URLs carrying an auth token are redacted before they are written to the log.

Upcoming: breaking

This legacy audioservice subsystem, including the OCP backend described on this page, is planned for removal from ovos-audio entirely. Media playback will then live wholly in ovos-media. Plan a migration if you have not already switched.


Configuration

OCP is configured as a backend under the Audio section of mycroft.conf:

{
  "enable_old_audioservice": true,
  "Audio": {
    "backends": {
      "OCP": {
        "type": "ovos_common_play",
        "preferred_audio_services": ["mpv", "vlc", "simple"],
        "dbus_type": "session",
        "manage_external_players": false,
        "active": true
      }
    }
  }
}
  • preferred_audio_services: order in which OCP picks a lower-level audio backend to actually emit sound. The shipped mycroft.conf sets ["mpv", "vlc", "simple"], which is what every install uses (the plugin source carries an unused OCPPluginConfig dict with a different list, dead code that is never merged into the runtime config).
  • dbus_type / MPRIS keys: see MPRIS below.

default-backend must not be "OCP"

The audio service's default-backend selects the backend for plain speak/audio output (it defaults to mpv). OCP installs itself as the OCP backend, but "OCP" is not a valid default-backend value. It only appears in backends for legacy reasons. Leave default-backend as mpv (or another simple backend).


MPRIS

OCP exposes the player over MPRIS (the standard Linux D-Bus media-control interface), so phones, desktops, and physical media keys can see and control playback. With manage_external_players enabled, OCP can also reach the other direction: voice-controlling third-party MPRIS apps (Spotify, a browser) and pausing them when OCP starts its own playback.


Standalone mode

Normally OCP is started by ovos-audio. The package also ships an ovos-ocp-standalone console script to run OCP as its own process, reading the usual ~/.config/mycroft/mycroft.conf. This is useful in distributed setups, e.g. running OCP at a HiveMind Core rather than on a satellite, since the satellite cannot register OCP's intents.


How ovos-media replaces it

ovos-media is the final step of the decomposition described above and the upcoming, opt-in replacement for this plugin. With the NLP, search, and extraction layers already split out into their own repos, what remains is the player itself. Instead of cramming it into the audio service, ovos-media gives it a dedicated media daemon with a cleaner design:

OCP audio plugin (legacy, default) ovos-media (upcoming)
Where it runs Inside ovos-audio as a mycroft.plugin.audioservice backend Its own service/daemon
Player plugins One bundled player; delegates to mpv/vlc/simple audio backends Typed plugins on opm.media.audio / opm.media.video / opm.media.web (see Media Playback)
Video / web Limited Dedicated audio and video and web players
Status Enabled by default Opt-in

What stays the same: the search layer is shared. The OCP pipeline (intent matching) and OCP skills (media providers) are used by both. Only the playback backend changes. ovos-media no longer carries a mycroft.audio.service.* bridge of its own (its LegacyAudioServiceCompat shim was dropped in 1.0.0a1): clients on the old topics are served by the legacy ovos-audio/OCP stack, and the OCP pipeline plugin's own fallback, not by the ovos-media daemon.

To switch to ovos-media: set "enable_old_audioservice": false in mycroft.conf and run the ovos-media daemon. See the ovos-media page for the full setup and the list of player plugins.

The full switch touches two config keys: turning the legacy audio service's OCP backend off, and making sure the OCP intent pipeline (which both backends share) is still enabled in ovos-core:

{
  "enable_old_audioservice": false,
  "intents": {
    "pipeline": [
      "ovos-ocp-pipeline-plugin-high",
      "...",
      "ovos-ocp-pipeline-plugin-medium",
      "..."
    ]
  }
}

Don't run both at once

enable_old_audioservice: true (OCP) and a running ovos-media daemon both want to own media playback. Pick one. When ovos-media is in use, the OCP backend config above does nothing.


Source code: OpenVoiceOS/ovos-ocp-audio-plugin.


Read next: OCP Extractors Related: Media Playback Plugins · OCP Pipeline · Media Skills (OCP) · ovos-media