Google Speech To Text API: Enable Word Confidence Not Found

Viewed 834

I'm not able to add the Word level confidence to my alternative results, can someone please assist?

I tried reading through the following page: https://cloud.google.com/speech-to-text/docs/word-confidence#speech-word-level-confidence-python but I wasn't able to alter my code to retrieve the confidence on Word Level

Encoding = AudioEncoding.Linear16,
SampleRateHertz = 44100,
LanguageCode = LanguageCodes.English.SouthAfrica,
EnableWordTimeOffsets = true,
EnableAutomaticPunctuation = true,
UseEnhanced = true,
EnableWordConfidence = true; 

foreach (var result in response.Results){

    foreach (var alternative in result.Alternatives){

        returnedText += alternative.Transcript + " ";

        foreach (var item in alternative.Words){
            var startTime = item.StartTime;
            var endTime = item.EndTime;
            var confidence = item.Confidence; 
        }

    }

}
1 Answers

Word confidence is a pre-release feature per the documentation page so it is only be available to a select group of API users. It is not yet available to everyone.

Related