startSpeaking(_:to:)
Begins synthesizing text into a sound (AIFF) file.
Declaration
func startSpeaking(_ string: String, to url: URL) -> BoolParameters
- string:
Text to speak. When
nilor empty, no synthesis is started. - url:
Filesystem location of the output sound file.
Return Value
Discussion
When synthesis of text finishes normally or is stopped, the message speechSynthesizer(_:didFinishSpeaking:) is sent to the delegate.
One example of how you might use this method is in an email program that automatically converts new messages into sound files that can be stored on an iPod for later listening.