In my iOS app, I have a paragraph of text. When a word is touched, I want to highlight the word and play audio for the word. I also want to play audio to read the entire paragraph, highlighting each word that is read.
The implementation that I have is
- to create audio file per word
- Maintain a dictionary of word to audio file and play the audio file when the word is touched.
- Concatenate the audio files for the words in the paragraph and play it to hear the entire paragraph. I dont know yet how to keep the highlighting of the words in-sync with the audio
I need this app to work offline. I plan to record audio for the words myself.
Are there other, efficient ways of doing this? Thanks!