Skip to main content
Participant
February 2, 2021
Question

Read Along capability within JS Embed API

  • February 2, 2021
  • 1 reply
  • 689 views

Hi,

I would like to add the read along capability within PDFs embeded on my website just like how we can highlight parts of text (word/sentence) in a reading passage that is being played in an audio file. It would be similar to the read along capability within the acrobat software, but with a custom audio file that I already have generated. Is this possible?

This topic has been closed for replies.

1 reply

Joel Geraci
Community Expert
Community Expert
February 2, 2021

It's certainly possible to communicate the page position to an audio player. Can you elaborate on what you want the user experience to be? Do you have the time code for each paragraph, heading, etc?

Participant
February 2, 2021

Yes, I have the timestamps for each sentence and also each word. The flow we have currently is that we have a piece of text that has the corresponding audio file with the aforementioned speech marks. When the user clicks on a button, the audio starts playing and the respective word and sentence is highlighted based on the timepstamps. Is the same possible within a pdf?

Joel Geraci
Community Expert
Community Expert
February 2, 2021

Yes. However, you will also need to know the bounding box of each word. With the combination of the word bounding boxes in order and the time codes for each word in the audio file, you'll be able to use Embed API highlight callbacks to sequentially highlight the words as they are spoken.

You can use Adobe Acrobat JavaScript to create the word/box list.