How can I find the confidence score of a translated phrase in the cognitive services speech SDK?

HACKETT Ryan K 1 Reputation point
2022-02-22T17:33:06.757+00:00

I am translating a wav file using this function in the sample and I need to get the confidence score of a phrase. How can I do that?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,080 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 53,981 Reputation points Moderator
    2022-02-23T02:12:28.143+00:00

    @HACKETT Ryan K

    Thanks for reaching out to us, I think you are asking how to get the confidence score for phrases, but I am a little bit confused about how you define a "phrase"

    Generally, if you want to get result with confidence score, a good way is to set the "format" as "detailed".
    Example here:

    var config = SpeechConfig.FromSubscription(Yoursubscription, "YourRegion");  
    config.setServiceProperty("format", "detailed", ServicePropertyChannel.UriQueryParameter);  
    

    If you want to get result with word-level confidence score, please try below:

    var config = SpeechConfig.FromSubscription(Yoursubscription, "YourRegion");  
    config.SetServiceProperty("wordLevelConfidence", "true", ServicePropertyChannel.UriQueryParameter);  
    config.OutputFormat = OutputFormat.Detailed;  
    

    Please have a try.

    Regards,
    Yutong

    -Please kindly accept the answer if you feel helpful, thanks.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.