Menu

#454 Add ability to use AudioInputStream in SphinxWaveRecognizer

next release
open
nobody
None
1
2016-04-03
2016-04-03
No

Current way to recognize wave files looks a bit awkward. Transcriber demo proposes manually skipping magic 44 bytes of Wave header, and it does not check anything in the file format.
So one could easily feed recognizer with stereo file and wander why recognition is so bad.

I propose to add startRecognition(AudioInputStream audioStream) method which would both read the header and check for stram format.

1 Attachments

Discussion

  • Mikhail Barg

    Mikhail Barg - 2016-04-03

    A bit of fix - storing just sampleRate, so no dependency on not-changin external Configuartion instance.

     
    • Nickolay V. Shmyrev

      The reason we do not use AudioInputStream is that I want to avoid javax.sound dependency which often cause trouble for many users with non-default JVMs.

       
      • Mikhail Barg

        Mikhail Barg - 2016-04-03

        From what I see, there are whole lot of references to javax.sound.sampled through the sphinx4-core codebase. So I don't think there's a difference in adding another one.

        I don't think that there could be any dowsides of referencing a standard package in case the code is not used, so we may add some documetation/comments explaining to use the old startRecognition(InputStream) method in case there's a problem with AudioInputStream.

         

Log in to post a comment.