Skip to main content
Pre-release

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

Swarmauri Logo

swarmauri_tts_gemini

Alpha Swarmauri Gemini speech provider. Single-speaker Gemini 3.8 Interactions API. Older generateContent models, multi-speaker dialogue, voice management and Gemini Live are excluded.

Downloads Hits Python License Version

Features

  • Synchronous/asynchronous file generation and bounded batches.
  • Incremental HTTP audio with cancellation cleanup.
  • Provider-specific authentication, payloads, formats and model validation.
  • Fixed provider endpoints; no automatic replay of billable requests.

Unary output is WAV at 24 kHz mono; streaming decodes SSE audio events into headerless 16-bit little-endian PCM at 24 kHz. The API uses store=false and never stores a session ID locally. Set TextToSpeechAgent.output_path to a .wav filename.

Installation

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

This source candidate requires the companion swarmauri_base>=0.11.0.dev12 release before these alpha packages can be installed from the index.

Usage

Set GEMINI_API_KEY privately. Use a model and voice available to your own account.

import os
from swarmauri_tts_gemini import GeminiTTS

provider = GeminiTTS(
    api_key=os.environ["GEMINI_API_KEY"],
    name="gemini-3.8-flash-tts",
    voice="Kore",
)
path = provider.predict("Welcome to Swarmauri.", "welcome.wav")
# await provider.apredict(text, audio_path)
# provider.batch({"Hello": "hello.wav"})
# await provider.abatch({"Hello": "hello.wav"}, max_concurrent=2)
# Iterate provider.stream(text), or async-iterate provider.astream(text).

The filename does not convert the codec. Select matching output settings and extensions. The component implements TTSBase for TextToSpeechAgent use.

Models and output settings

The initial model list is gemini-3.8-flash-tts (default) and gemini-3.8-flash-lite-tts, using the same Interactions schema. voice defaults to Kore; optional style adds speech metadata to the text. File generation always requests a complete WAV; streaming requests audio/l16. Both use 24 kHz mono PCM16. Older model IDs using a different API contract are rejected rather than sent to this endpoint.

Verification and alpha status

Live API behavior is unverified; tracked in #6298. No paid synthesis was run. Offline tests cover transport and documented schemas, not account/model availability, playability, latency, pricing or quality. Keep Development Status :: 3 - Alpha in pyproject.toml until maintainers review sufficient live evidence.

Live tests require both GEMINI_API_KEY and SWARMAURI_LIVE_TTS=1. Gemini defaults to Kore; select a permitted voice for other checks. By default only predict runs (one request). Set SWARMAURI_LIVE_TTS_OPERATIONS=predict,apredict,stream,astream,batch,abatch to select all operations (eight requests per model). Use SWARMAURI_TTS_MODEL and SWARMAURI_TTS_VOICE for model-specific checks. Never paste keys into logs or issues. See the verification tracker.

License

Apache-2.0. Part of the Swarmauri SDK.

For speaker-labelled turns with explicit voice bindings, use the separate swarmauri_tts_gemini_dialogue package. It reuses this package's audio decoding while preserving a distinct structured input contract.

Metadata

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

Built distribution (wheel)

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

Total release size: 20.1 kB

Release files / swarmauri_tts_gemini-0.1.0a2.tar.gz

Download URL swarmauri_tts_gemini-0.1.0a2.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7f53e4c74d6d5ef0e0192d9a431f15baae4618fcef99b44626cb93261b8cbf70
BLAKE2b-256 checksum
How to use checksums
71a23efb1ae085dbe99d642cc0806c6efcd35549d50d3ca456ca145e99a3be91
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_gemini-0.1.0a2-py3-none-any.whl

Download URL swarmauri_tts_gemini-0.1.0a2-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51c9e6ed2d4e4ebc304f935e8f9fa257ddda0bf603b9f0a1543b7e788b11884c
BLAKE2b-256 checksum
How to use checksums
70776ceaf16041ac6bc13b7dc9f0ae74bb17da9d268f611dd7d41a45831a578a
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_gemini 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