0

I'm analyzing the PocketSphinx demo and playing with it to understand better how it works.

I don't understand the main difference between key phrase (in the demo "oh migthy computer") and grammar. I noticed in particular that:

  • key phrase is more robust: the words had to be exactly BUT if the key phrase is made by only one word... just say a single word , and this is interpreted as correct!!!

  • in grammar case, I noticed that I can say every possible word (out of the grammar) and PocketSphinx try to "bring back" a word to its grammar... so if the gramma is i.e. "bye bye baby" if I say "dog cat banana" it understand "bye bye baby"...

So, the question is: how to create a robust grammar (like key phrase) in a way to avoid false positives? Is it perhaps a threshold problem?

Hammeronthenet
  • 132
  • 2
  • 14

1 Answers1

2

It is currently not possible to create robust grammar, this feature is not supported. For that reason it is recommended to use keyword spotting mode if you want to listen continuously.

Keyphrase can be multiple words and you can also use multiple keyphrases, the sample for that is covered in

Recognizing multiple keywords using PocketSphinx

Community
  • 1
  • 1
Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
  • Hi, thank you for the answer. I had found the post of your links today but i don't understand if the method proposed in the third post (using digits.gram with threshold) is working also on Android or not. – Hammeronthenet Sep 29 '15 at 11:08
  • If you read comments on the third answer you will see it is not recommended. It does not work. – Nikolay Shmyrev Sep 30 '15 at 00:08
  • Ok, sorry I'm really dummy with that library, so the correct manner to implementa that is keyword spotting if I understand but... What's the correct proof of concept to use it? I don't really understand what is the correct example (if there's one). – Hammeronthenet Sep 30 '15 at 05:02
  • You can describe the app you want to implement to get help on what to do. – Nikolay Shmyrev Sep 30 '15 at 07:01
  • Yes, it's a typical voice picking app. But the hard is that people who use it surely also speak during the use of the app... So the risk is that wrong commands could be interpreted by the program. A solution could be make a request of confirmation after the interception of the command... But it's not very practical for the user. – Hammeronthenet Sep 30 '15 at 07:06
  • At the moment i've got a good results implementing a grammar like this one: cup /1.0/ no /1.0/ okay /0.1/ skip /0.1/ bye bye /0.1/ where "cup" and "no" are two random word that are not considered in the logic of the program. It seems better in this manner, so the "the words that are not commands" are bring back to false simple words. Not a clean solution, perhaps... – Hammeronthenet Sep 30 '15 at 07:10