alphacep/vosk-api

How to get results which contain result': [{'conf':, 'end':, 'start': , 'word': ''}] in new version?

Yonnie1331 opened this issue · 2 comments

Hello!
Previously I used version 0.3.21 and by .Result() or .FinalResult, could get results formulated in e.g.

{'result': [{'conf': 0.455755, 'end': 6.724824, 'start': 6.27, 'word': '就労'},
{'conf': 0.263064, 'end': 6.81, 'start': 6.724824, 'word': 'が'},
{'conf': 0.460376, 'end': 7.113516, 'start': 6.93, 'word': 'H'},
{'conf': 0.422004, 'end': 7.5, 'start': 7.113516, 'word': 'H2O'},
{'conf': 0.566401, 'end': 7.95, 'start': 7.53, 'word': '種類'}],
'text': '就労 が H H2O 種類'}

Now I am using version 0.3.44, the returned results contains only {'text': ''}

I wonder if it's able to get the result': [{'conf':, 'end':, 'start': , 'word': ''}] in newly released versions?

You can call rec.SetWords(True) to make recognizer return word timestamps and confidences

Thanks a lot!!