Filip Skukan
Filip Skukan

Reputation: 571

Microsoft Speech Services Javascript SDK Timeout

I am trying to use Microsoft's Speech Service JavaScript SDK for Speech To Text and Speech Synthesis Service. The problem is that we want to either have a very long or unlimited timeout, or we would like to restart the continuous recognition. We are having issues finding how to do that in the API Documentation. We are using these 10 lines of code to use the recognition service, but the service is automatically stopped after around 20 seconds.

var SpeechSDK = window.SpeechSDK;
var audioConfig = SpeechSDK.AudioConfig.fromDefaultMicrophoneInput();
speechConfig.language = "en-US";
recognizer = new SpeechSDK.SpeechRecognizer(speechConfig, audioConfig);
recognizer.startContinuousRecognitionAsync();

recognizer.recognized = function(recognizer,SpeechSimplePhraseEvent){
    console.log(recognizer);
    console.log(SpeechSimplePhraseEvent);
}

Upvotes: 1

Views: 996

Answers (1)

wolfma
wolfma

Reputation: 436

yes - we are working on this right now (the problem is in the JS specific implementation, doesn't show up in the other implementation).

some more samples are here (and yes, we will improve the JS part in the sample area also)

https://github.com/Azure-Samples/cognitive-services-speech-sdk

sorry for the trouble Wolfgang

Upvotes: 2

Related Questions