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

US and UK English voices, plus an optional Korean voice picked automatically for lines with Hangul.

⚡

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 alsa-utils curl git

No Python needed: this uses the standalone Piper 1.2.0 binary, which starts in about 0.25 s per line (the Python package takes about 0.95 s).

2

Download Piper 1.2.0

mkdir -p $HOME/.local/share $HOME/.local/bin
curl -L https://github.com/rhasspy/piper/releases/download/v1.2.0/piper_amd64.tar.gz \
    | tar xz -C $HOME/.local/share

This creates ~/.local/share/piper/ with the binary, its libraries and espeak-ng-data.

3

Download a voice

mkdir -p $HOME/.local/share/piper/models
cd $HOME/.local/share/piper/models
V=https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_GB/jenny_dioco/medium/en_GB-jenny_dioco-medium
curl -L -O $V.onnx -O $V.onnx.json
4

Install the wrapper script

git clone https://github.com/zirize/piper-renpy-selfvoicing.git $HOME/.local/share/piper/scripts
ln -sf $HOME/.local/share/piper/scripts/piper_espeak_wrapper.sh $HOME/.local/bin/espeak

Or run ./install.sh from a clone of the repository to do steps 2–4 at once (./install.sh --korean adds the Korean voice).

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
en_US-amy-mediumUS EnglishMedium
en_GB-jenny_dioco-mediumUK EnglishMedium (default)
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/piper_espeak_wrapper.sh. Voices whose .onnx.json says "phoneme_type": "espeak" work with Piper 1.2.0.

Korean Voice

Lines containing Hangul are read with ko_KR-kss-medium (CC BY-NC-SA 4.0). Install it with ./install.sh --korean. Its config was written by Piper 1.5.0 and makes 1.2.0 abort with Phonemes must be one codepoint; the installer removes the five multi-codepoint entries (aɪ aʊ ɔɪ eɪ oʊ), which Korean does not use.

Auto-Advance (currently disabled)

The wrapper contains code that presses Space after each line (needs xdotool, X11 only, and RENPY_MODE=1). It is disabled: the script exits right after playback. Delete the exit 0 line after the piper command to re-enable it.

Repository Files

FileDescription
piper_espeak_wrapper.shThe espeak wrapper; ~/.local/bin/espeak links to it
install.shInstallation script (--korean adds the Korean voice)
guide.txtStep-by-step guide
note.txtQuick reference for the MODEL lines