We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fca8cf commit e9ca302Copy full SHA for e9ca302
speech/quickstart.js
@@ -51,8 +51,10 @@ const request = {
51
52
// Detects speech in the audio file
53
speechClient.recognize(request)
54
- .then((results) => {
55
- const transcription = results[0].results[0].alternatives[0].transcript;
+ .then((data) => {
+ const response = data[0];
56
+ const transcription = response.results.map(result =>
57
+ result.alternatives[0].transcript).join('\n');
58
console.log(`Transcription: ${transcription}`);
59
})
60
.catch((err) => {
0 commit comments