Azure-Samples / cognitive-services-speech-sdk

Sample code for the Microsoft Cognitive Services Speech SDK
MIT License
2.96k stars 1.86k forks source link

Continuous recognition not re-starting after stopping programatically #1767

Closed dhavalsoni2001 closed 1 year ago

dhavalsoni2001 commented 1 year ago

Describe the bug

When first time using startContinuousRecognitionAsync Safari prompts correctly for microphone access, I have a 'microphone active' display next to the url, and speech gets recognized.

As I am integrated GPT3 I am using stopContinuousRecognitionAsync to stop it until GPT 3 respond and after that I start again using startContinuousRecognitionAsync to listen the user but at that time I do not get a microphone access prompt, and there is no 'microphone active' display next to the URL.

We are using SpeechSDK.TranslationRecognizer's recognized method for the capturing the user input but it's never go into that function second time as microphone is not active.

Expected behavior Once I stop using stopContinuousRecognitionAsync and then I again start it using startContinuousRecognitionAsync it should show the microphone active again and go to recognized method again.

Version of the Cognitive Services Speech SDK I am using https://aka.ms/csspeech/jsbrowserpackageraw to load the latest SDK.

Platform, Operating System, and Programming Language

glharper commented 1 year ago

@dhavalsoni2001 See https://github.com/microsoft/cognitive-services-speech-sdk-js/issues/599