Description
OGS Simple Browser Text to Speech adds a lightweight Listen / Pause / Resume / Stop player to selected public post types.
Key characteristics:
- No API key or plugin-managed TTS service. Speech is provided by the visitor’s browser/operating system; some installed voices may use the browser vendor’s remote speech service.
- No audio generation or server-side processing.
- Enabled by post type, so all existing and future posts of enabled types are covered automatically.
- Reads the final rendered DOM instead of modifying stored post content.
- Automatic content detection with manual overrides using
.simple-browser-tts-contentand.simple-browser-tts-ignore. - Visitor-selectable reading speed, stored locally in the browser only when visitor speed controls are enabled.
- Progressive enhancement: if SpeechSynthesis is unavailable, the site content remains unaffected.
Default content type: Posts.
Page builder compatibility
The plugin is builder-agnostic: it reads the final rendered frontend DOM and does not depend on private builder PHP APIs. It recognizes standard WordPress semantic markup plus selected stable roots for Elementor, Beaver Builder, and Bricks, then falls back to article or main.
This approach is intended to work with content rendered by Gutenberg, Classic Editor, LiveCanvas and other popular builders, but builders and themes can produce arbitrary markup. For exact control on any builder or custom theme:
- Add class
simple-browser-tts-contentto the container that should be read. - Add class
simple-browser-tts-ignoreto content that should not be read. - Or configure a CSS content selector under Settings > Text to Speech > Advanced.
LiveCanvas normally places page content in a single <main> element, which is covered by the fallback detector. Other builders that render content inside article or main are handled the same way.
Browser notes
Speech quality, available voices and pause/resume behavior are provided by the browser and operating system. The plugin prefers a local voice matching the page language when one is available and otherwise uses only a voice matching that language. If no matching voice is exposed, it leaves voice selection to the browser instead of forcing a voice from another language. Because the Web Speech API uses a document-wide speech queue, the plugin will not start while another script is already using speech synthesis on the page. Background or locked-screen speech can still be limited by the browser or mobile operating system.
Privacy
OGS Simple Browser Text to Speech does not send content, analytics, telemetry or settings to the plugin author and does not make its own network requests for speech synthesis.
Speech synthesis itself is a browser/operating-system feature. The plugin neither selects nor communicates with a third-party speech provider. Depending on the visitor’s browser, operating system and selected voice, the user agent may implement a voice locally or through a remote service operated by its vendor. Site owners should account for that browser/OS behavior in their own privacy disclosures when applicable.
When visitor speed controls are enabled, the selected reading speed is stored in the visitor’s browser using localStorage. The plugin also stores a small first-use marker after the visitor first interacts with the player. It uses localStorage when available and falls back to sessionStorage if persistent storage is blocked. No cookie is created by the plugin and these values are not transmitted by the plugin.
Keyboard shortcuts
OGS Simple Browser Text to Speech does not currently register global keyboard shortcuts. If shortcuts are introduced in a future release, they will be documented in this section together with their scope and accessibility behavior.
Developer notes
Use the simple_browser_tts_should_load filter to override whether TTS assets load on a specific frontend request. The default behavior remains unchanged: enabled singular post types only.
Developers can also set an explicit mount target without changing plugin templates:
simple_browser_tts_player_mount_selectorreturns a CSS selector for the element used as the mount target. Return an empty string to keep automatic placement.simple_browser_tts_player_mount_positioncontrols insertion relative to that target and acceptsbeforebegin,afterbegin,beforeend, orafterend.
If the custom selector is missing or invalid on the current page, the plugin falls back to its normal before/after placement around the detected content root.
The frontend player is fully scoped under .simple-browser-tts-player and exposes CSS custom properties for theme integration. Common overrides include --simple-browser-tts-bg, --simple-browser-tts-border, --simple-browser-tts-text, --simple-browser-tts-accent, --simple-browser-tts-accent-text, --simple-browser-tts-error, --simple-browser-tts-radius, and --simple-browser-tts-btn-radius. The default --simple-browser-tts-accent-text uses the system Canvas color; themes that override --simple-browser-tts-accent should also override --simple-browser-tts-accent-text when needed to preserve sufficient contrast. The player also exposes is-playing and is-paused state classes for optional state-specific styling.
Installation
- Upload the plugin folder to
/wp-content/plugins/or install the ZIP from Plugins > Add New > Upload Plugin. - Activate OGS Simple Browser Text to Speech.
- Go to Settings > Text to Speech.
- Posts are enabled by default. Select any additional public post types as needed.
FAQ
-
Does the plugin send post content to an external API?
-
The plugin does not call an external TTS API. It passes text to the browser’s Web Speech API. Some browsers or operating systems may implement particular voices using their own remote services; that communication, when it occurs, is performed by the user agent rather than by the plugin.
-
How do I choose exactly what is read?
-
Add
simple-browser-tts-contentto the container to read, addsimple-browser-tts-ignoreto content to skip, or set CSS selectors under Settings > Text to Speech > Advanced. -
Why is no player shown on a page?
-
The plugin loads only on enabled singular post types and only when it can find enough readable content. JavaScript must be enabled and the browser must expose the Web Speech API.
-
Why do voices differ between devices?
-
Voice availability is controlled by the visitor’s browser and operating system. The plugin does not bundle speech engines or voices.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“OGS Simple Browser Text to Speech” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “OGS Simple Browser Text to Speech” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.15
- Harden settings sanitization for malformed post type and reading-speed inputs.
- Keep the OGS text domain aligned with the reserved slug and release directory.
1.0.14
- Updated plugin name, author, slug, text domain, and translation template.
1.0.13
- Use a full plugin-specific namespace for PHP symbols, hooks, settings, JavaScript globals, DOM hooks and CSS variables.
- Guarantee speech chunks stay within the configured maximum, including CJK text, long URLs and other text without spaces.
- Harden player mounting so valid but unsuitable selectors cannot abort frontend initialization.
- Avoid starting while another script is already using the document-wide SpeechSynthesis queue and make startup watchdogs rely on this plugin’s utterance events.
- Make first-use help match the enabled controls and persist it only after the visitor interacts with the player.
- Replace repeated polling for late content with a throttled, bounded MutationObserver.
- Improve settings preview semantics and language-tag wording.
- Clarify browser/OS remote-voice behavior and move older release history to changelog.txt.
1.0.12
- Add a customizable error design token and document accent-text contrast customization.
1.0.11
- Improve content-type selection, add settings-page player preview, and document keyboard-shortcut policy.