Skip to main content

faster_tts

Text-to-speech with Drama 3 on CPU and GPU, powered by CTranslate2. Provides a Python library API and the faster-tts command-line interface (CLI). Includes model downloading and caching, sentence splitting, speaker tags, and WAV output. Requires CTranslate2 4.8.4+.

Quick start

Python API:

from faster_tts import Model

model = Model()
result = model.synthesize(
    "Hello! Welcome to our application.",
    output="hello.wav",  # Save the audio as a WAV file.
)

Model() downloads and caches jordimas/drama-3-ct2. Reuse it across calls.

CLI (also available as python -m faster_tts):

faster-tts --text "Hello!" --output hello.wav

Generate emotion, dialogue, and multilingual audio with the sample scripts, or narrate a UTF-8 article:

python samples/article_voice.py article.txt --output article.wav

The article sample selects the device automatically. Use --device cpu or --device cuda to override it. Its default audio budget is 120 seconds (--max-duration-s); reaching it saves partial narration.

Models and devices

model = Model("drama-3")  # Default checkpoint
model = Model("jordimas/drama-3-ct2", revision="main", cache_dir="./models")
model = Model("/path/to/converted-model")
model = Model(local_files_only=True)  # Cached assets only

model = Model(device="cuda", device_index=0, compute_type="float16")
model = Model(device="cpu", compute_type="int8")

The default device="auto" selects GPU when available, otherwise CPU. CUDA and ROCm both use "cuda" with a matching CT2 build. Compute types depend on the build; "default" lets CT2 choose. Inspect settings with model.info(). Set CT2_DRAMA_GPU_WAVEFORM=0 to decode waveforms on CPU.

The CLI accepts the same model and cache options. For local models, use explicit paths such as ./model to avoid interpreting missing directories as Hub IDs. Custom checkpoints must match the engine's layout.

Memory

GPU expert caches size automatically. Set a total budget in decimal GB:

model = Model(
    device="cuda", num_workers=2,
    engine_options={"gpu_expert_cache_gb": 12},
)

This gives each worker a 6 GB cache. Use "auto" or "uncapped" instead of a number, or CLI --gpu-expert-cache-gb. Without an explicit budget, CT2_DRAMA3_GPU_EXPERT_CACHE_GB sets the per-worker limit (0 means uncapped). Automatic sizing reserves at least 2 GB and 30% of free memory and fails if memory cannot be queried or is insufficient. Cache budgets do not cap total VRAM.

When device="auto" selects CPU, large checkpoints can use expert memory mapping on Linux/macOS with compute_type="default" or "float32". Override with CT2_DRAMA3_CPU_MMAP=0 or 1. Explicit device="cpu" leaves it off by default. Keep the checkpoint unchanged while loaded; mapping does not cap RAM usage. Both memory features require a supporting CT2 build.

Synthesis options and results

Pass engine options through engine_options. Experimental directed_spans splits explicit breathing events from speech:

result = model.synthesize(
    "Set the bag down. [breathing] We can continue now.",
    engine_options={"directed_spans": True, "max_frames": 534},
)

Speech spans are capped at 256 frames and breathing events at 22, within the overall budget. Events use empty history and do not condition later speech. Listen to check voice, prosody, and event quality. CLI: --directed-spans.

SynthesisResult includes audio, sample rate, and finish_reason. A "length" result may be truncated; the CLI saves it and exits with status 1. "eos" does not guarantee complete speech. Enable INFO logging for faster_tts.engines.drama3 for device and segment details.

See the API reference, python -m faster_tts --help, and CT2 Drama 3 guide for options and conversion instructions.

Benchmark

Drama 3 only. See benchmark instructions to run your own measurements.

Benchmark results (2026-10-24)

CPU — AMD EPYC 7B13 (62 GiB RAM)

Test text: Hello! Welcome to our application.

Times in the CPU table are means. RTF is compute time divided by generated audio duration; lower is better, and 1 means real-time synthesis. Loading and warmup are excluded.

Implementation Precision Time (s) Audio duration (s) RTF Peak RAM (GiB RSS) Status
HF / PyTorch bfloat16 300.9 2.8 106.2 44.5 success
CT2 bfloat16 — — — — unsupported (no matching precision)
HF / PyTorch float16 351.5 3.2 109.7 44.7 success
CT2 float16 — — — — unsupported (no matching precision)
HF / PyTorch int8 — — — — unsupported (no matching precision)
CT2 int8 18.4 2.4 7.6 44.7 success
HF / PyTorch int8_float32 — — — — unsupported (no matching precision)
CT2 int8_float32 17.9 2.4 7.4 44.7 success
HF / PyTorch float32 155.2 3.0 52.2 51.3 success
CT2 float32 37.7 2.5 15.0 45.5 success

GPU — NVIDIA Tesla T4 (15 GiB VRAM)

CT2 4.8.4, 8 CPU threads, one warmup and three timed runs per successful configuration. Same test text as above. Times are means; peak RAM is process RSS and excludes VRAM. Expert cache: auto (10.874 GB), except the successful float16 run (8 GB).

Implementation Precision Time (s) Audio duration (s) RTF Peak RAM (GiB RSS) Status
CT2 float16 — — — — CUDA OOM during warmup
CT2 float32 34.5 2.5 13.8 34.5 success
CT2 int8 27.3 4.3 6.3 36.6 success
CT2 int8_float16 26.9 3.0 9.0 35.9 success
CT2 int8_float32 27.2 4.3 6.3 36.6 success
CT2 float16 37.9 3.7 10.3 36.0 success

GPU — NVIDIA L4

CT2 4.8.4, 8 CPU threads, a 12 GB expert cache, one warmup and one timed run per configuration. Same test text as above. Loading and warmup are excluded; peak RAM is process RSS and excludes VRAM. Single runs do not measure timing variability.

Implementation Precision Time (s) Audio duration (s) RTF Peak RAM (GiB RSS) Status
CT2 bfloat16 26.5 2.8 9.5 35.5 success
CT2 float16 27.6 3.1 8.9 35.6 success
CT2 float32 29.4 2.5 11.7 34.6 success
CT2 int8 22.1 4.3 5.1 36.6 success
CT2 int8_bfloat16 21.4 2.8 7.6 35.1 success
CT2 int8_float16 22.8 3.0 7.7 35.9 success
CT2 int8_float32 22.1 4.3 5.1 36.7 success

Contact: Jordi Mas jmas@softcatala.org

Metadata

Release files for faster-tts 0.0.1

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

Source distribution (sdist)

Source distribution for faster-tts 0.0.1
File Size Uploaded Provenance
faster_tts-0.0.1.tar.gz 46.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for faster-tts 0.0.1
File Interpreter ABI Platform
faster_tts-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 75.9 kB

Release files / faster_tts-0.0.1.tar.gz

Download URL faster_tts-0.0.1.tar.gz
Size 46.8 kB
Tags Source
SHA-256 checksum
How to use checksums
38857f712c8e4f42b39164072b26bd51d6494f4063fd3f6264743f6571528b0a
BLAKE2b-256 checksum
How to use checksums
5d5394aed1d63322e855d72967550caa22d8ec5fa0d1c19c06fa7b8a2d791737
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / faster_tts-0.0.1-py3-none-any.whl

Download URL faster_tts-0.0.1-py3-none-any.whl
Size 29.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e62ab5cdb343889d98e8b3e4c694ac0a52e0da78f3634538b6d980ba51c2ad63
BLAKE2b-256 checksum
How to use checksums
554b9c8e283831bc13932b87bd686c7633763be2d8e0f61df9f7c0a2a89684a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for faster-tts 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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