pocket-tts README

The project's README from github.com/kyutai-labs/pocket-tts. As one markdown file: README.md.

Pocket TTS

pocket-tts-logo-v2-transparent

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

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 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 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 pocket-tts generate
# or if you installed it manually with pip:
pocket-tts 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. --language english_drifting_26-09 selects an English model whose sampler head was trained with drifting instead of LSD (see training/README.md for the recipe). 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 pocket-tts serve
# or if you installed it manually with pip:
pocket-tts 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
# or
uv add pocket-tts

CPU-only installation

On Linux, PyPI serves the CUDA build of PyTorch by default, so pip install pocket-tts 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 --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 pocket-tts 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 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())

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 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:

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

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 pocket-tts 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 pocket-tts generate --config https://raw.githubusercontent.com/kyutai-labs/pocket-tts/891886a61a1ed45fd429a0a63bd96181e6cff637/pocket_tts/config/english_2026-04.yaml

or with hf://...

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

List of community-trained models

Pocket TTS Czech by @vvolhejn
uvx pocket-tts generate \
  --config hf://vvolhejn/pocket-tts-czech/czech.yaml@7b7760dd0fe994a0800f2fdbc837dc4b8f219d1c \
  --text "Dnešek je velmi dobrý den"
Pocket TTS Hindi by Saryps Labs
uvx pocket-tts generate \
  --config hf://saryps-labs/pocket-tts-hindi/config.yaml@dbaa326069d20bfbdaeb625613736773741a24ea \
  --text "आज का दिन बहुत अच्छा है"
Pocket TTS Korean 300M by @seastar105
uvx pocket-tts generate \
  --config hf://seastar105/pocket-tts-korean-300m/korean.yaml@df328c817a02866f20a6f74e5183e0a1fc6f6435 \
  --text "안녕하세요. 한국어 음성 합성 모델입니다."
Pocket TTS Persian (Farsi) by @mallahyari
uvx --with soundfile pocket-tts generate --config hf://mehdi-hf/pocket-tts-farsi/farsi.yaml@3c59d06b3177b21c5cd0df9e9e3e899f4d361c1c \
    --voice hf://mehdi-hf/pocket-tts-farsi/example_voice.wav --text "سلام، حال شما چطور است؟"
Pocket TTS Indonesian by @anak10thn, 6 layers
uvx pocket-tts generate \
  --config hf://anak10thn/pocket-tts-indonesian/indonesian_6l.yaml@6196fe14c6c2108332c16d33c864c8901c044aaa \
  --text "Selamat pagi. Ini model sintesis suara bahasa Indonesia."
Pocket TTS Estonian by @cbentes
uvx pocket-tts generate \
  --config hf://cbentes/pocket-tts-estonian/estonian.yaml@8934022f1befb3dc568351e3b88e48a9edb94d7d \
  --voice hf://cbentes/pocket-tts-estonian/voices/et_f_reporter.wav@8934022f1befb3dc568351e3b88e48a9edb94d7d \
  --text "Tere! Mina olen eesti keele kõnesüntesaator ja töötan tavalises arvutis kiiremini kui reaalajas."
Pocket TTS Cymraeg (Welsh) by EryriLabs, 24 layers
uvx pocket-tts generate \
  --config hf://EryriLabs/pocket-tts-cymraeg/config.yaml@1f23b3a8d1706b24a2faf3c77075a223ed69f57c \
  --text "Mae'r tywydd yn braf yng Nghymru heddiw."
Pocket TTS Turkish by @alperiox, 6 layers
uvx pocket-tts generate \
  --config hf://alperiox/pocket-tts-turkish/turkish_6l.yaml@13d9b4ad051ce9d5ef5bfb8af9724be01ad2fd31 \
  --text "Merhaba, bugün hava çok güzel."
Pocket TTS Polish by @shefowl, 6 layers
uvx pocket-tts generate \
  --config hf://shefowl/pocket-tts-polish-6l/config.yaml@a8630f2a39055d3e5a91acb7922e31bd0c506cfe \
  --voice hf://shefowl/pocket-tts-polish-6l/reference.wav@a8630f2a39055d3e5a91acb7922e31bd0c506cfe \
  --text "Dzień dobry. Nazywam się Krzysztof Wiśniewski i mówię po polsku."
