Free swapsClaude Code & CodexPromptsSkillsAbout

Replace a paid voice generator with one that runs on your PC.

Time12 to 15 minutes
Cost$0 for the voice

I wanted a narrator voice for my videos without paying every month or sending my scripts to someone else's server. Kokoro is a free voice that runs on your own computer. This guide sets it up from nothing, in plain steps.

Hear what you will get
Before you start
  • A Windows PC with an internet connection and about 1.5 GB of free space (keep 2 GB free to be safe). Everything downloads once, which takes about 8 minutes, and after that it works without internet.
Two ways to do this
  • Path 1, the easy way. You paste one message into Claude Code and it sets everything up for you, which needs a paid Claude subscription and takes about 12 minutes, mostly waiting for downloads.
  • Path 2, the free way. No AI and no account, you copy a few commands yourself and it takes about 15 minutes.

Both give you the same thing: a voice that reads your text and saves it as an audio file.

Path 1: the easy way, with an AI assistant

The assistant does the typing for you. You paste one message and say yes when it asks. You need Claude Code, which comes with a paid Claude subscription. If you have not installed Claude Code yet, start with Install Claude Code on Windows.

1

Make an empty folder

In File Explorer, create a new empty folder called voice, for example inside Documents, where everything will be saved.

2

Open it in Claude

Open the Claude desktop app and sign in. Click Code, then + New session. Set Project folder to your voice folder and Environment to Local.

3

Paste the message

Copy all of this, paste it into the chat, and send it:

I want a free voice generator that runs on my own Windows PC, using the open Kokoro text-to-speech model (the "kokoro" Python package, model hexgrad/Kokoro-82M). I am a beginner, so explain each step in one plain sentence before you do it. Work only inside this folder and do not change anything else on my PC. 1. Run "py -0p" to see which Python versions I have. Kokoro needs Python 3.10, 3.11 or 3.12, not 3.13 or newer. If I have none of those, stop and ask me before installing Python 3.12 with winget. 2. Create a virtual environment in this folder and install kokoro and soundfile into it. Call Python by its path inside the environment instead of activating it. 3. Create script.txt with two short sample sentences, and speak.py, which reads script.txt and writes voice.wav. Put VOICE (start with am_fenrir) and SPEED (1.0) at the top of speak.py so I can change them. 4. Run it and check that voice.wav exists and is not empty. The first run downloads the model and takes a minute. 5. Finish with three short lines: how to change the text, how to change the voice, and the exact command to run it again.
4

Say yes and wait

Claude asks for permission before it installs anything or creates files, so say yes when it asks. The download takes about 10 minutes and it may look like nothing is happening, which is normal.

You should see: a file called voice.wav in your folder, double-click it to listen.
What to knowAt the end Claude tells you the command to run next time, so copy that one. If Claude shows an error, paste it back into the chat and it fixes it.

Path 2: the free way, by hand

Longer, but you see every piece and it costs nothing.

1

Open PowerShell

PowerShell is a window where you type commands instead of clicking, and it comes with Windows.

Press the Windows key, type PowerShell and press Enter to open it.

You should see: a window with a line that ends in > and a blinking cursor, where you can type.
2

Check Python

The voice runs on Python, a free program. This command shows whether you have it.

$ py -0p
-V:3.13 * C:\Users\you\AppData\Local\Programs\Python\Python313\python.exe -V:3.11 C:\Users\you\AppData\Local\Programs\Python\Python311\python.exe
Example output.

Look for a line with 3.11 or 3.12. If you see one of them, go to the next step.

If you have none of those, or the command says "py is not recognized", install Python 3.12:

$ winget install Python.Python.3.12

If you do not have winget, download Python 3.12 from python.org and tick "Add python.exe to PATH". Then close PowerShell and open it again.

3

Make a folder

What this does: creates a folder called voice and a private space inside it for the voice tool, so nothing else on your PC changes.

$ mkdir voice
cd voice
py -3.12 -m venv venv

This creates the folder inside your user folder, for example C:\Users\your name\voice. If your Python is 3.11, write -3.11 instead of -3.12.

You should see: no error text, and a folder called venv inside the voice folder when you open it in File Explorer.
4

Install the voice

What this does: downloads the voice tool. It is about 1.2 GB and takes about 7 minutes, and lots of scrolling text is normal.

