Skip to main content
Pre-release

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

ovos-ocp-tts-plugin

An OCP stream extractor for text read aloud. A media entry whose uri is

tts//en-US/Once%20upon%20a%20time%2C%20there%20was%20a%20little%20mermaid.

plays as that sentence, spoken in the device's own voice.

It does not load a TTS engine of its own. It asks ovos-audio to render the sentence without playing it (the remote rendering of OVOS-AUDIO-1 3.4: ovos.utterance.speak.b64, answered by ovos.audio.speech), writes the audio to a cache file and hands the player that file. So the voice, its settings and ovos-audio's TTS cache are the ones the device already uses, and there is never a second voice model in memory.

Made for Emkay, where reading fairy tales aloud should work like any other media, and meant for OpenVoiceOS as a whole. The design is discussed in OpenVoiceOS/ovos-media#240.

How a reading plays

One uri is one sentence, or a short paragraph. A reading is a playlist of such entries, so the media player's own controls do the rest:

  • pause and resume, stop
  • next and previous sentence ("go back a bit")
  • the position is simply the playlist index, so a reading can be picked up where it stopped
  • the now-playing screen shows the title, author and picture of the entries

Whoever has the text builds the playlist, for example the common reading pipeline, which keeps its own words for "read me …", "continue reading" and so on, in every language it speaks:

from ovos_utils.ocp import MediaEntry, PlaybackType, Playlist
from ovos_ocp_tts_plugin import tts_uri

reading = Playlist(title="The Little Mermaid", artist="H. C. Andersen", image=picture)
for sentence in sentences:
    reading.add_entry(MediaEntry(uri=tts_uri(sentence, "en-US"), title="The Little Mermaid",
                                 artist="H. C. Andersen", image=picture,
                                 playback=PlaybackType.AUDIO))

In the mediavocab terms ovos-media uses, a tale is a BOOK work; reading it aloud is how it is delivered, so it is a release whose uri is tts//….

Install

pip install ovos-ocp-tts-plugin

It is picked up by every player that uses OVOS' stream extractors (opm.ocp.extractor), such as ovos-media. ovos-audio must be running, as it always is on an OVOS device.

Rendering ahead

The player asks for one sentence at a time, only when the one before it has ended, so each sentence would wait for its own rendering. The extractor listens for the playlist (ovos.common_play.play) and, whenever a sentence is asked for, renders the next few in the background, one at a time. When the player gets there, the sentence is ready, and going back a sentence needs no new rendering either.

Configuration

None needed. In the media section of mycroft.conf, next to the player's own settings:

key default what it does
tts_prefetch 2 sentences rendered ahead of the one being played; 0 turns it off
tts_render_timeout 60 seconds to wait for ovos-audio to render a sentence

Rendered files are kept in ~/.cache/ovos-ocp-tts-plugin for a day; ovos-audio's own TTS cache is what makes a repeated sentence fast.

Development

pip install -e ".[test]"
pytest tests

License

Apache-2.0

Metadata

Release files for ovos-ocp-tts-plugin 0.1.0a3

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-tts-plugin 0.1.0a3
File Size Uploaded Provenance Actions
ovos_ocp_tts_plugin-0.1.0a3.tar.gz 13.3 kB With provenance Details for ovos_ocp_tts_plugin-0.1.0a3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ovos-ocp-tts-plugin 0.1.0a3
File Interpreter ABI Platform Actions
ovos_ocp_tts_plugin-0.1.0a3-py3-none-any.whl Python 3 none any Details for ovos_ocp_tts_plugin-0.1.0a3-py3-none-any.whl

Total release size: 25.2 kB

Release files / ovos_ocp_tts_plugin-0.1.0a3.tar.gz

Download URL ovos_ocp_tts_plugin-0.1.0a3.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7b11289fd1589ac8e9b3417617bc61e7297b7247ff040fbd3cd46722c2bf67db
BLAKE2b-256 checksum
How to use checksums
d69dfb5fd6dfacf221d75b0e672a18046a2f7e4ff9029d90ce90a3c968c9d52a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / ovos_ocp_tts_plugin-0.1.0a3-py3-none-any.whl

Download URL ovos_ocp_tts_plugin-0.1.0a3-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bef377da813f6f7abecd927ed4580f057c4fca21117c81918791445be0f0907d
BLAKE2b-256 checksum
How to use checksums
82fac2a474dcd97746c954e361a235e2328878c5593a2410900b153630d6a444
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for ovos-ocp-tts-plugin 0.1.0a3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ovos_ocp_tts_plugin-0.1.0a3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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