I have been executing code as per Microsoft Learn :
My Earphone/Audio is totally fine.
I'm using Visual Studio Code.
Whenever I run this code, I'm getting error :
$ dotnet run
Begin speaking....
Unhandled exception. System.AggregateException: One or more errors occurred. (Exception with an error code: 0xe (SPXERR_MIC_NOT_AVAILABLE))
---> System.ApplicationException: Exception with an error code: 0xe (SPXERR_MIC_NOT_AVAILABLE)
at Microsoft.CognitiveServices.Speech.Internal.SpxExceptionThrower.ThrowIfFail(IntPtr hr)
at Microsoft.CognitiveServices.Speech.Recognizer.FromConfig(GetRecognizerFromConfigDelegate fromConfig, SpeechConfig speechConfig)
at Microsoft.CognitiveServices.Speech.SpeechRecognizer..ctor(SpeechConfig speechConfig)
at helloworld.Program.RecognizeSpeechAsync() in C:\Users\Indhu\Desktop\Convert-Audio-From-Microphone\Program.cs:line 18
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at helloworld.Program.Main() in C:\Users\Indhu\Desktop\Convert-Audio-From-Microphone\Program.cs:line 48
Code : (I have attached. Rename it to Program.cs)78520-program.txt