Java

Moderators: zibadian
Number of threads: 7818
Number of posts: 18218

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
sync text with audio Posted by saran185 on 14 Feb 2011 at 2:00 AM
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...



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.