Accessibility Tool

Piper TTS for Ren'Py Self-Voicing

Replace Ren'Py's robotic espeak voice with natural-sounding AI speech on Linux โ€” free, local, no internet required.

โญ View on GitHub ๐Ÿ’ฌ Reddit Guide ๐Ÿ”Š Browse Voices
๐Ÿง 

Neural TTS

Piper uses ONNX neural models for natural, human-like voice synthesis.

๐Ÿ”’

100% Offline

All processing is local. No API keys, no internet connection needed during use.

๐ŸŽฎ

Ren'Py Compatible

Works transparently with Ren'Py's built-in self-voicing (press V).

๐ŸŒ

Multiple Voices

Choose from US and UK English voices. Switch with one line change.

โšก

Fast

Low latency synthesis โ€” speech starts within milliseconds of each line.

โ™ฟ

Accessibility

Makes visual novels accessible to visually impaired players on Linux.

How It Works

Ren'Py calls espeak -v <voice> -a <amp> <text> whenever self-voicing is active. This project installs a wrapper script named espeak that intercepts those calls and redirects speech synthesis to Piper TTS instead. The audio is played back immediately via aplay.

Ren'Py never knows the difference โ€” it still calls espeak, but now it sounds natural.

Installation

1

Install dependencies

sudo apt install python3 python3-pip alsa-utils
2

Install piper-tts

pip install --user piper-tts

Or from a locally downloaded wheel: pip install --user /path/to/piper_tts-1.4.2-*.whl

3

Create model directory and download a voice

mkdir -p $HOME/.local/share/piper/models

# List all available voices:
python3 -m piper.download_voices

# Download UK English (jenny_dioco):
python3 -m piper.download_voices en_GB-jenny_dioco-medium \
    --data-dir $HOME/.local/share/piper/models
4

Install the wrapper script

# Clone this repo (or download the script manually)
git clone https://github.com/zirize/piper-renpy-selfvoicing.git
mkdir -p $HOME/.local/share/piper/scripts
cp piper-renpy-selfvoicing/piper_espeak_wrapper.sh $HOME/.local/share/piper/scripts/espeak
chmod +x $HOME/.local/share/piper/scripts/espeak
ln -sf $HOME/.local/share/piper/scripts/espeak $HOME/.local/bin/espeak
5

Test

espeak "Piper installation complete."

If you hear the voice, you're done! Launch a Ren'Py game and press V to enable self-voicing.

๐Ÿ’ก $HOME/.local/bin is in PATH by default on Ubuntu 21.04+, Fedora, Arch, and most modern distros. If espeak is not found, run export PATH="$HOME/.local/bin:$PATH" or add it to your ~/.bashrc.

Available Voice Models

Browse all voices at rhasspy.github.io/piper-samples. Some recommended options:

Model IDLanguageQuality
en_US-hfc_female-mediumUS EnglishMedium (default)
en_US-amy-mediumUS EnglishMedium
en_GB-jenny_dioco-mediumUK EnglishMedium
en_GB-cori-highUK EnglishHigh
en_GB-alba-mediumUK English (Scottish)Medium
en_GB-semaine-mediumUK EnglishMedium

To switch voices, edit MODEL= at the top of ~/.local/share/piper/scripts/espeak.

Optional: Auto-Advance

The wrapper can automatically press Space after each dialogue line finishes speaking, so you don't have to click โ€” great for listening to a whole scene hands-free.

sudo apt install xdotool
RENPY_MODE=1 ./YourGame

Repository Files

FileDescription
piper_espeak_wrapper.shMain espeak wrapper (copy to ~/.local/share/piper/scripts/espeak)
install.shAutomated installation script
guide.txtDetailed step-by-step guide
note.txtQuick reference for voice models