I am using the Pocketsphinx Python bindings on Ubuntu, and I find that I am
getting the following error:
ERROR: "fsg_search.c", line 1092: Final state not reached in frame 268
Segmentation fault
I have researched the "final state not reached" error, and found that this
occurs when you try to make the decoder recognize something that is not
accepted by its grammar - this is indeed the case (my decoder is initialized
with a .jsgf grammar and I am giving it an utterance not in the grammar) so
the error is expected, but not the segmentation fault - is there any way to
check that the decoder didn't recognize anything, catch the error, and avoid
the segfault? Is this segmentation fault the expected behavior for something
that can't be recognized, or is something else going wrong?
When you ask about segmentation faults please provide the information about
pocketsphinx version you are using. Please try the same with the latest
version.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another question I had was about the grammar not being strictly followed.
Although I define a JSGF grammar, I often get ASR results that are sentences
not in the grammar. I have read previous threads on this topic, and it sounds
like this is intentional. How is the language model being made out of my
grammar - is Pocketsphinx turning my JSGF grammar into an n-gram model?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am using the Pocketsphinx Python bindings on Ubuntu, and I find that I am
getting the following error:
I have researched the "final state not reached" error, and found that this
occurs when you try to make the decoder recognize something that is not
accepted by its grammar - this is indeed the case (my decoder is initialized
with a .jsgf grammar and I am giving it an utterance not in the grammar) so
the error is expected, but not the segmentation fault - is there any way to
check that the decoder didn't recognize anything, catch the error, and avoid
the segfault? Is this segmentation fault the expected behavior for something
that can't be recognized, or is something else going wrong?
My grammar (mygram.jsgf) is the following:
My dictionary is the following (mydict.dic):
I have two .wav files, goforward.wav (which says "go forward eight meters"),
and test.wav (which just says "test"),
and I am initializing the decoder this way:
I recognize the in-grammar utterance this way:
which outputs:
and then to see the result:
which outputs, as expected:
So then when I try it with the other .wav file:
which outputs:
and then I say:
which gives the error
Hello
When you ask about segmentation faults please provide the information about
pocketsphinx version you are using. Please try the same with the latest
version.
The version I am using is 0.6.1, which as far as I can tell is the latest
version.
Latest version is 0.7. Please verify if this bug was not already fixed long
time ago. I even recommend you to compile a sphinxbase snapshot.
Thanks very much, this has solved the problem.
Another question I had was about the grammar not being strictly followed.
Although I define a JSGF grammar, I often get ASR results that are sentences
not in the grammar. I have read previous threads on this topic, and it sounds
like this is intentional. How is the language model being made out of my
grammar - is Pocketsphinx turning my JSGF grammar into an n-gram model?
Not following the grammar was a feature of previous releases. You can checkout
snapshot where grammar should be more strictly followed.