Results 1 to 5 of 5
  1. #1
    Saran185 is offline Member
    Join Date
    Jan 2011
    Posts
    36
    Rep Power
    0

    Question highlight word when audio is played

    hi...
    I ve a "a.txt" and "a.mp3" file in bin. When i select "a.txt" file the "a.mp3" is being played. The contents of "a.txt" is displayed on a text area. Now when the audio from the "mp3" file is played the corresponding words must be highlighted in the text area...i dont know how to continue this.. Can anyone suggest me good idea..
    thanks..

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    618
    Rep Power
    4

    Default

    You can set context-type html for JTextArea and just use html tags.
    Skype: petrarsentev
    http://TrackStudio.com

  3. #3
    Saran185 is offline Member
    Join Date
    Jan 2011
    Posts
    36
    Rep Power
    0

    Default

    hi.. its possible to use html tags to highlight..but i want the contents to be auto highlighted word by word when the audio is played. so wat should be done with the audio file.

  4. #4
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    618
    Rep Power
    4

    Default

    So maybe I not properly understand what do you want. You have JTextArea and you want highlighted word, I'm right?
    Skype: petrarsentev
    http://TrackStudio.com

  5. #5
    Saran185 is offline Member
    Join Date
    Jan 2011
    Posts
    36
    Rep Power
    0

    Default

    ya the text should get highlighted word by word in the text area when the audio file is played.
    as of now my txt file is opening in a text area and the audio file is also played. now i want to sync both the txt file and the audio file. When the audio file plays the corresponding words should get highlighted in text file.

    I have an idea...Can u suggest if it would work.
    get the length of audio file and the num of words in the txt doc.
    With these 2 data determine the time interval to be set for the words in the txt doc to get highlighted..
    can u help me with the syntax if the above idea is gud enough..
    thank u.

Similar Threads

  1. highlight content
    By Saran185 in forum NetBeans
    Replies: 1
    Last Post: 01-31-2011, 10:25 AM
  2. highlight text
    By Saran185 in forum AWT / Swing
    Replies: 2
    Last Post: 01-28-2011, 03:24 PM
  3. Date highlight
    By Shyamz1 in forum New To Java
    Replies: 8
    Last Post: 11-26-2010, 02:19 PM
  4. Replies: 0
    Last Post: 01-31-2010, 05:46 AM
  5. GNU Source-highlight 2.7
    By levent in forum Java Software
    Replies: 0
    Last Post: 06-12-2007, 08:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •