Menu

Getting LineUnavailableException using more than one LiveSpeechRecognizer (Sphinx 4-5 prealpha)

Romain L
2014-04-24
2018-03-19
  • Romain L

    Romain L - 2014-04-24

    I tried to run the dialog example into the lastest version of CMU Sphinx, but I get this error :

    javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 16000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported.

    It happens only when I use more than 3 instances of LiveSpeechRecognizer. In the example given with the last version, the LiveSpeechRecognizer is instanced 3 times :

        configuration.setGrammarName("dialog");
        LiveSpeechRecognizer jsgfRecognizer = LiveSpeechRecognizer(configuration);
    
        configuration.setGrammarName("digits.grxml");
        LiveSpeechRecognizer grxmlRecognizer = LiveSpeechRecognizer(configuration);
    
        configuration.setLanguageModelPath(LANGUAGE_MODEL);
        LiveSpeechRecognizer lmRecognizer = LiveSpeechRecognizer(configuration);
    
     
  • Nickolay V. Shmyrev

    Sorry, microphone access can not be shared, you can not create multiple live recognizers at once.

     
    • SriRam Govardhanam

      is there any way to start voicerecognition using jbutton,for me it works for 1st press of button and after that it doesnt works,and problem is at livespeechrecognizer..
      help me

       
    • SriRam Govardhanam

       

      Last edit: SriRam Govardhanam 2018-03-19
  • Tiberius

    Tiberius - 2014-06-16

    I'm using sphinx4-5prealpha-src.zip, and I'm getting the same LineUnavailableException, and I noticed that edu.cmu.sphinx.demo.dialog uses three instances of LiveSpeechRecognizer. Was this demo not meant for 4-5prealpha? If so, where can I find example files that are meant to work with sphinx4-5prealpha?

    Thanks!

     
  • Alexander Solovets

    It means that either your microphone is unavailable, or that the required sample rate is not acceptable. Take a look at sphinx4-core/src/main/java/edu/cmu/sphinx/frontend/util/Microphone.java for more information.

     
  • Tiberius

    Tiberius - 2014-06-16

    Great, I'll take a look. Thanks for your help, and thanks for replying so fast!

    I'm really excited about Sphinx.

     

Log in to post a comment.

MongoDB Logo MongoDB