TLSphinx icon indicating copy to clipboard operation
TLSphinx copied to clipboard

Get per word ascr from pocketsphinx

Open mavidser opened this issue 9 years ago • 3 comments

hypotesisForSpeechAtPath() currently gives us the hypothesis for the whole phrase. How would I get the individual score (ascr) for each recognized word?

Example output from running pocketsphinx_continuous with -backtrace flag set true:

word                 start end   pprob ascr       lscr       lback
HI                   0     25    1.000 -244       0          1  
JOHN                 26    69    1.000 -654       0          1  
IS                   70    88    1.000 -296       0          1  
EVERYTHING           89    137   1.000 -487       0          1  
ALRIGHT              138   196   1.000 -465       0          1  

mavidser avatar Jul 21 '16 11:07 mavidser

Hi,

At this point there is no API in TLSphinx for this. I think it should be easy to write. Right now I don't have time available but looking at the source code for Pocketsphinx I find the implementation for what you need and seems to be really easy. Take a look here

Sorry I can't help you more with this.

BrunoBerisso avatar Jul 21 '16 14:07 BrunoBerisso

I will close this for inactivity.

BrunoBerisso avatar Aug 01 '16 15:08 BrunoBerisso

Reopen this one for anyone looking something fun to do 😄

BrunoBerisso avatar Aug 14 '16 23:08 BrunoBerisso