Pocket TTS Greek (Ελληνικά) by Myned AI, 6 layers
uvx pocket-tts generate \
  --config hf://myned-ai/pocket-tts-greek/greek.yaml@c578b65949df101ac352e84ac5c236206e5bb348 \
  --voice hf://myned-ai/pocket-tts-greek/voices/eleni.wav@c578b65949df101ac352e84ac5c236206e5bb348 \
  --text "Καλημέρα! Θέλετε να κλείσουμε ένα ραντεβού για αύριο;"
Pocket TTS Japanese (日本語) by @takuma104, 6 layers
uvx pocket-tts generate \
  --config hf://takuma104/pocket-tts-ja/japanese.yaml@562a82cba331499b75a050b7e200f4ee3241b9e9 \
  --voice hf://takuma104/pocket-tts-ja/voices/female_03.wav@119685fd7a51356429c6d25e37d570b423c17663 \
  --text "こんにちは。今日はいい天気ですね。"
Pocket TTS Chinese (中文) by @hustfyb, 6 layers
pip install pocket-tts soundfile wetext
cd <本目录>
python demo.py --prompt your_voice.wav --text "您的订单编号是20260918123456,退款368.5元预计三个工作日内到账。" --out out.wav

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

Projects using Pocket TTS

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

pocket-tts (kyutai-labs/pocket-tts)

Searching Database…

Что это такое?Pocket TTS — это легковесный движок синтеза речи от Kyutai, который эффективно работает только на процессоре (CPU). Он использует небольшую модель на 100 миллионов параметров, выдаёт аудио потоком и умеет клонировать голос.
Это Python-библиотека, CLI или веб-приложение?Сразу всё три: Python-библиотека и CLI, которые устанавливаются через pip, плюс локальная команда «serve», которая открывает веб-интерфейс по HTTP, и официальная демо-версия в браузере на сайте Kyutai.
Как сгенерировать первую аудиозапись?Запустите `uvx pocket-tts generate --text ... --voice ...` (или сначала `pip install pocket-tts`) — команда запишет файл ttsoutput.wav. Если хотите, чтобы модель оставалась загруженной, используйте `pocket-tts serve` и генерируйте аудио через локальный веб-интерфейс или HTTP.
Есть ли подводные камни при установке?В Linux обычная установка через pip по умолчанию подтягивает сборки (wheel) PyTorch с поддержкой CUDA, которые занимают несколько гигабайт, хотя приложению нужен только CPU. Поэтому нужно указать pip индекс PyTorch только для CPU. В macOS и Windows такой проблемы нет.
Отличается ли установка в разных ОС?Да: пользователям Linux нужно вручную выбрать индекс PyTorch только для CPU, чтобы не получить сборку с CUDA, а в macOS и Windows сборки только для CPU уже идут по умолчанию.
Насколько он быстрый?Цель — около 200 мс задержки до первого аудиофрагмента. На процессоре MacBook Air M4 он работает примерно в 6 раз быстрее реального времени и использует всего 2 ядра процессора.
Можно ли клонировать свой голос?Да — передайте любой чистый wav-файл в --voice, чтобы клонировать голос на лету, либо заранее подготовьте эмбеддинг голоса в формате safetensors с помощью команды export-voice — тогда загрузка потом будет намного быстрее.
Какие языки и голоса встроены?В комплекте предобученные модели для английского, французского, немецкого, португальского, итальянского и испанского языков, а также каталог готовых именованных голосов, например alba, giovanni, lola и juergen.
Можно ли запустить это в браузере, а не в Python?Официальная демо-версия на сайте Kyutai уже работает прямо в браузере, а сообщество сделало порты (WebAssembly/Rust через Candle или XN, ONNX Runtime Web), которые позволяют запускать модель на стороне клиента и в JavaScript.
Size
1.7 MB
Stars
9.9K
Age
9mo
Commits · 90 Days