@Rohit Shetty Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
Please follow the below action plan:
1.Please refer the below article for the speech diarization:
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.
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.
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:
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.