Skip to main content

Pocket TTS Timestamped

Fork of Pocket TTS that adds word-level timestamps for streaming and non-streaming generation.

Quick start

Installation

pip install pocket-tts-timestamped

or:

uv add pocket-tts-timestamped

Pocket TTS supports Python 3.10 through 3.14 and requires PyTorch 2.5 or newer.

Generate audio with word timestamps

from pocket_tts_timestamped import TTSModel

model = TTSModel.load_model()
voice = model.get_state_for_audio_prompt("alba")

result = model.generate_audio_with_timestamps(voice, "Hello world!")
for word in result.words:
    print(word.word, word.start_time, word.end_time)
process_audio(result.audio)

Streaming timestamps

from pocket_tts_timestamped import TTSModel, AudioChunk, WordEnd, WordStart

model = TTSModel.load_model()
voice = model.get_state_for_audio_prompt("alba")

stream = model.generate_audio_with_timestamps_stream(voice, "Hello world!")
for event in stream:
    if isinstance(event, AudioChunk):
        process_audio(event.audio)
    elif isinstance(event, WordStart):
        print("start", event.word_index, event.word, event.start_time)
    elif isinstance(event, WordEnd):
        print("end", event.word_index, event.word, event.end_time)

Checkpoint support

All official Pocket TTS checkpoints are supported, but accuracy differs between them. Preliminary results are provided for reference, MAE is calculated against CrisperWhisper 2.0 small's timestamps:

Checkpoint Heads Samples Words Skip rate MAE
English 2026-04 L3H8 552 3,841 0.0260% 44.52 ms
English 2026-04 24L L14H10 204 1,874 0.0000% 46.77 ms
English 2026-01 L3H8 120 990 0.0000% 72.90 ms
French 24L L11H9+L17H8 81 628 0.0000% 59.62 ms
German L3H6 57 465 0.0000% 57.48 ms
German 24L L3H6+L16H6 39 354 0.2825% 67.20 ms
Italian L4H0 46 388 0.0000% 66.98 ms
Italian 24L L4H0+L15H12 56 491 0.0000% 117.60 ms
Portuguese L3H14 57 533 0.0000% 68.56 ms
Portuguese 24L L3H14+L15H9 62 597 0.0000% 120.62 ms
Spanish L2H3 55 507 0.0000% 91.58 ms
Spanish 24L L6H9 61 570 0.0000% 78.25 ms

[!WARNING] These results are based on a relatively small sample size and a weak model. If accuracy is important to your use case, wait for the definitive results.

About Pocket TTS

A lightweight text-to-speech (TTS) application designed to run efficiently on CPUs. Forget about the hassle of using GPUs and web APIs serving TTS models. With Kyutai's Pocket TTS, generating audio is just a pip install and a function call away.

Supports Python 3.10, 3.11, 3.12, 3.13 and 3.14. Requires PyTorch 2.5+. Does not require the gpu version of PyTorch.

🔊 Demo | 🐱‍💻GitHub Repository | 🤗 Hugging Face Model Card | ⚙️ Tech report | 📄 Paper | 📚 Documentation

[!NOTE] New (August 2026): We've released the training code! Check out training/ to start training your own models. Open a PR to add your model to the Models trained by the community section.

Main takeaways

  • Runs on CPU
  • Small model size, 100M parameters
  • Audio streaming
  • Low latency, ~200ms to get the first audio chunk
  • Faster than real-time, ~6x real-time on a CPU of MacBook Air M4
  • Uses only 2 CPU cores
  • Python API and CLI
  • Voice cloning
  • Multi-language support: english, french, german, portuguese, italian, spanish
  • Can handle infinitely long text inputs
  • Can run on client-side in the browser

Additional languages may be added in the future.

Trying it from the website, without installing anything

Navigate to the Kyutai website to try it out directly in your browser. You can input text, select different voices, and generate speech without any installation.

Trying it with the CLI

The generate command

