I have verfied the input data. It follows all the input standrds specified for Sphinx. I am using three acostic models in my aplication:- English, French and Spanish. All are PTM models. The input is from Unity3D Microphone.
English works without any error. I get this error mainly in Spanish and less frequently in French. I have noticed that this error mainly occurs if I use English acoustic model for some time and then I switch to Spanish. More often, once I switch to Spanish, in the first speak attempt itself I get the above error.
Another way to reproduce the error is to keep on using the Spanish model using the live microphone input to recognize words without reinitializing the acoustic models, dictionary and grammar file for each word. It is higly likely to get the above error within 2 to 3 mins.
I have made sure that I release all the poniters before I switch the models using ps_free(ps) and cmd_ln_free_r(config).
Is there any command that I can use to reset PocketSphinx to the state where it just finished initializing the acoustic model, dictionary and grammar file? In my application, I initialize pocketsphinx at the start. Then to recognize a word, I start the Unity Microphone, and send data to the recognizer using ps_process_raw function. Once hypothesis is not null, I stop the microphone. To recognize next word, I again start the Microphone and follow the same process. This process works like a charm for English.
Is there anyway I can handle this error without causing PocketSphinx to crash? Since this is not a programming language error, exception handers (try-catch) are also not working. I am trying to make sure that my application continues to work even when this error occurs.
Thanks,
Sreejith
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I get the below error sometimes in Pocketsphinx. It happens rarely. However, I would like to fix it. Could someone help please?
Thanks,
Sreejith
INFO: cmn_prior.c(131): cmn_prior_update: from < 44.73 -7.07 -2.54 13.19 6.25 -0.79 1.89 -6.77 -1.43 4.47 -1.42 -3.67 -1.42 >
INFO: cmn_prior.c(149): cmn_prior_update: to < 43.68 -6.52 -3.32 11.44 6.57 -1.04 1.52 -6.60 0.47 6.62 -1.72 -4.33 -1.44 >
INFO: fsg_search.c(859): 65 frames, 17864 HMMs (274/fr), 19111 senones (294/fr), 70 history entries (1/fr)
INFO: fsg_search.c(869): fsg 0.56 CPU 0.846 xRT
INFO: fsg_search.c(871): fsg 0.89 wall 1.343 xRT
ERROR: "fsg_search.c", line 943: Final result does not match the grammar in frame 65
INFO: wrap.cpp(389): Array length===2048
INFO: cmn_prior.c(131): cmn_prior_update: from < 43.68 -6.52 -3.32 11.44 6.57 -1.04 1.52 -6.60 0.47 6.62 -1.72 -4.33 -1.44 >
INFO: cmn_prior.c(149): cmn_prior_update: to < 43.68 -6.52 -3.32 11.44 6.57 -1.04 1.52 -6.60 0.47 6.62 -1.72 -4.33 -1.44 >
Assertion failed: (norm != WORST_SCORE), function ptm_mgau_codebook_norm, file /Users/admin/Documents/Sphinx/IOS/pocketsphinx/src/libpocketsphinx/ptm_mgau.c, line 278.
You need to provide the information to reproduce your problem.
Most likely your input data has incorrect format.
Hi Nickolay,
Thank you for the reply!
I have verfied the input data. It follows all the input standrds specified for Sphinx. I am using three acostic models in my aplication:- English, French and Spanish. All are PTM models. The input is from Unity3D Microphone.
English works without any error. I get this error mainly in Spanish and less frequently in French. I have noticed that this error mainly occurs if I use English acoustic model for some time and then I switch to Spanish. More often, once I switch to Spanish, in the first speak attempt itself I get the above error.
Another way to reproduce the error is to keep on using the Spanish model using the live microphone input to recognize words without reinitializing the acoustic models, dictionary and grammar file for each word. It is higly likely to get the above error within 2 to 3 mins.
I have made sure that I release all the poniters before I switch the models using ps_free(ps) and cmd_ln_free_r(config).
Is there any command that I can use to reset PocketSphinx to the state where it just finished initializing the acoustic model, dictionary and grammar file? In my application, I initialize pocketsphinx at the start. Then to recognize a word, I start the Unity Microphone, and send data to the recognizer using ps_process_raw function. Once hypothesis is not null, I stop the microphone. To recognize next word, I again start the Microphone and follow the same process. This process works like a charm for English.
Is there anyway I can handle this error without causing PocketSphinx to crash? Since this is not a programming language error, exception handers (try-catch) are also not working. I am trying to make sure that my application continues to work even when this error occurs.
Thanks,
Sreejith