7 oktober 2025

Piper-tts training

Starting the processing

Let’s create the training-script.

python -m piper.train fit ^
 --data.voice_name "your_call" ^
 --data.csv_path ..\dataset\metadata.csv ^
 --data.audio_dir ..\dataset\wav ^
 --model.sample_rate 22050 ^
 --data.espeak_voice "your_language" ^
 --data.cache_dir ..\cache ^
 --data.config_path ..\dataset\config.json ^
 --data.batch_size 8 ^
 --ckpt_path ..\dataset\stripped_checkpoint.ckpt

Copy the script in your text-editor and save it in the piper1-gpl folder as e.g. my_training.bat. I chose to put my callsign in the voice_name so if I would use it in a multi-mutli contest where you switch operators, it’s easier to know it’s my model. The checkpoint file is the one we just converted and stripped. Set the language to the one of the model you used. And if you have a beefier video-card with more RAM, you can try and increase the batch-size. If it’s too high, the GPU-memory will all be eaten up, and then maybe one window opens, and the processing crashes because it ran out of GPU-memory.

Start the script, and if all is well, the numbercrunching should start.

Potential errors and solutions

Stefan, DL1PSK, had a runtime-error when starting the script: Failed to set voice: en-GB.
His solution, look in the config.json of the downloaded ckpt, and use that as data.espeak.voice

You can abort the processing by pressing Ctrl+C. You can find the last checkpointfile in the piper1-gpl\lightning_logs\versionXX\checkpoints-folder, where XX is the one with the highest number. Copy that file to your dataset\ckpt-folder and replace the filename in my_training.bat file and restart the script.