Menu

PocketSphinx Android set minimum voice volume threshold and maximum recording time

Help
Phantom
2014-08-14
2014-08-25
  • Phantom

    Phantom - 2014-08-14

    Hi, Sphinx Android is pretty good. But when it comes to a kind of noisy environment, it just can't stop recording voice. Is there any way that I can set volume threshold or something like that so that low volume environment noise can be tolerated or ignored?

    Another problem is how to set the maximum listening time. I think there should be an interface to set it up.

    Any help is appreciated!

     
  • Phantom

    Phantom - 2014-08-15

    Can anyone help me with this..I'm kind of in a hurry here...

     
  • Phantom

    Phantom - 2014-08-20

    Somehow I saw there are some answers posted in this thread but can't see any. What the hack is going on?

     
  • Konstantin Startchev

    Hi,
    You are right. This subject was already discussed here:
    http://sourceforge.net/p/cmusphinx/discussion/help/thread/c6109f2f/

    However in the last version of Miro I used the Android CountDownTimer for timing. If you are interested I can attach the java last version of a testing code.

    Personally I found PocketShinks robust to noise, comparing with the Android SpeechRecogniser in the same conditions. The hack with the timer is important since if listening sufficiently long it will have false positive for sure.

    Cheers,
    Konstantin

     
    • Nickolay V. Shmyrev

      In latest code (github/subversion trunk) there is startListening(searchName, timeout) method, so there is no need for a separate timeout.

       
      • Nickolay V. Shmyrev

        As for setting threshold, you can use

          defaultSetup().setFloat("-vad_threshold", 3.0)
        

        to set threshold of voice activation

         
      • Phantom

        Phantom - 2014-08-22

        I'm sorry I can't find that trunk directory...Can you give me the URL...Thank you.

         
        • Nickolay V. Shmyrev

          New code and demo is here:

          http://github.com/cmusphinx/pocketsphinx-android-demo

          See the code to start listening with timeout:

          ~~~~~~~~~~
          private void switchSearch(String searchName) {
          recognizer.stop();

              // If we are not spotting, start listening with timeout
              if (searchName.equals(KWS_SEARCH))
                  recognizer.startListening(searchName);
              else
                  recognizer.startListening(searchName, 10);
          
              String caption = getResources().getString(captions.get(searchName));
              ((TextView) findViewById(R.id.caption_text)).setText(caption);
          }
          

          ~~~~~~~~~~~~

           
          • Phantom

            Phantom - 2014-08-22

            Thank you so much! Simply replace the /libs directory with the new updated one, and the new api works.
            BTW, I wonder what kind of features CMU PocketSphinx uses, because I'm also working on the speaker recognition stuff. And from my experience, I think PNCC features are stronger than MFCC features.

             
            • Nickolay V. Shmyrev

              BTW, I wonder what kind of features CMU PocketSphinx uses, because I'm also working on the speaker recognition stuff. And from my experience, I think PNCC features are stronger than MFCC features.

              pocketsphinx uses noise-robust MFCC.

               
              • Phantom

                Phantom - 2014-08-25

                Just out of curiosity, is there any other option? is it possible that we move PNCC features on pocketsphinx?

                 
                • Nickolay V. Shmyrev

                  If you want to implement PNCC you can do that, however, our features are better than PNCC for many practical tasks. For example, our features are more more accurate on clean speech and also robust to channel characteristics (due to use of log and CMN instead of cubic nonlinearity in pncc).

                   

                  Last edit: Nickolay V. Shmyrev 2014-08-25
                  • Phantom

                    Phantom - 2014-08-25

                    Thanks, I appreciate it.

                     

Log in to post a comment.

MongoDB Logo MongoDB