Run text-to-speech on your CPU and clone voices locally
Type text and hear the first audio within roughly 200 milliseconds. This lightweight tool generates speech using only your computer's CPU, without complex hardware or external servers, and allows you to clone desired voices. It operates with simple installation and function calls.
October 2026: Tiny English models and training code released
In October 2026, tiny English models with 18.2M, 6.9M, and 1.9M parameters, including the decoder, were added. These models run up to 25 times faster than real-time on a single CPU thread. Additionally, training code was released in August 2026, allowing users to train custom models via the training/ directory. Community-trained models can be used immediately by specifying them with the --config argument.
CPU-optimized design and fast response times
The tool is designed to run efficiently on CPUs, eliminating the need for a GPU. The default model size is 100M parameters, while English models can be reduced to 1.9M parameters. It uses only two CPU cores and shows a latency of about 200 milliseconds to generate the first audio chunk. It can process infinitely long text inputs and supports audio streaming.
Various execution methods and voice cloning
You can use it as a command-line interface, a Python library, or a standalone binary. The generate command creates wav files, and the serve command starts a local HTTP server to generate speech via a web interface. The export-voice command converts audio files into voice embeddings to improve loading speed. Beyond the predefined voice list, you can perform voice cloning by passing a wav file as the --voice argument. Since the quality of the sample audio directly affects the resulting voice, it is recommended to refine samples before cloning.
Installation and requirements
It supports Python 3.10 through 3.14 and requires PyTorch 2.5 or higher. A GPU version of PyTorch is not necessary. On Linux, the default PyPI installation downloads the CUDA runtime, increasing the size, so you must specify the CPU-only index for installation. Using the command pip install pocket-tts --extra-index-url https://download.pytorch.org/whl/cpu installs the package without unnecessary NVIDIA packages. On macOS and Windows, the default PyTorch wheels are already CPU-only, so no additional configuration is needed.
Pre-use checks and limitations
GPU usage is not officially supported, and TTSModel.load_model() does not have a device argument. While a GPU may be faster on some hardware, no speed improvement was observed on powerful single-threaded CPUs like Apple Silicon. The feature to add silence to text input for creating pauses is currently not supported. When using the model, you must comply with prohibited uses such as illegal voice forgery or the creation of false information. Community models are used by specifying a URL with --config, and it is recommended to include the commit hash in the URL to prevent errors caused by model changes.