NSSpeechSynthesizerMBS events

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

Back to NSSpeechSynthesizerMBS class.

NSSpeechSynthesizerMBS.didEncounterErrorAtIndex(characterIndex as Integer, text as string, message as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Speech MBS MacCocoa Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
An event called when an error has been found in the text while speaking.

Mac OS X 10.5 only.

NSSpeechSynthesizerMBS.didEncounterSyncMessage(message as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Speech MBS MacCocoa Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
A sync message was found in the text.

See Apple Speech documentation about the special tags you need to place in the text to get this event.
Mac OS X 10.5 only.

NSSpeechSynthesizerMBS.didFinishSpeaking(finishedSpeaking as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Speech MBS MacCocoa Plugin 6.4 ✅ Yes ❌ No ❌ No ❌ No
Called when speaking through the sound output device is done.

finishedSpeaking is true when finished normally and false when StopSpeaking was called.

Some examples using this event:

NSSpeechSynthesizerMBS.willSpeakPhoneme(phonemeOpcode as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Speech MBS MacCocoa Plugin 6.4 ✅ Yes ❌ No ❌ No ❌ No
Sent just before a synthesized phoneme is spoken through the sound output device.

phonemeOpcode: Phoneme that sender is about to speak into the sound output device.

One use of this method might be to animate a mouth on screen to match the generated speech.

Important: The delegate is not sent this message when the SpeechSynthesizer object is synthesizing speech to a file (startSpeakingString).

NSSpeechSynthesizerMBS.willSpeakWord(Position as Integer, Length as Integer, Text as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Speech MBS MacCocoa Plugin 6.4 ✅ Yes ❌ No ❌ No ❌ No
Sent just before a synthesized word is spoken through the sound output device.

Position and Length: Word that sender is about to speak into the sound output device.
text: Text that is being synthesized by sender.

One use of this method might be to visually highlight the word being spoken.

Important: The delegate is not sent this message when the SpeechSynthesizer object is synthesizing speech to a file (startSpeakingString).

Some examples using this event:

The items on this page are in the following plugins: MBS MacCocoa Plugin.


💬 Ask a question or report a problem