Skip to main content
Pre-release

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

Swarmauri Logo

swarmauri_tts_openai

Standalone alpha openai speech synthesis for Swarmauri. OpenAI tts-1, tts-1-hd and gpt-4o-mini-tts; optional speed, output format and mini-TTS instructions.

Downloads Hits Python License Version

Features

  • File generation through predict and apredict.
  • Incremental audio through stream and astream, with connection cleanup.
  • Synchronous batch execution and bounded async batches.
  • Explicit provider URL, model, voice and output settings.
  • No automatic retries of potentially billable generation requests.

Streaming yields binary HTTP audio chunks. Hosted buffering and time to first audio have not been measured.

Installation

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

This source candidate requires the companion swarmauri_base release providing HttpTTSMixin (>=0.11.0.dev8). Release that dependency before these wheels.

Usage

Set OPENAI_API_KEY in your environment, then:

import os
from swarmauri_tts_openai import OpenaiTTS

provider = OpenaiTTS(
    api_key=os.environ["OPENAI_API_KEY"],
    name="tts-1",
    voice="alloy",
)
path = provider.predict("Welcome to Swarmauri.", "welcome.mp3")
# await provider.apredict(text, audio_path)
# provider.batch({"First message": "first.mp3"})
# await provider.abatch({"Second message": "second.mp3"}, max_concurrent=2)
# Iterate provider.stream(text), or async-iterate provider.astream(text).

Choose voices appropriate to the selected model. The filename does not change the codec: select response_format explicitly and use a matching extension. The component implements TTSBase and can be passed to TextToSpeechAgent.

Verification and alpha status

Live API behavior has not been verified by this change. Tracked in verification issue #6268. Offline tests validate payloads, errors and transport behavior; they do not establish speech quality, model availability or actual billed cost. Keep Development Status :: 3 - Alpha in pyproject.toml until maintainers review live verification evidence.

Live tests are disabled even if a key is present. To explicitly authorize one billable synthesis request, set SWARMAURI_LIVE_TTS=1, set OPENAI_API_KEY privately, and run this package's tests/i9n suite. Only predict runs by default. Set SWARMAURI_LIVE_TTS_OPERATIONS=predict,apredict,stream,astream,batch,abatch to exercise all operations (eight requests including the two-item batches). Set SWARMAURI_TTS_MODEL and SWARMAURI_TTS_VOICE to select another model/voice. Do not paste API keys into issues or logs.

Verification issue links and evidence requirements are maintained in the verification guide.

License

Apache-2.0. Part of the Swarmauri SDK.

Provider lifecycle

OpenAI lists tts-1, tts-1-hd and gpt-4o-mini-tts for shutdown on 2027-01-06. This alpha package preserves the legacy Speech API contract and warns on use. The recommended gpt-realtime-2.1-mini uses the Realtime API, not this endpoint. See the lifecycle guide and official schedule.

Migration tracking: #6310.

Dependency compatibility

Version 0.1.0a2 constrains HTTPX to the supported 0.27-0.28 API and requires swarmauri_base>=0.11.0.dev12. Use this alpha instead of 0.1.0a1, whose unconstrained dependency can select incompatible HTTPX 1.0 prereleases.

Metadata

Release files for swarmauri_tts_openai 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 swarmauri_tts_openai 0.1.0a2
File Size Uploaded Provenance Actions
swarmauri_tts_openai-0.1.0a2.tar.gz 8.3 kB Without provenance Details for swarmauri_tts_openai-0.1.0a2.tar.gz

Built distribution (wheel)

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

Total release size: 18.3 kB

Release files / swarmauri_tts_openai-0.1.0a2.tar.gz

Download URL swarmauri_tts_openai-0.1.0a2.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1d8896196516edd274f3d3365b377c0c370ff1f2b2521ad112c8e79aeb883cea
BLAKE2b-256 checksum
How to use checksums
05322f1482e19c7eb1bb397c9e933a913ddb54843f93ddd4addb72d23970cfea
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":"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_openai-0.1.0a2-py3-none-any.whl

Download URL swarmauri_tts_openai-0.1.0a2-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccf7440418d38b4c230e76a88facf7b861bf6382f2276d6d84c3d88d0c7ee9a8
BLAKE2b-256 checksum
How to use checksums
762533e55611388a0b8c25769a877bce767021e294a4ab4d26f5e40ad32a7cd8
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":"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_openai 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.

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