Closed adhit159 closed 7 years ago
down vote favorite When I'm trying to execute this code its giving error like
(node:3784) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec tion id: 1): Error: Voice recognition failed miserably: socket hang up
var fs = require('fs'); var bing = require('C:\Program Files\nodejs\node_modules\bingspeech-api-client\lib\client.js');
var audioStream = fs.createReadStream('d:\node.wav');
var subscriptionKey = 'xxxxxxxxxxxxxxxxx';
var client = new bing.BingSpeechClient(subscriptionKey); client.recognizeStream(audioStream) .then(response => console.log(response.results[0].name));
http://stackoverflow.com/questions/42570738/speech-to-text-bing-speech-api-azure
@adhit159 Works for me and for some other users, too. Are you still facing this issue? Reopen if needed.
Does this library use WebSockets?
No. It uses tradicional HTTP requests.
down vote favorite When I'm trying to execute this code its giving error like
(node:3784) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec tion id: 1): Error: Voice recognition failed miserably: socket hang up
var fs = require('fs'); var bing = require('C:\Program Files\nodejs\node_modules\bingspeech-api-client\lib\client.js');
var audioStream = fs.createReadStream('d:\node.wav');
var subscriptionKey = 'xxxxxxxxxxxxxxxxx';
var client = new bing.BingSpeechClient(subscriptionKey); client.recognizeStream(audioStream) .then(response => console.log(response.results[0].name));
http://stackoverflow.com/questions/42570738/speech-to-text-bing-speech-api-azure