pocketsphinx-ruby icon indicating copy to clipboard operation
pocketsphinx-ruby copied to clipboard

Convert posterior probability using logmath_exp.

Open joepestro opened this issue 9 years ago • 3 comments

This is based on the comment by @chinshr on https://github.com/watsonbox/pocketsphinx-ruby/issues/18#issuecomment-101506602

This conversion makes posterior_prob a usable confidence value between 0 and 1.

joepestro avatar Jun 26 '15 23:06 joepestro

Thanks for this do you think you could also update the test suite?

watsonbox avatar Jun 27 '15 08:06 watsonbox

@joepestro thanks for taking the time to implement.

+1 on tests.

chinshr avatar Jun 27 '15 10:06 chinshr

On closer inspection, I noticed that the changes in this PR actually set the posterior_prob on the hypothesis to the linear float of the path_score. Surely the two log values should independently be converted since they are different things? See https://github.com/watsonbox/pocketsphinx-ruby/commit/9958a43a1641f398b32dc705c08cfe73d4a30329.

watsonbox avatar Aug 10 '15 17:08 watsonbox