Results 1 to 15 of 15
  1. #1
    yaswanth is offline Member
    Join Date
    Feb 2013
    Posts
    11
    Rep Power
    0

    Default Automatic subtitle generation for sound in video files

    I selected AUTOMATIC SUBTITLE GENERATION FOR SOUND IN VIDEO FILES as my major project and when I searched on internet I found some documents explaining about this topic and the end result is not satisfactory so I want to know is it possible using java? Result doesn't have to be accurate but is it possible to get 80% success rate if audio is clean and 50% for a normal video? or have I done mistake by selecting this project?
    Last edited by yaswanth; 02-01-2013 at 04:25 PM.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,960
    Rep Power
    8

    Default Re: Automatic subtitle generation for sound in video files

    You're asking a question that's way too vague to really answer. What approach are you planning on taking? What have you done so far? What have other people done?

    If you really have no idea how to proceed, then perhaps you did bite off more than you can chew.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,520
    Blog Entries
    7
    Rep Power
    20

    Default Re: Automatic subtitle generation for sound in video files

    I smell speech to text transformation and that means speech recognition (a nasty subject); I don't know if it can be done where actors speak (or shout, or whisper) simultaneously; the other way around, i.e. text to speech, is much easier. Maybe Google knows more ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    yaswanth is offline Member
    Join Date
    Feb 2013
    Posts
    11
    Rep Power
    0

    Default Re: Automatic subtitle generation for sound in video files

    I wanted to approach this project in three steps.

    1. Audio extraction from videos
    2. voice to text using speech recognition
    3. generate subtitle

    Thus far I didn't got much further in this project sorry for the absence of reply.

    though I got the basic knowledge in approaching those modules.

    I am thinking of using Xuggler to extract audio and by using Sphinx-4 which is an application completely written in java which helps us in speech recognition module and I am thinking to generate subtitle by recording time in the video where the voice has started and stopped by using acoustic principles.

    Now I need help with extracting audio from video using Xuggler or any other optimum solution.

  5. #5
    broskully is offline Member
    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Default Re: Automatic subtitle generation for sound in video files

    I am also doing my project in automatic subtitle generation in videos. i have done audio extraction ,speech recognition with sphinx 4 but am having problem generating subtitles.Any java code to implement this and how to go able it

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default Re: Automatic subtitle generation for sound in video files

    If it's recognising the speech and turning it into text, then where's the problem?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #7
    yaswanth is offline Member
    Join Date
    Feb 2013
    Posts
    11
    Rep Power
    0

    Default Re: Automatic subtitle generation for sound in video files

    Quote Originally Posted by Tolls View Post
    If it's recognizing the speech and turning it into text, then where's the problem?
    Ya. I am able to convert speech to text using Sphinx 4(barely though). But the real problem is with syncing the text with audio.
    Generating .srt(subtitle) file is easy but syncing is the real problem.

  8. #8
    yaswanth is offline Member
    Join Date
    Feb 2013
    Posts
    11
    Rep Power
    0

    Default Re: Automatic subtitle generation for sound in video files

    Quote Originally Posted by broskully View Post
    I am also doing my project in automatic subtitle generation in videos. i have done audio extraction ,speech recognition with sphinx 4 but am having problem generating subtitles.Any java code to implement this and how to go able it
    Are you able to sync audio with text? If yes tell me how to do it.

    generating subtitle is easy with this

    Java Code:
    FileWriter fileWritter = new FileWriter(file,true);
                	        BufferedWriter bufferWritter = new BufferedWriter(fileWritter);
    I am studying JMF for audio and text syncing.

  9. #9
    broskully is offline Member
    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Default Re: Automatic subtitle generation for sound in video files

    how to convert speech to text using Sphinx 4 in subtitle generation using sphinx4 and and how to create the subtitle file using a java

  10. #10
    yaswanth is offline Member
    Join Date
    Feb 2013
    Posts
    11
    Rep Power
    0

    Default Re: Automatic subtitle generation for sound in video files

    Quote Originally Posted by broskully View Post
    how to convert speech to text using Sphinx 4 in subtitle generation using sphinx4 and and how to create the subtitle file using a java
    To convert from speech to text use Sphinx 4. Download sphinx 4 from here

    to get the overall idea about how to use sphinx 4 download source version.In this version complete program code is available.

    watch out video tutorial here for how to execute sphinx 4 program.

    Out of curiosity may I ask you why you are interested in this project? general or project purpose?

  11. #11
    broskully is offline Member
    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Default Re: Automatic subtitle generation for sound in video files

    I am doing my project work in automatic generation of subtitles in videos

  12. #12
    broskully is offline Member
    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Default Re: Automatic subtitle generation for sound in video files

    Thanks but I am also doing my project in automatic subtitle generation in videos. i have done audio extraction ,speech recognition with sphinx 4 but am having problem generating subtitles.Any java code to implement this and how to go able it

  13. #13
    yaswanth is offline Member
    Join Date
    Feb 2013
    Posts
    11
    Rep Power
    0

    Default Re: Automatic subtitle generation for sound in video files

    Quote Originally Posted by broskully View Post
    Thanks but I am also doing my project in automatic subtitle generation in videos. i have done audio extraction ,speech recognition with sphinx 4 but am having problem generating subtitles.Any java code to implement this and how to go able it
    Are you able to sync audio with text generated? If not you need to study more about JMF and come up with your own code.
    if you just want to write generated text into .srt file then I did it like this.

    Java Code:
    File file =new File("F:\\subtitle.srt");
    if(!file.exists())
    {
      file.createNewFile();
     }
    //true = append file
    
                FileWriter fileWritter = new FileWriter(file,true);
                BufferedWriter bufferWritter = new BufferedWriter(fileWritter);
                bufferWritter.newLine();
                bufferWritter.write(data);// here "data" is my generated text

  14. #14
    broskully is offline Member
    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Default Re: Automatic subtitle generation for sound in video files

    Thanks
    But what if you don't have a subtitle and want to generate one from scratch using sphinx4 and java

  15. #15
    yaswanth is offline Member
    Join Date
    Feb 2013
    Posts
    11
    Rep Power
    0

    Default Re: Automatic subtitle generation for sound in video files

    Quote Originally Posted by broskully View Post
    Thanks
    But what if you don't have a subtitle and want to generate one from scratch using sphinx4 and java
    I just told you that. the above code generates new subtitle file.

Similar Threads

  1. Automatic Stringbuilder code generation
    By JeffB in forum Reviews / Advertising
    Replies: 0
    Last Post: 10-23-2012, 01:53 AM
  2. Storing video files in mysql database
    By mrvigneshmca in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-27-2009, 03:50 PM
  3. How to play video files in Java
    By Hasan in forum Advanced Java
    Replies: 11
    Last Post: 04-26-2009, 11:57 PM
  4. dividing video files into frames..
    By swathi palla in forum AWT / Swing
    Replies: 0
    Last Post: 02-15-2009, 03:39 PM
  5. Play sound and Video in a Mobile Phone
    By luisarca in forum Sun Java Wireless Toolkit
    Replies: 2
    Last Post: 05-23-2007, 10:52 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
  •