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.0a2

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

Built distribution (wheel)

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

Total release size: 25.2 kB

Release files / ovos_ocp_tts_plugin-0.1.0a2.tar.gz

Download URL ovos_ocp_tts_plugin-0.1.0a2.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ef02c5597c6993e853c61defa787df21581b5279ca9ee2eb8f98e497657b898b
BLAKE2b-256 checksum
How to use checksums
d13b2354a927fe75eae945976a6dac9c52649b7d11956aee63580219e92f855a
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 21, 2026.

Transparency log

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

Download URL ovos_ocp_tts_plugin-0.1.0a2-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32080d65589db8dc31a20b276c05b0abdc3311e8d003ab175bbee119e4a89df4
BLAKE2b-256 checksum
How to use checksums
2a198546e914e39c4278dd22bd5e20edec490e8e4a137ed8537018f10e6141ff
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 21, 2026.

Transparency log

Security for ovos-ocp-tts-plugin 0.1.0a2

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.0a2.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 21, 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