0
$\begingroup$

Rosanswers logo

I use PocketSphinx to do voice recognition. For example I use a language model like this:

Hello
Hi
World
Earth

I say "Hello world", now I want the list of the probabilities/scores of the recognition. Like for the first word "Hello" a possible match could be:

"Hello" 90%
"Hi" 10%
"World" 30%
"Earth" 30%

I don't know how PocketSphinx represents the probabilities. It is only an example. Has someone a clue? I use this example https://github.com/mikeferguson/pocketsphinx/blob/indigo-devel/nodes/recognizer.py

Thanks

Mosa


Originally posted by Mosa on ROS Answers with karma: 11 on 2015-03-16

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You asked the same question on stack overflow and Nikolay had posted an answer there.
So, I am just adding a link to that post so that others may find his apt answer.
Correct answer here
---x---
The answer says the following:
"You can retrieve individual segments of hypothesis with iterator:
print 'Best hypothesis segments: ', [(seg.word, seg.prob) for seg in decoder.seg()]

seg.prob contains the confidence score. To have a meaningful confidence score you need to make sure your language model is large enough."
---x---
Also, there is an updated version of pocketsphinx available for ROS. You can find it here:
https://github.com/Pankaj-Baranwal/pocketsphinx/
You should use that instead.


Originally posted by PankajBaranwal with karma: 96 on 2017-10-07

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Humpelstilzchen on 2017-10-09:
Its the "uttid" value in partial_result() and final_result() of recognizer.py, also see Using PocketSphinx with GStreamer and Python

Comment by Humpelstilzchen on 2017-10-09:
Do you have any explanation why your linked repository should be used instead?

Comment by PankajBaranwal on 2017-10-09:
It has updated pocketsphinx features like kws mode, grammar mode etc, has much better wiki, a blog post to explain everything and is being maintained actively
Doesnt need external dependencies like GStreamer
CMUSphinx endorses it: https://github.com/cmusphinx/ros-pocketsphinx MaxCharLimitReached

Comment by Humpelstilzchen on 2017-10-30:
So I guess what that means is that the gstreamer plugin needs some updates?

Comment by PankajBaranwal on 2017-10-31:
If that's what you got from all of that, then there's nothing left to say.
I just sometimes wish there were as many active code-maintainers in the community as there are fusspots.

Comment by Humpelstilzchen on 2017-10-31:
verbose please?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.