Skip to content

How-ToOS

How to Run Text-to-Speech Locally on Your PC with Kokoro and Piper

Kokoro and Piper are free, open-source text-to-speech tools that run on your own PC, with British English voices. This guide shows how to install each with pip on Windows 11, generate speech, choose a voice and avoid fake Kokoro websites. Forge PC hasn't tested either tool.

By , Editorial team

4 min read

How to Run Text-to-Speech Locally on Your PC with Kokoro and Piper

AI text-to-speech has improved enormously, and you no longer need a paid cloud service to get natural-sounding voices. Two free, open-source projects, Kokoro and Piper, run entirely on your own PC, so your text never leaves your machine and there are no usage limits. Both offer British English voices.

Forge PC hasn't tested these tools. The steps and details below come from each project's official GitHub and Hugging Face pages; commands can change between versions, so check the project pages if something doesn't work.

Kokoro or Piper?

Kokoro

Piper

What it is

Open-weight AI voice model with 82 million parameters

Fast local neural text-to-speech engine

Licence

Apache 2.0 (model weights)

GPL-3.0 (voice licences vary)

Install

pip install kokoro plus espeak-ng

pip install piper-tts

British English

Yes (several voices)

Yes (en_GB voices)

Best for

Highest quality from a small model

Speed and lightweight use, including smart home projects

Kokoro's developers say it delivers quality comparable to larger models while being significantly faster and more cost-efficient. Piper is used in projects including Home Assistant and the NVDA screen reader.

What you need

  • A Windows 11 PC (both also run on Linux and macOS).

  • Python 3 installed, with pip. If you're new to Python on Windows, a separate virtual environment for each tool avoids conflicts.

  • No powerful graphics card is required to try them, though both can use a GPU.

Option 1: Install and use Kokoro

Step 1: Install espeak-ng

Kokoro uses espeak-ng as a fallback for words it doesn't know and for some languages. On Windows, the Kokoro page says to:

  1. Go to the espeak-ng releases page on GitHub.

  2. Download the appropriate .msi installer for your system.

  3. Run the installer.

Step 2: Install Kokoro

Open a terminal and run:

pip install "kokoro>=0.9.4" soundfile

The quotation marks stop the Windows command prompt treating > as a redirect; Kokoro's own example omits them because it runs in a notebook.

Step 3: Generate speech

Create a file called speak.py with this code, based on the example in Kokoro's README:

from kokoro import KPipeline
import soundfile as sf

pipeline = KPipeline(lang_code='b')  # 'b' = British English
text = "Hello from Forge PC. This voice is running on my own computer."
generator = pipeline(text, voice='bf_emma')
for i, (gs, ps, audio) in enumerate(generator):
    sf.write(f'{i}.wav', audio, 24000)

Run it with python speak.py. Kokoro downloads the model the first time, then saves the speech as WAV files at 24,000Hz.

The lang_code must match the voice. Kokoro uses 'a' for American English and 'b' for British English. British voices listed on the project's voices page include bf_alice, bf_emma, bf_isabella and bf_lily (female) and bm_daniel, bm_fable, bm_george and bm_lewis (male). Of these, bf_emma has the highest overall grade (B-) on that page.

Watch out for fake sites. The Kokoro Hugging Face page warns that websites using the Kokoro name are not owned by or affiliated with the project and are likely scams. Install it only from the official GitHub, Hugging Face or PyPI pages.

Option 2: Install and use Piper

Step 1: Install Piper

pip install piper-tts

Step 2: Download a voice

Run python -m piper.download_voices to list the available voices, then download one by name. Piper's documentation uses an American voice as its example:

python -m piper.download_voices en_US-lessac-medium

Piper's voice list includes English (Great Britain) voices with names starting en_GB, so pick one of those if you want a British accent. Voices download to the current folder unless you use --data-dir.

Step 3: Generate speech

python -m piper -m en_US-lessac-medium -f test.wav -- "This is a test."

