onPartialResult loops one static word infinitely
In some cases, the onPartialResult event keeps firing indefinitely with the same word — even if the user says something completely different or remains silent.
The word returned is always the same, and seems to be statically selected from the passed grammar array.
When I pass a different grammar list, the looped word changes — but it's still one static word that gets locked into a loop.
Steps to reproduce:
Initialize Vosk with a grammar list (e.g. ["hola", "adios", "gracias"])
Start recognition using vosk.start({ grammar })
Say something unrelated or nothing at all
onPartialResult will keep returning the same word (e.g. "gracias") over and over again until timeout
Changing the grammar changes the static word, but the loop behavior remains
Expected behavior:
Partial results should reflect what the user says
Repeating one static word regardless of input seems incorrect
Environment:
Library: react-native-vosk
Platform: Android
Language Model: ES, RU
Vosk version: Last
Additional context:
This behavior makes voice interaction unreliable. I suspect it might be related to how grammar scoring or fallback happens internally. If there's a workaround or setting that prevents this fallback, please advise.
You should pass [unk] with your array, ["hola", "adios", "gracias", "[unk]"]
You should pass [unk] with your array, ["hola", "adios", "gracias", "[unk]"]
I do it
When I added the grammar array, it is detecting words present in the array. Now, how can I make it dynamic?