sync text with audio - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

sync text with audio

saran185saran185 Posts: 23Member
hi ... can anyone pls help me..i have a txt file and the audio file which reads the contents of the text to the user. now when the audio file is played the contents of the text should be displayed accordingly word by word on the text area.
I found the total words in the txt file( word count = 8)
I also found the duration of the audio file( duration = 4180 ms)
now i set a time interval i.e a sleep method to pause n display the text on the textarea according to the audio played.the value for the sleep() is set as a variable t= duration/word count. I tried this method, but it does not work well for some files. my requirement is to sync the text display with the audio. can anyone suggest me an efficient way to solve this...
thanks in advance...
Sign In or Register to comment.