@Rohit Shetty Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
It seems like you are trying to use the Microsoft Azure Speech Services SDK to perform real-time speaker diarization using the microphone as input, but you are encountering issues with TypeScript and JavaScript.
Please follow the below action plan:
1.Please refer the below article for the speech diarization:
https://learn.microsoft.com/en-us/azure/ai-services/speech-service/get-started-stt-diarization?tabs=macos&pivots=programming-language-javascript
var audioConfig = SpeechSDK.AudioConfig.fromDefaultMicrophoneInput();
2.Instead of leaving the parameter blank, Please enter the deviceId parameter for fromMicrophoneInput
and check if that works.
More Info here.
3.Also check for the SDK installation guide for required version. https://learn.microsoft.com/en-us/azure/ai-services/speech-service/quickstarts/setup-platform?pivots=programming-language-javascript
4.Ensure that your SDK is up to date and is using latest version and you are not using older version of the SDK.
5.Check if the microphone is properly connected and configured on your system. Ensure that you have the necessary permissions and access rights to use the microphone as input.
6.Please use the sample code available here and check if that works fine.
If you still encounter the same issue, please let me know. I would be happy to help.
**
--------****Update:--------
On a side note:** As of today, recognizing speech from a microphone is not supported in Node.js. It's supported only in a browser-based JavaScript environment. For more information, see the React sample and the implementation of speech to text from a microphone on GitHub.
The React sample shows design patterns for the exchange and management of authentication tokens. It also shows the capture of audio from a microphone or file for speech to text conversions.
Sharing some relevant articles if that helps:
https://learn.microsoft.com/en-us/answers/questions/1349902/real-time-diarization-with-defaultmicrophone-input
https://stackoverflow.com/questions/67925253/azure-cognitive-services-speech-to-text-microphone-not-detected
https://stackoverflow.com/questions/58084122/microsoft-speech-recognition-nodejs
Hope this helps.
**
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.