Skip to main content

Deprecated: Play.ht service discontinued. This package is retained for import compatibility. Construction fails locally with migration instructions. Use swarmauri_standard.tts.OpenaiTTS.OpenaiTTS; install with uv add swarmauri_standard or pip install swarmauri_standard. See the migration guide. The examples below describe the retired service and must not be used for new integrations.

Swarmauri Logo

Swarmauri PlayHT Text-to-Speech

swarmauri_tts_playht is the standalone PlayHT provider package for Swarmauri. Its PlayHTModel implements TTSBase and converts independent text inputs into audio files without pretending to be an LLM.

PyPI Downloads Hits Python Versions License PyPI Version

Features

  • Native TTSBase provider registered as swarmauri.tts.PlayHTModel.
  • Synchronous, asynchronous, and batch audio generation.
  • PlayHT voice discovery and cloned-voice management.
  • Configurable voice engine, voice, output format, and timeout.
  • Agent-only CLI support for positional, piped, file-based, and interactive text.
  • Command-line selection of the PlayHT voice model and voice.

Installation

uv add swarmauri_tts_playht
pip install swarmauri_tts_playht

Set PLAYHT_API_KEY and PLAYHT_USER_ID before generating audio.

Usage

import os

from swarmauri_tts_playht import PlayHTModel

tts = PlayHTModel(
    api_key=os.environ["PLAYHT_API_KEY"],
    user_id=os.environ["PLAYHT_USER_ID"],
    name="Play3.0-mini",
    voice="Adolfo",
)
audio_path = tts.predict("Welcome to Swarmauri.", "welcome.mp3")
print(audio_path)

Generate through the stateless TextToSpeechAgent:

swarmauri-playht "Welcome to Swarmauri." \
  --voice-model PlayHT2.0-turbo \
  --voice Adolfo \
  --output welcome.mp3

Every CLI invocation uses TextToSpeechAgent. It adds no conversation, memory, system context, or text-generating LLM. --model remains available as an alias for --voice-model.

The supported command-line voice engines are Play3.0-mini, PlayHT2.0-turbo, PlayHT1.0, and PlayHT2.0. Text can also come from a UTF-8 file or standard input:

swarmauri-playht --prompt-file announcement.txt --output announcement.mp3
echo "Welcome to Swarmauri." | swarmauri-playht --output welcome.mp3

Use the same stateless workflow from Python:

import os

from swarmauri_agent_texttospeech import TextToSpeechAgent
from swarmauri_tts_playht import PlayHTModel

tts = PlayHTModel(
    api_key=os.environ["PLAYHT_API_KEY"],
    user_id=os.environ["PLAYHT_USER_ID"],
    name="PlayHT2.0-turbo",
    voice="Adolfo",
)
agent = TextToSpeechAgent(tts=tts, output_path="welcome.mp3")
audio_path = agent.exec("Welcome to Swarmauri.")

Contributing

This package is part of the Swarmauri SDK. Contributions should follow the repository contribution and style guides.

License

Apache-2.0

Metadata

Release files for swarmauri_tts_playht 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swarmauri_tts_playht 0.11.0
File Size Uploaded Provenance Actions
swarmauri_tts_playht-0.11.0.tar.gz 14.0 kB Without provenance Details for swarmauri_tts_playht-0.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for swarmauri_tts_playht 0.11.0
File Interpreter ABI Platform Actions
swarmauri_tts_playht-0.11.0-py3-none-any.whl Python 3 none any Details for swarmauri_tts_playht-0.11.0-py3-none-any.whl

Total release size: 28.8 kB

Release files / swarmauri_tts_playht-0.11.0.tar.gz

Download URL swarmauri_tts_playht-0.11.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8a2ba1eae827d74aef853b036210302eff21d69e008e370e17192bd7538b15d4
BLAKE2b-256 checksum
How to use checksums
a71028870bc198f64419b9684d1b41fd225c77356c5e2ce92dafedc5fad989ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / swarmauri_tts_playht-0.11.0-py3-none-any.whl

Download URL swarmauri_tts_playht-0.11.0-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1c448b2fdf5b7de11b3a4c88cbb7f6dcf22be4bbc40f85f3f6ee7375ba6f7be
BLAKE2b-256 checksum
How to use checksums
882c19211c84943eb932ae2750fe526fc5e7c5b0da0f2e52ab982ff9ed78d9b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for swarmauri_tts_playht 0.11.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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