Projects — michaelslop.org
Discord TTS mirror bot
← back to projects
2026-08-03 · python, discord, bots

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 !tts spam.
  • !tts to join the channel, !leave to disconnect, auto-leaves when the channel empties.
  • Works for every voice command automatically because they all share the same chatterbox_*.wav temp-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

CS student · developer · streamer

localhost:8000