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.


The biggest plugin in space...