Built with Claude Code. See how these projects were built for what that means in practice.
Twitch viewers trigger TTS that plays locally on stream. This bot relays that same audio into a Discord voice channel so friends gaming together hear it too.
The key design decision: the bot never generates audio and never speaks from Discord messages. It's a pure speaker/listener.
Streamer.bot writes every TTS WAV to %TEMP%\chatterbox_<guid>.wav
→ bot polls that folder every 100ms
→ sees a new file → copies it → plays into the voice channel
Details
- discord.py 2.7.1 in a Python 3.12 venv; opus codec bundled.
- FIFO playback queue, one track at a time — safe under rapid
!ttsspam. !ttsto join the channel,!leaveto disconnect, auto-leaves when the channel empties.- Works for every voice command automatically because they all share the
same
chatterbox_*.wavtemp-file pattern. - Silencing just yourself: right-click the bot in voice → User Volume → 0.
Files
bot.py the bot
config.json token, temp_dir, queue_dir, poll_interval_ms
queue/ staging folder for copied WAVs