This release is a pre-release and may not be stable for production use.
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.
Features
- Converts one fresh text input into one audio file.
- Uses any provider implementing Swarmauri's
TTSBasecontract. - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a4d7cc65f2ca595e1c69267061ce2d1963e8b9cc98e204d6bbe3e69fe3e4eea
|
|
| MD5 |
38e0f386a25df81ceaf6e713b30c4871
|
|
| BLAKE2b-256 |
17d47b971e8230e1760cf627115ba15f7a8b1b0b5f8c18c3f8487ea81d219cf2
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cf61ade32d303807fbb1ea1a9bcbca6af990693e7be3df5e6ec8787d4a58c3e
|
|
| MD5 |
9363fb32b2578cca169daad314b11fbf
|
|
| BLAKE2b-256 |
53980b13e10f9b4e0df7f192c6675aef254a2d879969c01d63ab46b531b85a5e
|