Skip to main content
Pre-release

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

Swarmauri Logo

Swarmauri Text-to-Speech Agent

swarmauri_agent_texttospeech provides a stateless agent that converts each text prompt into an audio file through any Swarmauri TTSBase provider.

PyPI Downloads Hits Python Versions License PyPI Version

Features

  • Converts one fresh text input into one audio file.
  • Uses any provider implementing Swarmauri's TTSBase contract.
  • Keeps no conversation history, memory, or system context.
  • Supports synchronous, asynchronous, and batch agent execution.
  • Generates distinct default paths for batch outputs.

Installation

uv add swarmauri_agent_texttospeech
pip install swarmauri_agent_texttospeech

Install a TTS provider package alongside the agent. For PlayHT:

uv add swarmauri_tts_playht

Or with pip:

pip install swarmauri_tts_playht

Usage

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="Play3.0-mini",
    voice="Adolfo",
)
agent = TextToSpeechAgent(tts=tts, output_path="greeting.mp3")

audio_path = agent.exec("Welcome to Swarmauri.")
print(audio_path)

Each call is independent. The agent passes only that call's text to the TTS provider and never constructs a conversation or system message.

Contributing

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

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_agent_texttospeech-0.11.0.dev4.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file swarmauri_agent_texttospeech-0.11.0.dev4.tar.gz.

File metadata

  • Download URL: swarmauri_agent_texttospeech-0.11.0.dev4.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for swarmauri_agent_texttospeech-0.11.0.dev4.tar.gz
Algorithm Hash digest
SHA256 4a4d7cc65f2ca595e1c69267061ce2d1963e8b9cc98e204d6bbe3e69fe3e4eea
MD5 38e0f386a25df81ceaf6e713b30c4871
BLAKE2b-256 17d47b971e8230e1760cf627115ba15f7a8b1b0b5f8c18c3f8487ea81d219cf2

See more details on using hashes here.

File details

Details for the file swarmauri_agent_texttospeech-0.11.0.dev4-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_agent_texttospeech-0.11.0.dev4-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for swarmauri_agent_texttospeech-0.11.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 3cf61ade32d303807fbb1ea1a9bcbca6af990693e7be3df5e6ec8787d4a58c3e
MD5 9363fb32b2578cca169daad314b11fbf
BLAKE2b-256 53980b13e10f9b4e0df7f192c6675aef254a2d879969c01d63ab46b531b85a5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page