Sunday 28 May 2017

node js: i have working code to show transcript using google speech api but not able to show confidence

This code sends flac audio to google speech api and returns transcript but as on google cloud sdk it returns confidence value also .i am not able to print confidence.

`

// Detects speech in the audio file
        speechClient.recognize(fileName, options)
          .then((results) => {
            const transcription = results[0];
    const confidence = results[0];
            console.log(`Transcription: ${transcription}`);
        //not able to print confidence value
    console.log(`Confidence: ${confidence}`);
          })`



via Kushagra

No comments:

Post a Comment