AVFoundation.AVSpeechSynthesizer Class
Synthesizes speech and raises events relating to text-to-speech.

See Also: AVSpeechSynthesizer Members

Syntax

[Foundation.Register("AVSpeechSynthesizer", true)]
[ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_7_0)]
public class AVSpeechSynthesizer : Foundation.NSObject

Remarks

In its simplest form, text-to-speech can be done with just two classes:

C# Example

var ss = new AVSpeechSynthesizer();
var su = new AVSpeechUtterance("Microphone check. One, two, one two.") {
	Rate = 0.25f
};
ss.SpeakUtterance(su);          
          

The AVFoundation.AVSpeechSynthesizer maintains an internal queue of AVFoundation.AVSpeechUtterances. The queue is not accessible to application developers, but the synthesizer can be paused or stopped with AVSpeechSynthesizer.PauseSpeaking and AVSpeechSynthesizer.StopSpeaking. Events such as AVSpeechSynthesizer.DidStartSpeechUtterance or AVSpeechSynthesizer.WillSpeakRangeOfSpeechString are opportunities for the application developer to modify previously-enqueued sequences.

Related content

Requirements

Namespace: AVFoundation
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0