Ghost Voice Reader reads Ghost posts aloud with the browser's built-in voice. Install it through Ghost Code Injection. You do not need to edit your theme.
The reader does not need an account, an API key, or a speech provider. It does not send post text to AspireThemes.
- Shows a floating button on Ghost posts
- Uses voices from the browser and operating system
- Finds the post content automatically
- Provides play, pause, resume, retry, and time controls
- Divides long posts into short speech sections
- Pauses when page audio or video starts
- Starts reliably in iOS Safari
- Supports keyboard focus, reduced motion, and high-contrast colors
- Does not use analytics or cookies
- Open Ghost Admin → Settings → Advanced → Code Injection.
- Paste this code into Site Footer:
<script
src="https://cdn.jsdelivr.net/gh/aspirethemes/ghost-voice-reader@v1.0.0/dist/ghost-voice-reader.min.js"
defer
></script>- Select Save.
- Open a post.
- Confirm that the floating Listen button appears in the lower-left corner.
The version number keeps the installed reader stable when this project changes.
The reader starts only on a Ghost post. It does not start on home, tag, author, or page templates.
For more information, see Ghost's Code Injection guide and body_class reference.
Add only the settings that you need to the script element:
<script
src="https://cdn.jsdelivr.net/gh/aspirethemes/ghost-voice-reader@v1.0.0/dist/ghost-voice-reader.min.js"
data-voice-reader-position="bottom-left"
data-voice-reader-rate="1"
data-voice-reader-minimum-words="40"
data-voice-reader-label-listen="Listen"
data-voice-reader-label-pause="Pause"
data-voice-reader-label-resume="Resume"
defer
></script>| Setting | Default | Function |
|---|---|---|
data-voice-reader-position |
bottom-left |
Use bottom-left or bottom-right. |
data-voice-reader-content-selector |
Automatic | Set the post-content CSS selector. |
data-voice-reader-minimum-words |
40 |
Hide the button on shorter posts. |
data-voice-reader-rate |
1 |
Set the speech speed from 0.5 to 2. |
data-voice-reader-read-title |
true |
Read the post title. |
data-voice-reader-label-listen |
Listen |
Set the idle label. |
data-voice-reader-label-pause |
Pause |
Set the playing label. |
data-voice-reader-label-resume |
Resume |
Set the paused label. |
data-voice-reader-label-loading |
Loading audio |
Set the loading label. |
data-voice-reader-label-retry |
Try again |
Set the error label. |
data-voice-reader-label-minute |
min |
Set the time unit. |
If your theme uses an uncommon content wrapper, set its CSS selector:
<script
src="https://cdn.jsdelivr.net/gh/aspirethemes/ghost-voice-reader@v1.0.0/dist/ghost-voice-reader.min.js"
data-voice-reader-content-selector=".publication-article-body"
defer
></script>Shadow DOM protects the button from theme styles. To change the button, add this CSS to Site Header:
<style>
ghost-voice-reader::part(button) {
background: #2457ff;
}
</style>The script loads ghost-voice-reader.css from the JavaScript directory.
If your site uses a strict Content Security Policy, allow the CDN in script-src and style-src. Otherwise, the button stays hidden.
The script adds this small API to window:
window.GhostVoiceReader.version;
window.GhostVoiceReader.init({position: 'bottom-right'});
window.GhostVoiceReader.destroy();The script also sends these document events:
ghost-voice-reader:playghost-voice-reader:pauseghost-voice-reader:stopghost-voice-reader:error
The reader reads the post title, paragraphs, lists, quotations, and section headings.
The reader skips code, captions, navigation, forms, signup cards, header cards, and Ghost upgrade prompts.
Ghost controls member access. The reader can read only the content that Ghost shows to the current visitor.
The reader needs window.speechSynthesis and SpeechSynthesisUtterance. If the browser does not provide these features, the button stays hidden.
The browser and operating system control voice availability and quality. The reader uses the page language and lets the platform select the voice.
- Install the project packages:
npm install- Build the release files:
npm run buildThe build creates:
dist/ghost-voice-reader.jsdist/ghost-voice-reader.min.jsdist/ghost-voice-reader.css
MIT © AspireThemes