You can use pocket-tts-timestamped directly from the command line. We recommend using uv as it installs any dependencies on the fly in an isolated environment (uv installation instructions here). You can also use pip install pocket-tts-timestamped to install it manually. On Linux, see CPU-only installation to avoid pulling in the CUDA build of PyTorch.

This will generate a wav file ./tts_output.wav saying the default text with the default voice, and display some speed statistics.

uvx --from pocket-tts-timestamped pocket-tts-timestamped generate
# or if you installed it manually with pip:
pocket-tts-timestamped generate

Modify the voice with --voice and the text with --text. We provide a small catalog of voices. Choose a pretrained language model with --language when running generate, export-voice, or serve (default: english). Non-english languages have also biggers 24 layers variants that are higher quality but slower. You can select them by using for example --language italian_24l. The --config option accepts a local YAML path, an https:// URL, or an hf:// path (e.g. hf://<repo_id>/<path>[@revision]) for custom weights.

You can take a look at this page which details the licenses for each voice.

The --voice argument can also take a plain wav file as input for voice cloning. You can use your own or check out our voice repository. We recommend cleaning the sample before using it with Pocket TTS, because the audio quality of the sample is also reproduced.

Feel free to check out the generate documentation for more details and examples. For trying multiple voices and prompts quickly, prefer using the serve command.

The serve command

You can also run a local server to generate audio via HTTP requests.

uvx --from pocket-tts-timestamped pocket-tts-timestamped serve
# or if you installed it manually with pip:
pocket-tts-timestamped serve

Navigate to http://localhost:8000 to try the web interface, it's faster than the command line as the model is kept in memory between requests.

You can check out the serve documentation for more details and examples.

The export-voice command

Processing an audio file (e.g., a .wav or .mp3) for voice cloning is relatively slow, but loading a safetensors file -- a voice embedding converted from an audio file -- is very fast. You can use the export-voice command to do this conversion. See the export-voice documentation for more details and examples.

Using it as a Python library

You can try out the Python library on Colab here.

Install the package with

pip install pocket-tts-timestamped
# or
uv add pocket-tts-timestamped

CPU-only installation

On Linux, PyPI serves the CUDA build of PyTorch by default, so pip install pocket-tts-timestamped also downloads the nvidia-* CUDA runtime wheels, even though pocket-tts runs on CPU. This adds several gigabytes to the install (with torch 2.13, roughly 3 GB instead of 200 MB). Installing from the PyTorch CPU index pulls the CPU build and no NVIDIA packages:

pip install pocket-tts-timestamped --extra-index-url https://download.pytorch.org/whl/cpu

To run the CLI without installing, pass the same index to uvx:

uvx --index https://download.pytorch.org/whl/cpu \
  --from pocket-tts-timestamped pocket-tts-timestamped generate

With uv, declare the index explicitly in your project:

