HI. I am developing an application which allows the user to dial a phone number vocally.
In order to not introduce too many variancies in the main Grammar, I did not put a number dialing option in it. I thought instead about a two steps dialog between the user and the machine:
1) User says "dial phone number"
2) System changes from the main Grammar to the dialing grammar (a grammar where the only rule is (1|2|3|4|5|6|7|8|9|0) repeated infinitely).
3) User says the desired number
4) System changes back to the main grammar.
I implemented the steps 2) and 4) in this way:
cmd_ln_set_str_r(m_pConfig1,"-fsg",newGrammarPath.c_str());
if(ps_reinit(m_pPs1,m_pConfig1) < 0)
{
printf("Failed to reinit main recognizer\n");
return -1;
}
The problem is that these steps take too much time, especially for languages where the acoustic model is big (i.e. en_US). Since all I do is just changing the "-fsg", how could I speed up these reinitialization? Could I skip some steps which take a lot like the reading of mixture gaussian parameter?
Thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
HI. I am developing an application which allows the user to dial a phone number vocally.
In order to not introduce too many variancies in the main Grammar, I did not put a number dialing option in it. I thought instead about a two steps dialog between the user and the machine:
1) User says "dial phone number"
2) System changes from the main Grammar to the dialing grammar (a grammar where the only rule is (1|2|3|4|5|6|7|8|9|0) repeated infinitely).
3) User says the desired number
4) System changes back to the main grammar.
I implemented the steps 2) and 4) in this way:
The problem is that these steps take too much time, especially for languages where the acoustic model is big (i.e. en_US). Since all I do is just changing the "-fsg", how could I speed up these reinitialization? Could I skip some steps which take a lot like the reading of mixture gaussian parameter?
Thanks in advance
It is much faster to add two searches and switch between them with ps_set_search:
https://cmusphinx.github.io/wiki/tutorialpocketsphinx/#searches
Hello Nickolay, is there similar approach fpr the Sphinx4 also?
sphinx4 is very old, try vosk-api:
https://github.com/alphacep/vosk-api/tree/master/java
Its very bad news, i wrote my bachelor thesis with Sphinx4, just need some more features. And vosk-api does not work on windows, right?
It does