Skip to content

onPartialResult loops one static word infinitely #128

Description

@serveroid

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions