How to get word-level confidence for each word using MS Azure speech to text service? Currently, I am getting confidence value for sentence-level and I need word-level confidence for further processing.
You can retrieve the wordLevelConfidence by adding the ‘format=detailed’ & ‘wordLevelConfidence=true’ to the URI
For example, the language set to US English using the West US endpoint is: https://westus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US&format=detailed&wordLevelConfidence=true.
If you use the SDK:
var config = SpeechConfig.FromSubscription(sub, "westeurope");
config.SetServiceProperty("wordLevelConfidence", "true", ServicePropertyChannel.UriQueryParameter);
//config.RequestWordLevelTimestamps(); in case you also want wordleveltimestamps
config.OutputFormat = OutputFormat.Detailed;
the word confidence values are not part of the result directly, Take a look at the below for complete result in JSON form. recognizer.Recognized += (s, e) => { var j = e.Result.Properties.GetProperty(PropertyId.SpeechServiceResponse_JsonResult);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With