Menu

How to make the app choose the default word when user does not say any word in the language model

Help
2016-03-14
2016-03-17
  • Toan Nguyen

    Toan Nguyen - 2016-03-14

    Dear cmusphinx,

    How to make pocketsphinx library choose the default word when user does not
    say any word in the language model file

    For example:

    Below is the corpus file generated to the language model

    <s> Clean </s>
    <s> Stop </s>
    

    If user says "Do" or some other words except "Clean" or "Stop",
    pocketsphinx library will recognize and return the result "Default word"

    Yours sincerely, Toan

     

    Last edit: Toan Nguyen 2016-03-14
    • Nickolay V. Shmyrev

      Use keyword spotting mode described here:

      http://cmusphinx.sourceforge.net/wiki/tutoriallm

       
      • Toan Nguyen

        Toan Nguyen - 2016-03-14

        I already took a look at it

        "Threshold must be tuned to balance between false alarms and missed detections, the best way to tune threshold is to use a prerecorded audio file."

        Could you please tell me how to use the prerecorded audio file of the word or phrases to get its own threshold.

         

        Last edit: Toan Nguyen 2016-03-14
        • Nickolay V. Shmyrev

          Tutorial says:

          Tuning process is the following:

          • Take a long recording with few occurrences of your keywords and some other sounds. You can take a movie sound or something else. The length of the audio should be approximately 1 hour
          • Run keyword spotting on that file with different thresholds for every keyword
          • From keyword spotting results count how many false alarms and missed detections you've encountered
          • Select the threshold with smallest amount of false alarms and missed detections
           
  • Toan Nguyen

    Toan Nguyen - 2016-03-15

    Could you explain a litte bit about "alse alarms". I really have no idea what it means.

     
    • Nickolay V. Shmyrev

      When you run keyword spotter, it produces you results each attributed in a certain time. Some results are really occurences of keyphrase, those are "true matches". Some results are produced by spotter but the audio does not have the keyphrase. Those are "false alarms". Sometime keyphrase is present in audio but keyword spotter does not alarm about it. This is "missed detection".

       
  • Toan Nguyen

    Toan Nguyen - 2016-03-16

    Could you please tell me how to run keyword spotting on a specific audio file?

     
    • Nickolay V. Shmyrev

       pocketsphinx_continuous -keyphase "hello world" -infile file.wav -kws_threshold 1e-10
      
       

      Last edit: Nickolay V. Shmyrev 2016-03-16
  • Toan Nguyen

    Toan Nguyen - 2016-03-16

    I am running keyword spotter in German

    pocketsphinx_continuous -dict ../adapt_acoustic_models_new/voxforge.dic -hmm ../adapt_acoustic_models_new/de-cont -keyphrase "SCHAUDIENST" -infile wav/test.wav -kws_threshold 1e-10
    

    I already ran the command above. But I do not know where I may take a look at to how many false alarms and missed detections. Could you please show me where it locates in keyword spotting results.

     
    • Nickolay V. Shmyrev

      You can add -time yes to see detected keywords and their times.

       
  • Toan Nguyen

    Toan Nguyen - 2016-03-17

    I already added the time parameter to the command line. But I see no difference between the previous spotting results and the new ones.

    Beside, I already took a look at the doc of pocketsphinx_continuous tool and there is no time parameter. Could you please review and tell me another way.

     

Log in to post a comment.