I tried to follow the sample code in the Xamarin Documentation about speech to text. The android part work for my android phone but test on the iPhone it didn't make any sound. I added the delegate function "DidStartSpeechUtterance" and it did call the delegate function but no sound from the phone.
var speechSynthesizer = new AVSpeechSynthesizer();
var speechUtterance = new AVSpeechUtterance(text)
{
Rate = AVSpeechUtterance.MaximumSpeechRate / 4,
Voice = AVSpeechSynthesisVoice.FromLanguage("en-US"),
Volume = 0.5f,
PitchMultiplier = 1.0f
};
speechSynthesizer.DidStartSpeechUtterance += (sender, e) =>
{
System.Diagnostics.Debug.WriteLine("Am I get called");
};
speechSynthesizer.SpeakUtterance(speechUtterance);
It works on the emulator iPhone SE iOS 10.2, but not the actual device.
I don't really have a direct answer for you sadly, however:
You could try if James Montemagno's nuget package works for you:
https://github.com/jamesmontemagno/TextToSpeechPlugin
This was made to abstract away the implementation so that you can use it from a (Shared) portable class library - it helps you to share even more code as well. I'm curious if that does work for you. If that doesn't work either something else is wrong (outside the speech-synthesizer part)