Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle an error, when phrase not contains words from JSGF #10

Open
DenBond7 opened this issue Nov 26, 2014 · 2 comments
Open

Handle an error, when phrase not contains words from JSGF #10

DenBond7 opened this issue Nov 26, 2014 · 2 comments

Comments

@DenBond7
Copy link

Hello. Please help me. How to handle an error, when phrase not contains words from JSGF?
In the logcat a see next:

ERROR: "fsg_search.c", line 910: Final result does not match the grammar in frame 155.

I want handle this error and I want say: "Sorry, I didn’t recognize what you said. Please, say again."

@mbait
Copy link
Contributor

mbait commented Nov 26, 2014

You probably should get null in onResult() callback.

On Wed, Nov 26, 2014 at 7:41 PM, Den [email protected] wrote:

Hello. Please help me. How to handle an error, when phrase not contains
words from JSGF?
In the logcat a see next:

ERROR: "fsg_search.c", line 910: Final result does not match the grammar
in frame 155.

I want handle this error and I want say: "Sorry, I didn’t recognize what
you said. Please, say again."


Reply to this email directly or view it on GitHub
#10.

Sincerely, Alexander

@aspratyush
Copy link

As suggested by @mbait, following code-segment helps to handle segfault on this issue:

..
..
//get hypothesis
int score = 0;
const char* hyp = ps_get_hyp(decoder, &score);
if ( hyp != NULL){
     std::cout<<"(Hyp, Score) : ("<<hyp<<","<<score<<")"<<std::endl;
}

//next recognition cycle
status = ps_start_utt(decoder);
..
..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants