Skip to main content
Pre-release

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

Swarmauri Logo

swarmauri_tts_polly

Alpha Swarmauri Amazon Polly TTS provider. AWS Signature V4 signing with explicit credentials. name selects an engine (standard, neural, long-form, generative); voice selects a compatible voice ID. Engine/voice/region availability must be verified with your account.

Downloads Hits Python License Version

Features

  • File synthesis, asynchronous synthesis and bounded batches through TTSBase.
  • Incremental HTTP audio with response cleanup on stream cancellation.
  • Provider-specific authentication, encoding and region configuration.
  • No automatic replay of billable synthesis requests.

Installation

uv add --prerelease allow swarmauri_tts_polly
pip install --pre swarmauri_tts_polly

Python 3.10-3.14. This source candidate requires the companion swarmauri_base>=0.11.0.dev12 release before index installation.

Usage

import os
from swarmauri_tts_polly import PollyTTS

provider = PollyTTS(
    access_key_id=os.environ["AWS_ACCESS_KEY_ID"],
    secret_access_key=os.environ["AWS_SECRET_ACCESS_KEY"],
    session_token=os.getenv("AWS_SESSION_TOKEN"),
    region=os.environ["AWS_REGION"],
    name="neural", voice="Joanna",
)
path = provider.predict("Welcome to Swarmauri.", "welcome.mp3")
# await provider.apredict(text, audio_path)
# provider.batch({"Hello": "hello.mp3"})
# await provider.abatch({"Hello": "hello.mp3"}, max_concurrent=2)
# Iterate provider.stream(text), or async-iterate provider.astream(text).

Use the component with TextToSpeechAgent. Select a filename matching the output format; HTTP chunks retain that codec. No realtime latency claim is made.

Configuration and API scope

response_format supports MP3 (default), ogg_vorbis, ogg_opus, PCM, mulaw and alaw. sample_rate is optional: MP3/Vorbis accept 8000, 16000, 22050, 24000, 44100 or 48000; Opus accepts 48000; PCM accepts 8000 or 16000; mulaw/alaw accept 8000. PCM is headerless signed 16-bit little-endian mono. Sample rates are sent as strings. Optional language_code selects the language for bilingual voices. Filenames do not change codecs.

Credentials are explicit SecretStr fields and are never discovered from profiles, metadata endpoints or the environment implicitly. The example reads environment variables in the application. Supply a session token with temporary credentials and replace the component when credentials expire; automatic role assumption or credential refresh is not implemented. Commercial AWS region endpoints only; China, GovCloud, FIPS and custom endpoints are excluded. Plain text only; SSML, speech marks, voice discovery, lexicons and S3 synthesis jobs are excluded. Polly limits plain-text requests to 3000 billed characters; no automatic text splitting is performed.

Primary reference: Amazon Polly synthesis API.

Verification and alpha status

Live API behavior remains unverified; tracked in #6301. No paid synthesis was run. Offline contract tests do not establish account/model availability, output playability, quality, latency or billed cost. Keep Development Status :: 3 - Alpha in pyproject.toml until maintainers review sufficient live evidence.

The live suite requires explicit SWARMAURI_LIVE_TTS=1 plus private AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_REGION; AWS_SESSION_TOKEN for temporary credentials. A credential alone never enables it. Run the package's tests/i9n suite. By default only predict runs (one billable request). Select additional operations with SWARMAURI_LIVE_TTS_OPERATIONS=predict,apredict,stream,astream,batch,abatch (eight requests per model/voice because each batch has two inputs). Set SWARMAURI_TTS_MODEL to the engine (Polly) or voice ShortName (Azure). Use SWARMAURI_TTS_VOICE to select an engine-compatible voice. Never paste secrets or unmasked authorization headers in logs or issues. See the verification tracker.

License

Apache-2.0. Part of the Swarmauri SDK.

Metadata

Release files for swarmauri_tts_polly 0.1.0a1

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_polly 0.1.0a1
File Size Uploaded Provenance Actions
swarmauri_tts_polly-0.1.0a1.tar.gz 8.8 kB Without provenance Details for swarmauri_tts_polly-0.1.0a1.tar.gz

Built distribution (wheel)

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

Total release size: 19.3 kB

Release files / swarmauri_tts_polly-0.1.0a1.tar.gz

Download URL swarmauri_tts_polly-0.1.0a1.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0e052011d94804305d5a44a13faf667ff9ca19c7b5ec57cc560f23d6065c46bc
BLAKE2b-256 checksum
How to use checksums
960a29ef490b1329ee5398c374744bf151696051bd6bdaa5b7fccd2050a3e1ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
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":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / swarmauri_tts_polly-0.1.0a1-py3-none-any.whl

Download URL swarmauri_tts_polly-0.1.0a1-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ade5375cd96d0679368758a5899e418eb6a1f564f1a0ecf9351d88856b997573
BLAKE2b-256 checksum
How to use checksums
af1fbe3a8586413a8543fe34a20a34a42125c646ec9b7f91e93a41d2041f5523
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
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":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for swarmauri_tts_polly 0.1.0a1

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.

Release history Release notifications | RSS feed

This release
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