3 ms·
Hi Georgi, I am experimenting with your code now. Is there a way to force Whisper to only consider a limited vocabulary and then respond with confidence levels
by wfcollins 4y ago
Hi Georgi,
I am experimenting with your code now. Is there a way to force Whisper to only consider a limited vocabulary and then respond with confidence levels? I am working on an app where it is important to restrict answers and I would like to know how confident that a response is one of a set of words. If the answer could be word A with a confidence level of 95% and word B with a level of 50%, I would want to know that so that I could perform context verification.
Thanks!
Bill
- ggerganov 4y agoA follow up on this - I came up with an interesting strategy to achieve this. Still a prototype, but I think it looks very promising: https://github.com/ggerganov/whisper.cpp/pull/271 https://github.com/ggerganov/whisper.cpp/pull/271 The source code is in the `command.cpp` and I will soon write some more details how it works. If you give it a try, definitely let me know if it worked for you.
- jjwiseman 4y agoHopefully this version will add the prompting ability that the original Whisper has. In the original Whisoer, you would be able to give it a prompt for the recognition like "Please respond with only one of the following words: A, B, or C." It wouldn't be foolproof, but it helps. https://github.com/openai/whisper/discussions/117#discussioncomment-3727051 https://github.com/openai/whisper/discussions/117#discussion...
- ggerganov 4y agoHi, it's not obvious how to achieve this, but it feels it could be done. I think all the "tools" are available in the existing interface in `whisper.h` - for example, `whisper_get_probs()` gives you the probability for each token.