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

onPartialResult callback and grammar #214

Open
matanel-6over6 opened this issue Feb 7, 2024 · 11 comments
Open

onPartialResult callback and grammar #214

matanel-6over6 opened this issue Feb 7, 2024 · 11 comments

Comments

@matanel-6over6
Copy link

matanel-6over6 commented Feb 7, 2024

First of all it works great and fast.

  1. onPartialResult callback called several times if I say one word, why?
  2. I have grammar(json array) and If I say a word that is not on the list, he still returns one of the words on the list. There is no option to identify that there is no match at all?
    Thanks for the help
@nshmyrev
Copy link
Collaborator

nshmyrev commented Feb 7, 2024

onPartialResult callback called several times if I say one word, why?

Partial results returned 5 times a second to provide you real-time updates.

I have grammar(json array) and If I say a word that is not on the list, he still returns one of the words on the list. There is no option to identify that there is no match at all?

Add a special [unk] word to the list

@matanel-6over6
Copy link
Author

matanel-6over6 commented Feb 7, 2024

Thanks for the fast answer.
This is my json array:
["yes","no","none","next","zero","one","two","three","four","red","blue","green","yellow","white"]

I say 'five' and i get four

@nshmyrev
Copy link
Collaborator

nshmyrev commented Feb 7, 2024

You need to add "[unk]" to the list

@matanel-6over6
Copy link
Author

["yes","no","none","next","zero","one","two","three","four","red","blue","green","yellow","white", "[unk]"] like this?
I say five and from onPartialResult i get four but from onFinalResult i get [unk]. why?

@matanel-6over6
Copy link
Author

I sat seven and i get in the first onPartialResult "zero" and after that i get [unk]

Screenshot 2024-02-08 at 11 22 53

@nshmyrev
Copy link
Collaborator

nshmyrev commented Feb 8, 2024

Yes, partial results are preliminary and not very reliable

@matanel-6over6
Copy link
Author

Is it just the first time? I can count on it the second time and onwards will be [unk]?

@matanel-6over6
Copy link
Author

matanel-6over6 commented Feb 8, 2024

There is an option to get reliability or score in onPartialResult?

@nshmyrev
Copy link
Collaborator

nshmyrev commented Feb 8, 2024

You can find more accurate model, yes! In general it is very hard to spot words in realtime, you'd better have some delay.

@matanel-6over6
Copy link
Author

Thanks a lot

@matanel-6over6
Copy link
Author

Last question, where can I find a more accurate and slimmer model?

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

2 participants