TTS Highlight
pendingby l-huisman
Read notes aloud with real-time word-by-word highlighting using your system voices.
TTS Highlight
Read your Obsidian notes aloud with real-time word-by-word highlighting. Uses your system's built-in text-to-speech voices via the browser SpeechSynthesis API — no cloud services, no API keys, completely offline.
Features
- Word-by-word highlighting as text is spoken, in all editor modes:
- Source mode (CM6 decorations)
- Live Preview (including inside rendered tables)
- Reading mode (CSS Custom Highlight API with
<mark>fallback)
- Read full note, from cursor, or selection only
- Pause, resume, and stop via commands, ribbon icon, or status bar controls
- Configurable voice, rate, pitch, and volume
- Custom highlight color or use your vault's accent color
- Auto-scroll to keep the current word visible
- Smart markdown stripping — headings, bold/italic markers, link syntax, code fences, frontmatter, and table formatting are stripped before speaking, with a character-level position map back to the editor
- Large document support — text is chunked at sentence boundaries to avoid browser speech cutoffs
- Edge case handling — stops on document edit, stops on note switch, handles Safari quirks (missing
charLength,endevent not firing aftercancel)
Commands
| Command | Description |
|---|---|
| Read aloud | Read the entire note from the beginning |
| Read from cursor | Read from the current cursor position to the end |
| Read selection aloud | Read only the selected text |
| Pause / Resume | Toggle pause (starts reading if idle) |
| Stop | Stop playback and clear highlighting |
No default hotkeys are assigned to avoid conflicts. Bind them in Settings > Hotkeys by searching for "TTS Highlight".
Settings
| Setting | Description | Default |
|---|---|---|
| Voice | Select from available system voices | System default |
| Rate | Speech speed (0.5x - 2.0x) | 1.0 |
| Pitch | Voice pitch (0.5 - 2.0) | 1.0 |
| Volume | Playback volume (0.0 - 1.0) | 1.0 |
| Highlight color | CSS color for the highlighted word | Accent color at 35% opacity |
| Auto-scroll | Scroll to keep the highlighted word visible | On |
| Chunk size | Max characters per speech chunk | 5000 |
The settings tab also includes a Hotkeys section with quick access to configure keyboard shortcuts for each command.
Installation
From Community Plugins
- Open Settings > Community plugins
- Search for "TTS Highlight"
- Click Install, then Enable
Manual Installation
- Download
main.js,styles.css, andmanifest.jsonfrom the latest release - Create a folder
tts-highlightin your vault's.obsidian/plugins/directory - Copy the three files into that folder
- Enable the plugin in Settings > Community plugins
Known Limitations
- Desktop only. The
SpeechSynthesisUtteranceboundaryevent (which provides word positions) does not fire on Android. The plugin is markedisDesktopOnlyin the manifest. - Voice availability varies by OS. macOS includes high-quality voices out of the box. Windows and Linux may have fewer options — install additional voices through your OS settings.
- Chrome long-utterance cutoff. Chrome silently stops speaking after ~15 seconds of continuous speech. The plugin mitigates this by splitting text into chunks at sentence boundaries. If you experience cutoffs, try reducing the chunk size in settings.
- Safari quirks. Safari does not report
charLengthin boundary events and does not fire theendevent aftercancel(). The plugin includes workarounds for both.
Development
# Install dependencies
npm install
# Build (watch mode)
npm run dev
# Production build
npm run build
License
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.