the API works fine on localhost, but as soon as I run the async operation in production (on heroku) I get the following error after a few minutes:
Error: Total timeout exceeded before any response was received
at Timeout._onTimeout (/app/node_modules/google-gax/lib/longrunning.js:347:11)
at retry (/app/node_modules/google-gax/lib/longrunning.js:327:31)
at Timer.listOnTimeout (timers.js:207:5)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
the operation.promise() never resolves. Any guidance on this?
speech.startRecognition(googleFileUrl, config)
.then((results) => {
const operation = results[0];
return operation.promise();
})
.then((results) => {
var transcription = results[0];
console.log(`Transcription: ${transcription}`);
})
.catch((err) => {
console.error('Transcription error:', err);
});
the API works fine on localhost, but as soon as I run the async operation in production (on heroku) I get the following error after a few minutes:
the
operation.promise()never resolves. Any guidance on this?