It still picking up audio from Microphone instead of Sound out from the speaker.
else if (this.UseSystemSound)
{
using (var audioInput2 = AudioConfig.FromDefaultSpeakerOutput())
{
using (basicRecognizer = new SpeechRecognizer(config, audioInput2))
{
await this.RunRecognizer(basicRecognizer, RecoType.Base, stopBaseRecognitionTaskCompletionSource).ConfigureAwait(false);
}
}
}
Hi, FromDefaultSpeakerOutput is not for input configuration. AudioConfig methods From*Output are used with speech synthesis (text to speech) to specify the output for synthesized audio.
To configure the input for recognition, you need to use one of the From*Input methods, ref. https://docs.microsoft.com/en-us/dotnet/api/microsoft.cognitiveservices.speech.audio.audioconfig?view=azure-dotnet.
(Yes, the summary of AudioConfig in C# is not up to date as the class is not for input configuration only - we will update the documentation for the next Speech SDK release.)
Thanks
Most helpful comment
Hi, FromDefaultSpeakerOutput is not for input configuration. AudioConfig methods From*Output are used with speech synthesis (text to speech) to specify the output for synthesized audio.
To configure the input for recognition, you need to use one of the From*Input methods, ref. https://docs.microsoft.com/en-us/dotnet/api/microsoft.cognitiveservices.speech.audio.audioconfig?view=azure-dotnet.
(Yes, the summary of AudioConfig in C# is not up to date as the class is not for input configuration only - we will update the documentation for the next Speech SDK release.)