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.
Requires Python 3.10–3.13. Create a project and server key in the Cheap TTS dashboard.
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.
Reading pauses
Pauses are left to the voice model by default. Pass pauses to insert real silence after a punctuation mark instead, in seconds (0-2):
result = tts.synthesize(
"Xin chào từ Cheap TTS.",
"vi-entertainment",
pauses={"sentence": 0.4, "paragraph": 0.8},
)
Keys: sentence, comma, ellipsis, paragraph (a blank line). Every key is optional and defaults to 0, meaning the model's own pause — so omitting pauses keeps the audio you get today. Raising a value costs generation speed, because the audio has to be cut at that boundary for silence to follow it.
Metadata
Release files for cheap-tts 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cheap_tts-0.2.0.tar.gz | 15.3 kB | Without provenance | Details for cheap_tts-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cheap_tts-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for cheap_tts-0.2.0-py3-none-any.whl |
Total release size: 30.0 kB
Release files / cheap_tts-0.2.0.tar.gz
| Download URL | cheap_tts-0.2.0.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
801ec1b060a1cfd5189874907812e063559cc78e0e393dafff1cf17e1e0fd98d
|
|
BLAKE2b-256 checksum How to use checksums |
dd1d5428ec906a5411c0d12276e0eb305e4f36b8bc73b4489f2559f11f5edd4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / cheap_tts-0.2.0-py3-none-any.whl
| Download URL | cheap_tts-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c122b39d2ce617090a55379807fcb7d5fb7aa622f1376112edf783dbdf6edf23
|
|
BLAKE2b-256 checksum How to use checksums |
5fa0660722528e90fb6bc9b2272610c825fba170ac3555134a3c71a416046d8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for cheap-tts 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.