alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.36k stars 1.04k forks source link

Getting confidence score for each word in Vosk android demo #1529

Open hannahfaghihi opened 4 months ago

hannahfaghihi commented 4 months ago

Hi I wanted to get the confidence score for each word and run two different language models and compare the confidence score in both of the language models. How can I get access to confidence score in Vosk android demo?

nshmyrev commented 3 months ago

Hi. If you output word times, there is a confidence field too. It is not very reliable though.

https://github.com/alphacep/vosk-api/blob/master/src/vosk_api.h#L178