A Tampermonkey/Violentmonkey userscript that reads new chat messages aloud on any website using the browser's built-in text-to-speech, with a floating control panel for playback (Start / Pause / Skip / Stop) and per-user filtering.
Originally built for the VTF (Virtual Trading Floor — vtf.t3live.com) trading chat room. The default container selector points to VTF's main chat, so VTF users need zero configuration.
- Works on any website — use the "Pick Message Area" button to select any element on any page as the message source
- Live chat narration — new messages are spoken as they arrive
- Playback controls — Start, Pause, Skip current message, Stop (clears the queue)
- Smart sender formatting — extracts sender and body from common DOM patterns (
<strong>,<b>, class-name hints,name: bodyfallback) - Optional first-name only — "Alice Smith" → "Alice"
- Optional timestamp announcement — toggle whether to read "10:57 AM" out loud
- Ignore list — comma-separated usernames to skip (matches full or first name)
- Skip-own-messages — don't read messages you yourself sent
- Voice / rate / volume picker — uses any voice installed in your OS
- Collapsible UI — playback controls remain visible while settings collapse
- Draggable panel — move it out of the way
- Persistent config — settings saved to
localStorage, survive page reloads - Live queue counter — see how many messages are waiting to be read
- Install Tampermonkey (Chrome / Edge / Firefox / Safari) or Violentmonkey.
- Open the Tampermonkey dashboard.
- Click + → Create a new script.
- Delete the template code.
- Paste the contents of
message-reader.user.js. - Save (
Ctrl+S). - Open the target site. The orange-bordered Message Reader panel appears in the top-right corner.
- Click Test Voice to confirm audio works.
- (Optional) Click Pick Message Area and click the chat message list to lock in the exact DOM selector. Auto-detect handles this automatically for VTF and common chat patterns.
- Click ▶ Start.
New messages in the watched container will be spoken as they arrive.
| Button | Behavior |
|---|---|
| ▶ Start | Begins reading new messages. If paused, resumes. |
| ⏸ Pause | Pauses the current utterance. Queue is preserved. |
| ⏭ Skip | Cancels the current message and immediately starts the next queued message. |
| ⏹ Stop | Cancels current utterance, clears the queue, ignores incoming messages until Start. |
| Setting | Default | Description |
|---|---|---|
| Read new messages as they arrive | off | Master toggle for queueing new messages |
| First name only | on | Read "Alice" instead of "Alice Smith" |
| Announce sender name | on | Prepend the sender to every message |
| Announce timestamp | off | Prepend "10:57 AM" to every message |
| Skip my own messages | on | Combined with "My username" below |
| My username | empty | Your display name, used for the self-skip filter |
| Skip messages from these users | empty | Comma-separated ignore list (matches full or first name) |
| Voice / Rate / Volume | system default / 1.0 / 1.0 | Standard text-to-speech parameters |
- Locates the chat container (uses the configured CSS selector, then auto-detects, then falls back to the element picker).
- Attaches a
MutationObserverto that container withsubtree: true. - When new nodes are added, tries VTF-specific extraction (
<app-st-compactmessage>) first, then falls back to generic extraction. - Generic extraction: finds sender in
<strong>,<b>, or elements with common class names; strips timestamps; falls back toname: bodysplitting. - De-duplicates against a 200-entry recent-messages buffer.
- Filters using the ignore list / self-skip.
- Builds the spoken string:
[time] FirstName: message(parts individually toggleable). - Pushes onto a queue and feeds the browser's
SpeechSynthesisone utterance at a time.
A generation counter invalidates pending onend callbacks when the user hits Skip or Stop, so playback control is always precise.
- Chrome / Edge — fully supported (recommended).
- Firefox — supported; voice list may be smaller.
- Safari — supported with caveats; speech rate behavior differs.
Requires the Web Speech API (window.speechSynthesis), available in all modern browsers.
- Voice availability depends on your OS. Windows ships with "Microsoft David" / "Microsoft Zira"; macOS has many more.
- Chrome stops speech synthesis after ~15 seconds of continuous audio in some versions — usually fine since individual messages are short.
- On Angular SPAs (like VTF), Angular component names can change between builds. The manual Pick Message Area button always works as a fallback.
- The script runs in the top frame only (
@all-frames false).
Single-file userscript — no build step required.
git clone https://github.com/sbcmsbgithub/message-reader.git
cd message-reader
# Edit
vim message-reader.user.js
# Test: paste the updated source into Tampermonkey's editor and reload the target tab.See CLAUDE.md for in-depth project context (architecture, DOM specifics, extraction strategy) — useful when iterating with Claude Code.
Pull requests welcome. Please:
- Bump the
// @versionfield in the userscript header following semver. - Add an entry to
CHANGELOG.md. - Test on a live session before submitting.
- T3 Live for building VTF.
- The Tampermonkey project for making userscripts trivial to install.