According to some similar problems, check if your microphone is available using other programs, such as Windows Voice Recorder, for example.
You can also check and debug your code using Visual Studio.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have been executing code as per Microsoft Learn :
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
According to some similar problems, check if your microphone is available using other programs, such as Windows Voice Recorder, for example.
You can also check and debug your code using Visual Studio.