Have a local TTS service read your Twitch Chat for you!
Reads all chat messages except your own and speaks them aloud using Edge-TTS (modern neural voices).
This project relies on Python 3.8+ and the following things:
- Edge-TTS (uses Microsoft Edge neural voices, requires
edge-ttsPython package andffmpegfor audio playback). - (Windows) Per‑app volume ducking uses
pycaw; on non‑Windows, TTS still works but ducking is disabled.
Make sure Python 3.8 or newer is installed on your system:
- Download Python
- Verify installation with:
python --versionpip install -r requirements.txt-
REQUIRED: Install FFmpeg to play audio output
- Download from https://ffmpeg.org/download.html
- Follow platform-specific installation instructions to add
ffmpegto your system PATH.
- Clone this repository or download the script.
- Install the required dependencies:
pip install -r requirements.txt- Run the bot:
python Twitch_TTS.pyOn Windows, you can also double‑click Startup.bat after editing config.txt.
- The bot will join your specified channel and read aloud all chat messages except your own.
Edit config.txt:
CHANNEL_NAME: Your Twitch channel (without the#).NAME_REPEAT_COOLDOWN: Seconds before repeating the username in TTS (default15).TTS_VOLUME: TTS loudness 0.0–1.0 (default1.0).TTS_ATTENUATION: Relative multiplier to duck other apps during TTS (default0.5).TTS_VOICE: Edge-TTS neural voice name (defaulten-GB-RyanNeural). Examples:en-US-GuyNeural,en-GB-SoniaNeural,ja-JP-NanamiNeural.ATTENUATION_EXCLUDE_PROCESSES: Comma-separated process names to exclude from ducking (optional).ATTENUATION_DELAY_MS: Fade duration and pre-duck delay in ms (default100).IGNORE_USERS: Comma-separated usernames to ignore (case-insensitive).
Notes:
ffplay.exeis excluded from ducking automatically so TTS playback is unaffected.- Ducking is applied once per burst of messages and restored after a brief grace (uses
ATTENUATION_DELAY_MS).
- Official voice list (names to use in
TTS_VOICE): - Voice gallery with audio samples:
- Ensure that
ffmpegis installed and accessible in your system's PATH. - The bot skips your own messages and commands starting with
!.
- Error: "ffplay not found" → Install FFmpeg and ensure
ffmpeg\binis on PATH, or provide full path toffplay. - No ducking on macOS/Linux → Expected; per‑app ducking requires Windows +
pycaw.
MIT License — see the license file for details.