Skip to main content

Cheap TTS Python SDK

Generate multilingual speech with server-side text preparation and local ONNX inference. An active Cheap TTS subscription and a server secret key are required.

pip install cheap-tts
from cheap_tts import CheapTTS

with CheapTTS(secret_key="sk_live_your_project") as tts:
    result = tts.synthesize(
        text="Xin chào từ Cheap TTS.",
        voice="vi-entertainment",
    )
    result.save("audio.wav")

Async usage:

from cheap_tts import AsyncCheapTTS

async with AsyncCheapTTS(secret_key="sk_live_your_project") as tts:
    result = await tts.synthesize("Hello from Cheap TTS.", "en-narration")
    result.save("audio.wav")

API

  • voices() returns the available voices.
  • load_voice() downloads, validates, caches, and loads one voice.
  • synthesize() prepares text through API v1 and performs ONNX inference locally.
  • clear_cache() removes locally cached voice assets.
  • close() releases the active model.

load_voice() and synthesize() accept on_progress and a cancellation object with an is_set() method, such as threading.Event.

from threading import Event

cancel = Event()
result = tts.synthesize(
    "A long document",
    "en-narration",
    rate=1.25,
    on_progress=lambda event: print(event.stage, event.progress),
    cancel_event=cancel,
)

Voice models are cached in ~/.cache/cheap-tts/models. Set cache_dir or CHEAP_TTS_CACHE_DIR to change the location.

The SDK sends operational health telemetry containing success/failure stage, latency, character count, voice ID, and audio duration. It never sends TTS text or credentials through telemetry. Pass telemetry=False to disable it.

API errors are raised as CheapTTSAPIError with stable status, code, and request_id fields.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cheap_tts-0.1.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cheap_tts-0.1.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file cheap_tts-0.1.0.tar.gz.

File metadata

  • Download URL: cheap_tts-0.1.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for cheap_tts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3ed42d33468fdabe469ef4c870100b69ea9ddf88b481da122860148a2856d9c8
MD5 0bd71ce63cbac5fb8e4df5e1b24c5189
BLAKE2b-256 dcfa619440c115a95a04820cac39a234879a5e240915e7973d45f1e04a7ea4ff

See more details on using hashes here.

File details

Details for the file cheap_tts-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cheap_tts-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for cheap_tts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6afb38b7d34fbffb2721a4afa036aec9a98bf037c6efaf0a0a4e6181ed650df0
MD5 4248332bb7686ead8175b07a663e8fbb
BLAKE2b-256 0abfa9b9b7f02a8ae8449acbb55ef26ff3b958ae168ceb4198e2b5d043a3d5a2

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

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