stopSpeaking(at:)
Stops synthesis in progress at a given boundary.
Declaration
func stopSpeaking(at boundary: NSSpeechSynthesizer.Boundary)Parameters
- boundary:
Boundary at which to stop speech. The supported bound types are listed in Boundary.
Discussion
Pass the constant NSSpeechSynthesizer.Boundary.immediateBoundary to stop immediately, even in the middle of a word. Pass NSSpeechSynthesizer.Boundary.wordBoundary or NSSpeechSynthesizer.Boundary.sentenceBoundary to stop speech at the end of the current word or sentence, respectively.
If the end of the string being spoken is reached before the specified stopping point, the synthesizer stops at the end of the string without generating an error.