A real-time Twitch message overlay with Text-To-Speech (TTS) powered by Streamer.bot, PowerShell, and a WebSocket HTML overlay.
This system:
- Displays user profile, username, and message on screen
- Generates TTS audio dynamically
- Plays the audio through the overlay
- Includes an optional OBS dock view (no audio)
- 🔊 Windows TTS (natural speech)
- 🧠 Works with Streamer.bot WebSocket
- 🖥️ Clean animated overlay UI
- 📋 OBS Dock view with timestamps
- 🔇 Hidden PowerShell execution (no popups)
- ⚡ Fast & lightweight (no external APIs)
C:\Program Files\OBS-Studio\Files\Alerts\Message_Highlight_Overlay\
│
├── twitch_tts_overlay.html
├── twitch_tts_dock.html
├── tts_highlight.ps1
├── tts_message.wav (auto-generated)
- Windows OS
- Streamer.bot (v1.0.4+)
- OBS Studio
- WebSocket enabled in Streamer.bot
- Open Streamer.bot
- Go to Servers / Clients → WebSocket Server
- Enable it
- Default:
ws://127.0.0.1:8080
Add a Browser Source:
file:///C:/Program Files/OBS-Studio/Files/Alerts/Message_Highlight_Overlay/twitch_tts_overlay.html
✔ Enable:
- Shutdown source when not visible ❌ (OFF)
- Refresh browser when scene becomes active ❌ (OFF)
In OBS:
Docks → Custom Browser Docks
URL:
file:///C:/Program Files/OBS-Studio/Files/Alerts/Message_Highlight_Overlay/twitch_tts_dock.html
Create:
tts_highlight.ps1
This generates the TTS WAV file.
Imports:
showuserprofileshowusernameshowusermessage
Sets:
tts_usernametts_messagetts_output_file
Program:
powershell.exe
Arguments:
-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "tts_highlight.ps1" -Username "%tts_username%" -Message "%tts_message%" -OutputFile "%tts_output_file%"
Sends JSON via WebSocket:
{
"type": "custom.twitch.tts",
"payload": {
"showuserprofile": "...",
"showusername": "...",
"showusermessage": "...",
"ttsFile": "tts_message.wav"
}
}-
Streamer.bot triggers action
-
C# prepares user/message data
-
PowerShell generates
tts_message.wav -
C# broadcasts event via WebSocket
-
HTML overlay:
- Displays message
- Plays audio file
-
Overlay hides after 20 seconds
In browser console:
testTtsOverlay();⚠️ Run Streamer.bot as Administrator- 📁 Must have write access to overlay folder
- 🔁 WAV file is overwritten each trigger
- 🎧 OBS must have browser source audio enabled
- Queue system (no overlapping TTS)
- Unique WAV filenames per message
- Profanity filter
- Volume control via Streamer.bot
- Voice selection (male/female)
- Emote filtering
No audio playing?
- Check OBS browser source audio
- Ensure
tts_message.wavis created - Verify file path matches HTML
Overlay not showing?
- Check WebSocket connection
- Confirm Streamer.bot is running
- Check console (
F12)
- Streamer.bot
- OBS Studio
- Windows Speech API
Twitch TTS Highlight Overlay streamer.bot tts overlay twitch highlight overlay #streamer.bot streamer.bot
Free to use, modify, and share.
