Skip to main content

tontaube

Python SDK for the Tontaube text-to-speech API.

Installation

pip install tontaube

Usage

import tontaube

with tontaube.Client(api_key="your-api-key") as client:
    voices = client.list_voices()
    response = client.generate_speech(
        text="Tell me what we are building today, and I will get right to work.",
        voice_id=voices[0].id,
    )

with open("speech.m4a", "wb") as f:
    f.write(response.content)

Audio is returned as Opus in an MP4 container. Async client is also available via tontaube.AsyncClient.

Your own voices

voice = client.create_voice(name="My voice", audio="reference.wav", language="en")
response = client.generate_speech(text="Hello in my own voice.", voice_id=voice.id)

list_voices() returns your voices and the Tontaube library voices, get_voice() and delete_voice() manage them. For a one-off voice without storing it, pass the recording directly: generate_speech(text, voice_audio="reference.wav").

Streaming

with open("speech.mp3", "wb") as f:
    for chunk in client.stream_speech(text="Hello while it is still being generated.", voice_id=voice.id):
        f.write(chunk)

More options

  • style (audiobook, conversational, agentic) and controls=tontaube.Controls(rate=1, pause=3) shape the delivery.
  • seed makes a generation repeatable.
  • include_timestamps=True returns when each word is spoken (English).
  • return_context=True and prefix continue earlier speech seamlessly.

Errors from the API raise tontaube.APIError with status_code, code and message.

See the examples/ folder for more usage patterns.

For full API reference see tontaube.ai/api-reference.

Metadata

Release files for tontaube 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tontaube 0.2.0
File Size Uploaded Provenance Actions
tontaube-0.2.0.tar.gz 11.0 kB Without provenance Details for tontaube-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 21.8 kB

Release files / tontaube-0.2.0.tar.gz

Download URL tontaube-0.2.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4351a767b7487a9c6cae49b20c1469e58d07c0d1f283a64051d0d9c3acf0e501
BLAKE2b-256 checksum
How to use checksums
ee255e2ed0dc134d865bea7b9a918aa8e4da99e9656c090fe25d9d3aa7ea543e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Release files / tontaube-0.2.0-py3-none-any.whl

Download URL tontaube-0.2.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f4903d0fc89bf756982cb45244fd58fb63ea7a68f2f2c514d589ccf88bd9228
BLAKE2b-256 checksum
How to use checksums
3e58833886c395ce53a11b64d54f67f9fbe4044d6c4c5169575f0fe96344f854
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Security for tontaube 0.2.0

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