Getting exception when deploy Speech SDK on Azure webapp SPXERR_MIC_NOT_AVAILABLE
sam
201
Reputation points
Describe the bug
When I am trying to deplpy my Speech SDK (from Microphone To Speech)on Azure webapp getting SPXERR_MIC_NOT_AVAILABLE though it is working locally and over local iis deployed also.
To Reproduce
Steps to reproduce the behavior:
Write below method on .net core api and deploy on Azure
public async Task<IActionResult> MicrophoneToSpeechAsync(string languageIso6391Code)
{
var subscription = _config.GetValue<string>("SubscriptionId");
var location = _config.GetValue<string>("Region");
var config = SpeechConfig.FromSubscription(subscription, location);
config.SpeechRecognitionLanguage = string.IsNullOrWhiteSpace(languageIso6391Code) ? "en-us" :
languageIso6391Code;
// Creates a speech recognizer.
using (var recognizer = new SpeechRecognizer(config))
{
Console.WriteLine("Say something...");
var result = await recognizer.RecognizeOnceAsync();
List<SpeechCommonService.DetectedLanguage> language = null;
// Checks result.
if (result.Reason == ResultReason.RecognizedSpeech)
{
Console.WriteLine($"We recognized: {result.Text}");
}
}
}
Extected behaviour
It should understand the spoken words over microphone and convert it to text.
Sign in to answer