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

See Also: AVSpeechSynthesizer Members

Syntax

[MonoTouch.Foundation.Register("AVSpeechSynthesizer", true)]
[MonoTouch.ObjCRuntime.Availability(Introduced=MonoTouch.ObjCRuntime.Platform.iOS_7_0)]
public class AVSpeechSynthesizer : MonoTouch.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 MonoTouch.AVFoundation.AVSpeechSynthesizer maintains an internal queue of MonoTouch.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: MonoTouch.AVFoundation
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0