[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true

[tool.uv.sources]
torch = [{ index = "pytorch-cpu" }]

This is not needed on macOS or Windows, where the default PyTorch wheels are already CPU-only.

You can use this package as a simple Python library to generate audio from text.

from pocket_tts_timestamped import TTSModel
import scipy.io.wavfile

tts_model = TTSModel.load_model()
voice_state = tts_model.get_state_for_audio_prompt(
    "alba"  # One of the pre-made voices, see above
    # You can also use any voice file you have locally or from Hugging Face:
    # "./some_audio.wav"
    # or "hf://kyutai/tts-voices/expresso/ex01-ex02_default_001_channel2_198s.wav"
)
audio = tts_model.generate_audio(voice_state, "Hello world, this is a test.")
# Audio is a 1D torch tensor containing PCM data.
scipy.io.wavfile.write("output.wav", tts_model.sample_rate, audio.numpy())

Word-level timestamps

Word timestamps are available through the Python API. The non-streaming method returns the complete audio and finalized word intervals:

result = tts_model.generate_audio_with_timestamps(voice_state, "Hello world!")
for word in result.words:
    print(word.word, word.start_time, word.end_time)

For real-time consumers, generate_audio_with_timestamps_stream() yields AudioChunk, WordStart, and WordEnd events. Timestamp methods raise ValueError for custom model configurations that do not define timestamp_heads.

You can have multiple voice states around if you have multiple voices you want to use. load_model() and get_state_for_audio_prompt() are relatively slow operations, so we recommend to keep the model and voice states in memory if you can.

For faster voice loading, you can export voice states to safetensors files:

from pocket_tts_timestamped import TTSModel, export_model_state

model = TTSModel.load_model()

# Export a voice state for fast loading later
model_state = model.get_state_for_audio_prompt("some_voice.wav")
export_model_state(model_state, "./some_voice.safetensors")

# Later, load it quickly, this is quite fast as it's just reading the kvcache
# from disk and doesn't do any others computations.
model_state_copy = model.get_state_for_audio_prompt("./some_voice.safetensors")

audio = model.generate_audio(model_state_copy, "Hello world!")

You can check out the Python API documentation for more details and examples.

Running on GPU

Pocket TTS is designed to run on CPU, and on hardware with strong single-thread CPU performance (e.g. Apple Silicon) we did not observe a GPU speedup, notably because we use a batch size of 1 and a very small model. However, this turns out to be hardware-dependent: measured on a cloud x86 VM (4 vCPUs) with a Tesla T4, moving the model to GPU gave a consistent ~2.6x speedup over CPU (RTF ~2.3-2.5x on CPU vs. ~6.28x on GPU, for both short and long input text). If your CPU is thread-limited or otherwise weaker than a modern laptop chip, it's worth trying the GPU.

This is not officially supported (there is no device argument on TTSModel.load_model()), but since TTSModel is a regular nn.Module you can move it yourself:

tts_model = TTSModel.load_model()
tts_model.to("cuda")
...
audio = tts_model.generate_audio(voice_state, "Hello world, this is a test.")
# generate_audio() returns a tensor on the same device as the model, so on GPU you need
# to move it back to CPU before calling .numpy():
scipy.io.wavfile.write("output.wav", tts_model.sample_rate, audio.detach().cpu().numpy())

A few things to be aware of if you want to use the GPU:

  • The generate CLI command has a --device option (defaults to cpu, documented in the CLI reference — note that page's own description ("you may not get a speedup by using a gpu since it's a small model") is what this section is correcting, based on the T4 measurements above); the serve command and the Docker image do not expose any device option and will always run on CPU.
  • pip install pocket-tts-timestamped / uv add pocket-tts-timestamped install whatever torch build is current on PyPI, which may require a newer CUDA version than your driver supports. In that case torch.cuda.is_available() silently returns False (you'll only see a UserWarning about an outdated driver, not an error). If this happens, install a torch build matching your driver's CUDA version explicitly, e.g. pip install torch --index-url https://download.pytorch.org/whl/cu121.
  • quantize=True (int8 dynamic quantization) only works on CPU; calling it on a model moved to CUDA raises NotImplementedError: Could not run 'quantized::linear_dynamic' ... 'CUDA' backend. Separately, the optional torchao backend (pip install pocket-tts-timestamped[quantize]) declares torch>=2.11 — fine with a fresh install (torch 2.11+ is on PyPI as of this writing), but if you've pinned an older torch (e.g. to match an older GPU driver's CUDA build, per the point above), adding this extra can pull in a torchao that's incompatible with your pinned torch and break quantize=True even on CPU. Match torchao's torch requirement to whatever torch you actually have installed.

Unsupported features

At the moment, we do not support (but would love pull requests adding):

We tried running this TTS model on the GPU but did not observe a speedup compared to CPU execution on hardware with very strong single-thread CPU performance, notably because we use a batch size of 1 and a very small model. See the "Running on GPU" section above for measurements on other hardware and caveats if you want to try it yourself.

Development and local setup

We accept contributions! Feel free to open issues or pull requests on GitHub.

You can find development instructions in the CONTRIBUTING.md file. You'll also find there how to have an editable install of the package for local development.

In-browser implementations

Pocket TTS is small enough to run directly in your browser in WebAssembly/JavaScript. We don't have official support for this yet, but you can try out one of these community implementations:

Alterative implementations

  • pocket-tts-mlx by @jishnuvenugopal - MLX backend optimized for Apple Silicon
  • pocket-tts-xn by @LaurentMazare - A Rust port of Pocket TTS implemented with XN.
  • pocket-tts-candle by @babybirdprd - Candle version (Rust) with WebAssembly and PyO3 bindings.
  • PocketTTS.cpp by @VolgaGerm - Single-file C++ runtime using ONNX Runtime, with CLI, HTTP server, and FFI C API.
  • sherpa-onnx by @csukuangfj - Run PocketTTS on Windows, macOS, Linux, and embedded boards (Raspberry Pi, Jetson, RK3588, etc.) with bindings for 12 programming languages: C++, C, Python, JavaScript, Java, C#, Kotlin, Swift, Go, Dart, Rust, Pascal, plus WebAssembly.
  • pocket-tts-csharp by @TheAjaykrishnanR - A C# port of Pocket TTS implemented using TorchSharp and TorchSharp.PyBridge for ease of use as a library in .NET projects.

Models trained by the community

To use a community model, just use the --config argument and point it to the url of the model's yaml file. For example:

uvx --from pocket-tts-timestamped pocket-tts-timestamped generate --config https://raw.githubusercontent.com/kyutai-labs/pocket-tts/refs/heads/main/pocket_tts/config/english_2026-04.yaml

It also works with huggingface urls like hf://kyutai/pocket-tts/config/english_2026-04.yaml or local paths like ./english_2026-04.yaml.

The pre-made voices listed above are embeddings precomputed with our released weights, so they are not available for community models. With --config, --voice defaults to alba's audio file, which any model can clone. Pass your own audio file to --voice to use another voice.

We recommend inserting the commit hash somehow in the url to avoid breaking changes by the model authors. For example:

uvx --from pocket-tts-timestamped pocket-tts-timestamped generate --config https://raw.githubusercontent.com/kyutai-labs/pocket-tts/891886a61a1ed45fd429a0a63bd96181e6cff637/pocket_tts/config/english_2026-04.yaml

or with hf://...

uvx --from pocket-tts-timestamped pocket-tts-timestamped generate --config hf://user/repo/config_file.yaml@commit_hash

List of community-trained models

uvx --from pocket-tts-timestamped pocket-tts-timestamped generate --config hf://vvolhejn/pocket-tts-czech/czech.yaml@7b7760dd0fe994a0800f2fdbc837dc4b8f219d1c
uvx --from pocket-tts-timestamped pocket-tts-timestamped generate \
  --config hf://saryps-labs/pocket-tts-hindi/config.yaml@dbaa326069d20bfbdaeb625613736773741a24ea \
  --text "आज का दिन बहुत अच्छा है"

Want your model here? Head to the training Readme to get started!

Projects using Pocket TTS

  • pocket-reader by @lukasmwerner- Browser screen reader
  • pocket-tts-wyoming by @ikidd - Docker container for pocket-tts using Wyoming protocol, ready for Home Assistant Voice use.
  • Sonorus by @KevinAHM - Talk to any named character in Hogwarts Legacy with their original voice.
  • Native macOS App by @slaughters85j - Native macOS app, Python-free. Runs Pocket-TTS via Core ML, fully on-device. Includes signed and notarized .app releases.
  • Electron macOS App by @slaughters85j - Electron Mac Desktop App + macOS Quick Action
  • pocket-tts-openai_streaming_server by @teddybear082 - OpenAI-compatible streaming server, dockerized and with an .exe release
  • pocket-tts-unity by @lookbe - A Unity 6 integration for Pocket-TTS.
  • ComfyUI-Pocket-TTS by @ai-joe-git Lightweight CPU-based Text-to-Speech for ComfyUI
  • pocket-tts-server by @ai-joe-git A lightweight, real-time voice cloning and chat server with OpenAI-compatible API. Clone any voice with just 20 seconds of audio and chat with AI using that voice instantly.
  • discord-tts by @alkmei - Multivoice Discord text-to-speech bot that uses Pocket TTS.
  • cursed-codex by @dooart - AI coding agent with unhinged live football commentary
  • pocket-tts-deno Port of pocket-tts-server as a wasm + onnx deno server with voice TTS API.
  • FrontPocket by @markd89 - Front-end for Pocket-TTS to speak text from clipboard, file, CLI (hotkeys) & GUI toolbar. Change playback speed, voice, and move forward/backward between sentences instantaneously.
  • openclaw-pockettts by @dodgyrabbit - A Docker container with the Python implementation but exposed as an OpenAI TTS API for easy integration with OpenClaw.
  • openclaw-pocketts.cpp by @dodgyrabbit - A Docker container with the PocketTTS.cpp version, packaged for easy integration with OpenClaw.
  • tts-audiobook-tool by @zeropointnine - Multi-model audiobook generator with automatic error detection, 48khz upscaling, synced browser reader, stand-alone server-mode.
  • seshat-tts by @scriptriva - Accessibility tool that provides real-time audio synthesis for games and apps. It also features a voice manager capable of cloning voices based on user presets.
  • LocalVocal.ai by @joshwhiton - Fully local conversational voice-harness for Macs with Apple Silicon. Includes voice-activity & turn detection, dictation, voice cloning, CLI to talk to Claude, Codex... and more.

Prohibited use

Use of our model must comply with all applicable laws and regulations and must not result in, involve, or facilitate any illegal, harmful, deceptive, fraudulent, or unauthorized activity. Prohibited uses include, without limitation, voice impersonation or cloning without explicit and lawful consent; misinformation, disinformation, or deception (including fake news, fraudulent calls, or presenting generated content as genuine recordings of real people or events); and the generation of unlawful, harmful, libelous, abusive, harassing, discriminatory, hateful, or privacy-invasive content. We disclaim all liability for any non-compliant use.

Authors

Manu Orsini*, Simon Rouard*, Gabriel De Marmiesse*, Václav Volhejn, Neil Zeghidour, Alexandre Défossez

*equal contribution

Download files

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

Source Distribution

pocket_tts_timestamped-1.0.0.tar.gz (69.7 kB view details)

Uploaded Source

Built Distribution

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

pocket_tts_timestamped-1.0.0-py3-none-any.whl (92.6 kB view details)

Uploaded Python 3

File details

Details for the file pocket_tts_timestamped-1.0.0.tar.gz.

File metadata

  • Download URL: pocket_tts_timestamped-1.0.0.tar.gz
  • Upload date:
  • Size: 69.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pocket_tts_timestamped-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f71626fae186ae16553f16752a48e4a68e4ec80e4a49df179ea7a908f8846d97
MD5 d50ba03e9625d9b72739d657681b35bd
BLAKE2b-256 07f4ec80f618c5b4db65dfc6fefd6051ef4dd9182f2ee36d3e0af2cf09c980f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pocket_tts_timestamped-1.0.0.tar.gz:

Publisher: publish-package.yml on dpm63/pocket-tts-timestamped

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pocket_tts_timestamped-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pocket_tts_timestamped-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f14d3b60e3c3bc7616de2c873ffb23d3c807a2fe83b798c74393a09443d4f5b4
MD5 cea43b5999c686c24b87883b865ee15e
BLAKE2b-256 e9cf51a6ca631e4dd9905b8526b66b443bd515a5ac2bd13310b9b8d56e565a2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pocket_tts_timestamped-1.0.0-py3-none-any.whl:

Publisher: publish-package.yml on dpm63/pocket-tts-timestamped

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.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