This writes test.wav with the spoken sentence. Piper's documentation notes the command line is slow for repeated use because it loads the voice each time, and recommends its built-in web server instead. Other useful options include --input-file to read text from a file and --cuda for GPU acceleration, which requires the onnxruntime-gpu package.

The Open Home Foundation, which looks after Piper, says it's looking for maintainers for the project, so check the GitHub page for current status.

Tips

  • Read long documents in chunks. Both tools handle sentences and paragraphs well; split very long text into sections.

  • Check licences before commercial use. Kokoro's weights are Apache-licensed, while Piper is GPL-3.0 and each voice has its own licence.

  • Combine with a local AI model. You can pair local text-to-speech with a chatbot running in Ollama or LM Studio for a fully offline assistant. Our best free local AI apps guide lists more tools.

Our verdict

Kokoro and Piper make local text-to-speech free and private. Kokoro is the one to try first for natural-sounding speech, with British English voices from an Apache-licensed 82-million-parameter model, while Piper is lighter and faster for repeated use and smart home projects. Both install with pip on Windows 11 and run without a cloud account. Install them only from the official project pages; Forge PC hasn't tested either tool.

The bottom line

Kokoro and Piper make local text-to-speech free and private. Kokoro is the one to try first for natural-sounding speech, with British English voices from an Apache-licensed 82-million-parameter model, while Piper is lighter and faster for repeated use and smart home projects. Both install with pip on Windows 11 and run without a cloud account. Install them only from the official project pages; Forge PC hasn't tested either tool.

Sources

  1. 01hexgrad, Kokoro on GitHub
  2. 02hexgrad, Kokoro-82M on Hugging Face
  3. 03hexgrad, Kokoro-82M voices
  4. 04Open Home Foundation, Piper (piper1-gpl) on GitHub
  5. 05Open Home Foundation, Piper command-line interface documentation
  6. 06Open Home Foundation, Piper voices

About the author

Forge PC Staff

Editorial team

The shared byline for articles researched, written and edited by the Forge PC editorial team. How we source, check and correct our work is set out in our editorial policy.

More from Forge PC Staff

Read next

How to Use System Restore in Windows 11: Turn It On, Create a Restore Point and Roll Back

How-To

How to Use System Restore in Windows 11: Turn It On, Create a Restore Point and Roll Back

Microsoft says System Protection isn't on by default. Search for Create a restore point, select your C: drive, choose Configure and turn it on, then create a restore point before installing drivers or tools. To roll back, run rstrui.exe, or use Troubleshoot > Advanced options > System Restore in Windows RE. Personal files aren't affected, but it isn't a backup.

Forge PC Staff3 min

How to Use Live Captions and Translation in Windows 11

How-To

How to Use Live Captions and Translation in Windows 11

Press Windows + Ctrl + L to turn on live captions in Windows 11 22H2 or later, download the language files, then dock or float the captions and pick a style. Captions are generated on the device and work offline. On a Copilot+ PC with 24H2 or later, live captions can translate from over 40 languages into English and 27 into Chinese (Simplified).

Forge PC Staff3 min

How to Manage Ollama Models: List, Remove and Move Them to Another Drive

How-To

How to Manage Ollama Models: List, Remove and Move Them to Another Drive

Run ollama ls to list your models, ollama ps to see what's loaded, ollama stop to unload one and ollama rm to delete it. On Windows, models are stored in C:\Users\%username%\.ollama\models; to move them, quit Ollama, set an OLLAMA_MODELS user environment variable to a folder on a bigger drive and restart Ollama.

Forge PC Staff3 min

Best Free Benchmark Software for PC in 2026: CPU, GPU, SSD and AI Tests

Best Picks

Best Free Benchmark Software for PC in 2026: CPU, GPU, SSD and AI Tests

The best free PC benchmarks in 2026: Cinebench 2026 for CPUs, Unigine Superposition Basic or 3DMark's free Steel Nomad test for graphics cards, CrystalDiskMark for SSDs, Geekbench 7 for cross-platform scores, Geekbench AI for NPUs, Blender Benchmark for creators and OCCT for stability. Run each test twice and download only from official sites.

Forge PC Staff5 min