Introduction
Read Aloud functionality is the ability of the reader to read text out loud, while synchronizing text highlighting with the reading voice. This is a feature coming from EPUB3 Media Overlays, that PubCoder fully supports on all of the export formats, with the notable exception of KF8. Here’s the original description in the EPUB 3.3 specification:
Read Aloud support in a file actually means that the file contains an audio track and metadata to synchronize the text and the audio, that is saved in a SMIL file that links portions (span tags) of the text with a certain timing on the audio track. The actual playback of the read aloud (volume, automatic page turning and so on) depends on the reader app itself and settings can often be changed by the end user.
Here’s an example of a made-with-PubCoder EPUB with read aloud playing on Apple Books on an iPhone XR, with option Turn pages automatically ON:
Read Aloud Wizard
PubCoder lets you easily set up Read Aloud on a page using a wizard divided into steps that will build everything out for you without the need to write any code. To set up read aloud on a page, open your project to a page with text objects, then click the Read Aloud button in the project window toolbar, or check Enable Read Aloud in the Page Inspector at the right of the project window.

The first step of the wizard (picture above) consists in defining which text objects on the page will take part in the read aloud and, if needed, reorder them to reproduce the correct sequence for the audio. The wizard should do most of this for you, since it will set up the initial text order to mimic the spatial representation of the text in the page, but you can reorder text boxes manually by dragging them in the list or delete some text boxes clicking on the -, for example captions or text which should not be read aloud.
Note that this step will not be presented if there’s only one text object on the page.
Once the text is defined, click Next to access the next step, where you will be asked to select the audio asset to use as the audio track of your read aloud:

For the best result, you should select a previously recorded audio track, either from your Assets Library or from a file, in MP3 format.
If you don’t have an audio file, you can generate one with a synthesized voice using macOS or Windows text-to-speech technology: choose a voice and click Generate Audio File. You can use the button Edit Text for Speech Synthesis to change the text that will be used to generate the audio, for example to spell out a name the voice mispronounces.
- NEW in 6.0 On macOS 14 Sonoma or later, the voice menu lists the voices installed for the language of the current rendition, grouped by region, best quality first. To download more voices, choose Manage Voices…: it opens the speech settings of macOS, and the voices you download there appear in the menu the next time you open it
- On Windows, the voice menu lists the voices installed in Windows
- On earlier versions of macOS, PubCoder uses the system voice: click Open Speech Preferences to change it
Once the audio is defined, click Next to access the next step, where you will define how to split your text into blocks to be highlighted one after another during read aloud playback:

The wizard splits the text at punctuation marks, sentence by sentence. Click Switch to Word by Word to highlight one word at a time, and Switch to Sentence by Sentence to go back: word-by-word read aloud helps early readers follow every word, though it implies a heavier cognitive load for the others.
You can also click Edit Blocks to edit the list of characters that will be used to split the text, initially containing the various punctuation characters, watching the result on the right, which will update live. When you edit the list yourself, the switch button is hidden.
The last step consists in syncing the text with the audio track. You can click Try Auto Sync to let PubCoder do it for you (see Auto Sync below, requires PubCoder Pro), or sync it yourself:
Just click anywhere to start, and press the space bar (or click the down arrow) to go to the next text block when you hear it playing. You can even go back if you miss a block, just clicking the up arrow. On PubCoder for Mac you can even control the playback speed using the menu in the bottom-left of the window.
When you are done, a confirmation screen will appear: click Preview to test the result, or Sync Again to repeat the sync. When you close the wizard, click Apply to keep the read aloud on the page.
Auto Sync NEW in 6.0
With Auto Sync, PubCoder listens to the audio and finds when each text block is read, so you don’t have to press the space bar for every block. It saves the most time on long pages and with word-by-word read aloud, where syncing by hand means a key press for every word.
This feature uses OpenAI’s Whisper automatic speech recognition (ASR) system, and fully runs locally so your content never leaves your computer. It recognizes the language of the recording by itself. Larger models are more accurate, but slower: with the largest ones, a long recording can take a few minutes.
- In the last step of the Read Aloud Wizard, click Try Auto Sync
- The first time, PubCoder asks which speech recognition model to download: the Base model (about 150 MB) is enough for most use cases, but you can choose a more powerful, but slower and heavier, model if you need. When the download ends, click Auto Sync to start
- When Auto Sync ends, the wizard shows the confirmation screen: click Preview to check the result, or Sync Again to sync the text yourself
For the best results:
- Use a clear recording of exactly the text of the page, in the same order, without background music
- Choose the blocks before running Auto Sync: if you switch to word by word or edit the blocks later, run it again
- Always check the result with Preview: if a few blocks are off, sync the page by hand with Sync Again
Option key (Mac) or Alt key (Windows) while you click Try Auto Sync: PubCoder offers to remove the downloaded model, then asks which one to download.Manual Read Aloud Setup
Read Aloud can also be set up manually. Start by turning ON the option Enable Read Aloud in the Page Inspector, then select or import your SMIL file and audio track. Also remember to add span elements in your text objects code, corresponding to the identifiers in the SMIL file.

You can also edit a SMIL file previously generated by the Read Aloud Wizard to manually tune it: click on SMIL File in the Page Inspector and choose Open in External Editor to open and edit it in the Code Editor of your choice (set in the Editors tab of PubCoder’s settings, choosing PubCoder ▹ Settings… on Mac or Edit ▹ Settings… on Windows from the menu bar).
Appearance
You can alter the way read aloud blocks will be highlighted using properties in the Read Aloud section of the Project Inspector; namely Change Text Color and Highlight Text.
If you need more fine-grain or page-specific settings for the highlighting appearance, you can use the Read Aloud Style snippet in the CSS editor: click the Code button in the project window, then choose Project ▹ CSS or Page ▹ CSS from its menu.
Actions and Events
You can switch the read aloud playback directly from your content using the action Start/Stop Read Aloud.
When using XPUB, HTML5, iOS App and Android App formats, you can also react to Read Aloud playback status changes using the events Read Aloud Started and Read Aloud Stopped.
Troubleshooting
| “Please set an audio file before using Auto Sync.” | Go back to the previous steps and select or generate the audio file |
| “The speech recognition model could not be downloaded.” | Check your internet connection and click Try Auto Sync again |
| “Could not align any text blocks to the audio.” | The recording doesn’t match the text of the page: check that you chose the right audio file, or sync the text yourself |
| “Whisper not found. Please reinstall PubCoder.” | Download PubCoder again and reinstall it |
| The voice menu only shows a few voices | It lists the voices installed for the language of the current rendition: choose Manage Voices… to download more |
| The Upgrade to PubCoder Pro window opens | Auto Sync is a PubCoder Pro feature: try PubCoder Pro or upgrade your subscription from that window |
If you need help, contact us.