Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1
The list of the topics, classes, interfaces, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Speech | MBS AVFoundation Plugin | 24.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
To speak some text, create an AVSpeechUtteranceMBS instance that contains the text and pass it to speakUtterance on a speech synthesizer instance. You can optionally also retrieve an AVSpeechSynthesisVoiceMBS and set it on the utterance’s voice property to have the speech synthesizer use that voice when speaking the utterance’s text.
The speech synthesizer maintains a queue of utterances that it speaks. If the synthesizer isn’t speaking, calling speakUtterance: begins speaking that utterance either immediately or after pausing for its preUtteranceDelay, if necessary. If the synthesizer is speaking, the synthesizer adds utterances to a queue and speaks them in the order it receives them.
After speech begins, you can use the synthesizer object to pause or stop speech. After pausing, you can resume the speech from its paused point or stop the speech entirely and remove all remaining utterances in the queue.
You can monitor the speech synthesizer by examining its speaking and paused properties, or by adding events.
An AVSpeechSynthesizerMBS also controls the route where the speech plays. For more information, see Directing speech output.
The system doesn’t automatically retain the speech synthesizer, so you need to manually retain it until speech concludes.
Constant | Value | Description |
---|---|---|
SpeechBoundaryImmediate | 0 |
Indicates to pause or stop speech immediately. |
SpeechBoundaryWord | 1 |
Indicates to pause or stop speech after the synthesizer finishes speaking the current word. |
Constant | Value | Description |
---|---|---|
SpeechSynthesisPersonalVoiceAuthorizationStatusAuthorized | 3 |
The user granted your app’s request to use personal voices. |
SpeechSynthesisPersonalVoiceAuthorizationStatusDenied | 1 |
The user denied your app’s request to use personal voices. |
SpeechSynthesisPersonalVoiceAuthorizationStatusNotDetermined | 0 |
The app hasn’t requested authorization to use personal voices. |
SpeechSynthesisPersonalVoiceAuthorizationStatusUnsupported | 2 |
The device doesn’t support personal voices. |
This class has no sub classes.
The items on this page are in the following plugins: MBS AVFoundation Plugin.
AVSpeechSynthesisVoiceMBS - AVSpeechUtteranceMBS