How can I get the confidence score from the speech result?
See original GitHub issuePlease provide us with the following information:
This issue is for a: (mark with an x
)
- [ ] bug report -> please search issues before submitting
- [V] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
Any log messages given by the failure
Expected/desired behavior
OS and Version?
Windows 7, 8 or 10. Linux (which distribution). Other.
Versions
Mention any other details that might be useful
during this Speech SDK porting, I couldn’t find any confidence score which I would be able to utilize the value to retry the ASR. on the result class, I’ve only found ; ErrorDetails, Properties, Reason, ResultId, Text.
Is there any way to get its confidence score, or get the result as NBest list? (I used to have confidence score former bing asr api.)
Please let me know if you have answers or plans. Thank you in advance, Good day! 😉
Thanks! We’ll be in touch soon.
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
RecognizedPhrase.Confidence Property (System.Speech. ...
Confidence scores do not indicate the absolute likelihood that a phrase was recognized correctly. Instead, confidence scores provide a mechanism for comparing ...
Read more >SpeechRecognitionAlternative: confidence property - Web APIs
The confidence read-only property of the SpeechRecognitionResult interface returns a numeric estimate of how confident the speech ...
Read more >Confidence Scores / Self-Training for Wav2Vec2 / CTC ...
I started looking a bit into Confidence Scores / Self-Training for Speech Recognition for models like Wav2Vec2.
Read more >Confidence Scores / Self-Training for Wav2Vec2 / CTC ...
I started looking a bit into Confidence Scores / Self-Training for Speech Recognition for models like Wav2Vec2 that make use a language ...
Read more >Enable word-level confidence | Cloud Speech-to-Text ...
The response sent from Speech-to-Text states the confidence level for the entire transcription request as a number between 0.0 and 1.0. The following...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please follow this https://docs.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig?view=azure-python#set-service-property-name--str--value--str--channel--azure-cognitiveservices-speech-servicepropertychannel-
You need to use the following property in your speech config set_service_property(name: str, value: str, channel: azure.cognitiveservices.speech.ServicePropertyChannel)
Like this import azure.cognitiveservices.speech as msspeech
config.set_service_property(name=‘wordLevelConfidence’, value=‘true’, channel=msspeech.ServicePropertyChannel.UriQueryParameter) config.set_service_property(name=‘format’, value=‘detailed’, channel=msspeech.ServicePropertyChannel.UriQueryParameter)
That will help you get the detailed result in the final json output like this {“Id”:“12345767e9984244b4386631bd8a3b3d”,“RecognitionStatus”:“Success”,“Offset”:500000,“Duration”:13200000,“DisplayText”:“What’s the weather like?”,“NBest”:[{“Confidence”:0.97701865,“Lexical”:“what’s the weather like”,“ITN”:“what’s the weather like”,“MaskedITN”:“what’s the weather like”,“Display”:“What’s the weather like?”,“Words”:[{“Word”:“what’s”,“Confidence”:0.9752328},{“Word”:“the”,“Confidence”:0.9912971},{“Word”:“weather”,“Confidence”:0.9947196},{“Word”:“like”,“Confidence”:0.9936005}]},{“Confidence”:0.92623466,“Lexical”:“what is the weather like”,“ITN”:“what is the weather like”,“MaskedITN”:“what is the weather like”,“Display”:“What is the weather like?”,“Words”:[{“Word”:“what”,“Confidence”:0.44181886},{“Word”:“is”,“Confidence”:0.020716537},{“Word”:“the”,“Confidence”:0.77797073},{“Word”:“weather”,“Confidence”:0.8319083},{“Word”:“like”,“Confidence”:0.8447693}]}]}
Do let us know if you need anything else.
Sorry, my mistake. I have to use speechConfig.outputFormat = 1 not speechConfig.OutputFormat = 1;. Now I can get the detailed output. Anyway thank you 😃