- This topic has 8 replies, 4 voices, and was last updated 9 years, 12 months ago by Halle Winkler.
June 5, 2011 at 10:35 am #4079
For the current project that I am working now. I need to get the set of all hypothesis for each recognized word, together with their confidence (I think this should be calculated using prior probabilities) values.
Do you think that this is possible? If it is, can you please help me out? I am also starting to try out but I wanted to ask you in advance as you were very helpful on my previous question.
I will also write here if I have a problem or successful attempt in order to help other users of OpenEars having similar questions.
Thank you very much…
Sincerely,June 5, 2011 at 10:57 am #4080
Can you describe more specifically which aspect of that task you are having difficulty with and in what area of the implementation? If I were doing this I guess I would put the utterances in an NSMutableDictionary as they come in, or possible write them out to a plist or some combination of the above depending on the eventual use of the data. I presume that you know the expected recognition, and the utterance id (a good key for the dictionary entry), the hypothesis, and the confidence score are all delivered by the OpenEarsEventsObserver method.June 5, 2011 at 11:51 am #4081
Sorry, i just had a baby yesterday; so, I did not have time to check it in detail.
I do not think that I will have difficulties on how to use the data once I get it.
pocketsphinxDidReceiveHypothesis callback function of the OpenEarsEventsObserver, seems to deliver only the hypothesis with the highest prior probability (for each utterance)
However, I want to learn all of hypotheses together with their confidence values to reduce the effect of the word recognition error rate in my research.
Is there any function of OpenEars that I can do that? Maybe not all of them, but N-best hypothesis for each recognized word would also be appreciated.
In other words, I need to get the alternatives for each recognized word (similar to a confusion set).June 5, 2011 at 12:24 pm #4082
OK, this is actually pretty far outside of the OpenEars purview since it isn’t really designed as a research tool that propagates every available Pocketsphinx function through to an Objective-C interface, but it should be no problem getting it answered as a Pocketsphinx question over in the Sphinx forums as long as you are very precise:
I answer these ones occasionally when it’s fairly self-evident in the Pocketsphinx codebase, but this one is not to me (and if I’m not mistaken, it also looks like it might be different for LMs versus FSGs) so it’s probably a better call to go to the source. Once you know the C implementation details, I can help you with the details of returning the data through OpenEars if needed.June 5, 2011 at 2:05 pm #4083
Thank you very much.
Then, I guess that I will try it with the python wrapper of Pocketsphinx first, to understand which functions are useful because it is not very clear in its codebase as you also said.
I understood how to return the data through OpenEars thanks to your very well commented code, I do not think that it will be problem. Just need to solve C implementation details.
Have a nice day. Sincerely,June 8, 2011 at 1:31 pm #4084edgecaseParticipant
Hi akaniklaus & Halle, I just wanted to say I’d also like to use the multiple hypotheses returned by sphinx, through OpenEars if possible, so if you do get this figured out please post a follow-up – even if it’s not in the official release I’d be interested to help test :)June 8, 2011 at 1:44 pm #4085
OK, I’m still up for taking a look and maybe posting sample code for returning it through OpenEars if akaniklaus has some known-working C code for this later. This is unlikely to become a feature of OpenEars because it’s (IMO) esoteric, but it is probably easy to patch in a new OpenEarsEventsObserver delegate method.March 4, 2012 at 4:12 pm #8705rem1974Participant
Would be great to know if you managed to get the n-best list and scores, and not only one hypothesys and score.
Please update if you did.March 25, 2013 at 5:34 pm #1016414
Just following up here that OpenEars has had N-Best hypotheses and scoring since version 1.1.
- You must be logged in to reply to this topic.