$ .\venv\Scripts\python -m pip install kokoro soundfile
You should see: a last line that starts with "Successfully installed".
5

Create two files

What this does: script.txt is the text you want read. speak.py is a small program that reads it aloud.

Open Notepad and type a few sentences. Choose File, Save as, and save it as script.txt inside the voice folder.

Then make a second file with the content below and save it as speak.py in the same folder. Before you save, set "Save as type" to All files, so the file is saved as speak.py.

# speak.py: turns script.txt into voice.wav with the Kokoro text-to-speech model import numpy as np import soundfile as sf from kokoro import KPipeline VOICE = "am_fenrir" # change this to try another voice SPEED = 1.0 # 0.8 = slower, 1.2 = faster text = open("script.txt", encoding="utf-8").read() pipeline = KPipeline(lang_code=VOICE[0], repo_id="hexgrad/Kokoro-82M") audio = [chunk for _, _, chunk in pipeline(text, voice=VOICE, speed=SPEED)] sf.write("voice.wav", np.concatenate(audio), 24000) print("Saved voice.wav")
speak.py open in a code editor next to script.txt in the voice folder
You should see: speak.py with the VOICE and SPEED lines near the top, and script.txt next to it in the folder list. This picture uses Visual Studio Code, and SPEED is 0.9 here, while your file starts at 1.0. Notepad works as well.
You should see: two files in the voice folder, script.txt and speak.py. Turn on "File name extensions" in the View menu of File Explorer to see the real names: they should end in .txt and .py.
6

Run it

What this does: reads script.txt and saves the voice as voice.wav. The first run also downloads the voice model (about 300 MB), so it takes about a minute, and later runs take about 15 seconds.

$ .\venv\Scripts\python speak.py
You should see: "Saved voice.wav" and a new voice.wav file in the folder (double-click it to listen). Some warning lines before that are normal.

Run the command from inside the voice folder, next to script.txt.

The voice folder with voice.wav, and a terminal showing the run of speak.py ending with Saved voice.wav
A real run. Left: the voice folder, which now has voice.wav in it. Right: the terminal, the command and then Saved voice.wav.

Pick your voice

To try another voice, copy a name from the table below, put it after VOICE = in speak.py, save, and run it again. The first letter of a name is the accent (a American, b British), the second is f female or m male. Listen to all of them here, the same sentence in each:

VoiceAccentListen
af_heartAmericanFemale
af_bellaAmericanFemale
af_nicoleAmericanFemale
af_sarahAmericanFemale
bf_emmaBritishFemale
am_michaelAmericanMale
am_fenrirAmericanMale
am_puckAmericanMale
bm_georgeBritishMale
bm_fableBritishMale

You can also change SPEED in the same file: 0.9 is a little slower and 1.1 a little faster, and you can try as many as you like.

Make another audio later

Your settings are saved in the two files. You only type one command each time.

1

Change the text

Open script.txt in Notepad, replace the text, and save.

2

Change the voice or speed (optional)

Open speak.py in Notepad. Near the top are two lines, VOICE and SPEED. Change them and save, and they stay as you set them.

The VOICE and SPEED lines of speak.py
The two lines to change. Try bf_emma for a British voice, or set SPEED to 0.9 for a slower read.
3

Run it again

Open the voice folder in File Explorer. If you followed Path 2, it is inside your user folder, for example C:\Users\your name\voice. Click the address bar at the top, type powershell, press Enter, and run:

$ .\venv\Scripts\python speak.py
You should see: "Saved voice.wav" and a new voice.wav.
4

Keep the file you like

Each run replaces voice.wav, so rename the one you want to keep before you run again.

If you used Path 1, just tell Claude in the same chat what you want, for example "read this text with voice bf_emma, a little slower".

Use the audio file

voice.wav is a normal audio file, so drag it into your video editor (CapCut, DaVinci Resolve, Premiere) or play it anywhere. For a long text, split it into short paragraphs and make one file per paragraph, so a bad sentence is quick to redo.

How to get the best result

Try two or three of the 10 voices on the same sentence and keep the one that suits your video. The tone is calm and even, which fits explainer videos, tutorials and how-tos, in English. Split a long text into short paragraphs, make one file per paragraph, and listen to each file once before you use it.

Want more free tools like this? Follow my content and check my other posts.

Get the next guide when it is ready.

One email a week at most, and you can leave whenever you like.

One email at most per new guide. Unsubscribe any time.