Platforms to show: All Mac Windows Linux Cross-Platform
AVSpeechUtteranceMBS class New in 24.1
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Speech | MBS AVFoundation Plugin | 24.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
An AVSpeechUtterance is the basic unit of speech synthesis.
To synthesize speech, create an AVSpeechUtterance instance with text you want a speech synthesizer to speak. Optionally, change the voice, pitchMultiplier, volume, rate, preUtteranceDelay, or postUtteranceDelay parameters for the utterance. Pass the utterance to an instance of AVSpeechSynthesizer to begin speech, or enqueue the utterance to speak later if the synthesizer is already speaking.
Split a body of text into multiple utterances if you want to apply different speech parameters. For example, you can emphasize a sentence by increasing the pitch and decreasing the rate of that utterance relative to others, or you can introduce pauses between sentences by putting each into an utterance with a leading or trailing delay.
Set and use the AVSpeechSynthesizerMBS events to receive notifications when the synthesizer starts or finishes speaking an utterance. Create an utterance for each meaningful unit in a body of text if you want to receive notifications as its speech progresses.
- 10 properties
- property attributedSpeechString as NSAttributedStringMBS
- property Handle as Integer
- property pitchMultiplier as Single
- property postUtteranceDelay as Double
- property prefersAssistiveTechnologySettings as Boolean
- property preUtteranceDelay as Double
- property rate as Single
- property speechString as String
- property voice as AVSpeechSynthesisVoiceMBS
- property volume as Single
- 3 methods
- method Constructor(s as NSAttributedStringMBS)
- method Constructor(s as string)
- method copy as AVSpeechUtteranceMBS
- 3 shared methods
- shared method speechUtteranceWithAttributedString(s as NSAttributedStringMBS) as AVSpeechUtteranceMBS
- shared method speechUtteranceWithSSMLRepresentation(s as string) as AVSpeechUtteranceMBS
- shared method speechUtteranceWithString(s as string) as AVSpeechUtteranceMBS
This class has no sub classes.
Some methods using this class:
- AVSpeechSynthesizerMBS.speakUtterance(utterance as AVSpeechUtteranceMBS)
- AVSpeechSynthesizerMBS.writeUtterance(utterance as AVSpeechUtteranceMBS)
Some events using this class:
- AVSpeechSynthesizerMBS.didCancelSpeechUtterance(utterance as AVSpeechUtteranceMBS)
- AVSpeechSynthesizerMBS.didContinueSpeechUtterance(utterance as AVSpeechUtteranceMBS)
- AVSpeechSynthesizerMBS.didFinishSpeechUtterance(utterance as AVSpeechUtteranceMBS)
- AVSpeechSynthesizerMBS.didPauseSpeechUtterance(utterance as AVSpeechUtteranceMBS)
- AVSpeechSynthesizerMBS.didStartSpeechUtterance(utterance as AVSpeechUtteranceMBS)
- AVSpeechSynthesizerMBS.willSpeakMarker(marker as AVSpeechSynthesisMarkerMBS, utterance as AVSpeechUtteranceMBS)
- AVSpeechSynthesizerMBS.willSpeakRangeOfSpeechString(characterRange as NSRangeMBS, utterance as AVSpeechUtteranceMBS)
Blog Entries
The items on this page are in the following plugins: MBS AVFoundation Plugin.
AVSpeechSynthesizerMBS - AVSynchronizedLayerMBS