3

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!

user510011
  • 51
  • 5
  • This may help you with the TTS part: http://stackoverflow.com/questions/5923974/iphone-sdk-google-tts-and-encoding If you want to skip the download you need to install a TTS library. – Jano May 25 '11 at 22:11
  • Have you done that? can you share some code? I have same task difference is that i have Audio and text file for per word per mp3. But i dont know how to do that. –  Jul 04 '13 at 05:39

1 Answers1

1

Another possible solution path would be to have a single audio file, and maintain an array of the time offset of each silence marker.

However, TTS would seem to be the obvious solution. How many words do you need to record? I created little utility that lets me record phrases to file by holding down the space bar speaking and releasing. so I can easily record thousands of files in this way. I can even feed in the required data and it will present each line for me to speak. get in touch with me if you need this...

P i
  • 29,020
  • 36
  • 159
  • 267