Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSSpeechSynthesizerMBS class.

NSSpeechSynthesizerMBS.addSpeechDictionary(speechDictionary as dictionary)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Registers the given speech dictionary with the receiver.

speechDictionary: Speech dictionary to add to the receiver's dictionaries.

See the discussion of UseSpeechDictionary in Speech Synthesis Manager Reference for more information.
Available in OS X v10.5 and later.

NSSpeechSynthesizerMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 6.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Initializes the class with the default voice.

This constructor is needed for the events to fire.
The given voice must be valid!

See also:

NSSpeechSynthesizerMBS.Constructor(voice as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 6.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Initializes the class with a voice.

This constructor is needed for the events to fire.

See also:

NSSpeechSynthesizerMBS.continueSpeaking

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Continues speaking after it has been paused.

Mac OS X 10.5 only.

NSSpeechSynthesizerMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The destructor.

NSSpeechSynthesizerMBS.objectForProperty(PropertyName as string, byref error as NSErrorMBS) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Provides the value of a receiver's property.

PropertyName: Property to get.
error: On output, error that occurred while obtaining the value of speechProperty.

Returns the value of speechProperty.
Available in OS X v10.5 and later.

NSSpeechSynthesizerMBS.pauseSpeakingAtBoundary(boundary as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Pauses the speaking on the given boundary.
Example
dim s as NSSpeechSynthesizerMBS // your synthesizer
s.pauseSpeakingAtBoundary s.NSSpeechSentenceBoundary // pause on end of sentence.

Mac OS X 10.5 only.
boundary can be NSSpeechImmediateBoundary, NSSpeechSentenceBoundary or NSSpeechWordBoundary.

NSSpeechSynthesizerMBS.phonemesFromText(text as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the phonems from a given text.
Example
dim s as new NSSpeechSynthesizerMBS

MsgBox s.phonemesFromText("Hello")

// shows "_hEHl1OW."

Mac OS X 10.5 only.

NSSpeechSynthesizerMBS.setObjectForProperty(value as Variant, PropertyName as string, byref error as NSErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Specifies the value of a receiver's property.

PropertyName: Property to set.
Error: On output, error that occurred while setting speechProperty.

Returns true when the speechProperty was set. False when there was an error, specified in error.
Available in OS X v10.5 and later.

NSSpeechSynthesizerMBS.SetVoice(voice as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 6.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Sets the receiver's current voice.

Returns true on success.

Some examples using this method:

NSSpeechSynthesizerMBS.StartSpeakingString(text as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 6.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Begins speaking synthesized text through the system's default sound output device.
Example
dim s as new NSSpeechSynthesizerMBS

s.rate=300 // not slow
s.volume=0.5 // not loud
call s.startSpeakingString "Hello World"

Returns true when synthesis starts successfully, false otherwise.

If the receiver is currently speaking synthesized speech when startSpeakingString is called, that process is stopped before text is spoken.

When synthesis of text finishes normally or is stopped, the message didFinishSpeaking(true) is called.

See also:

Some examples using this method:

NSSpeechSynthesizerMBS.StartSpeakingString(text as string, file as folderitem) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 6.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Begins synthesizing text into a sound (AIFF) file.

Returns true when synthesis starts successfully, false otherwise.

When synthesis of text finishes normally or is stopped, the message didFinishSpeaking(True) is called.

One example of how you might use this method is in an email program that automatically converts new messages into sound files that can be stored on an iPod for later listening.

See also:

NSSpeechSynthesizerMBS.startSpeakingString(Text as String, URL as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Begins synthesizing text into a sound (AIFF) file.

Returns true when synthesis starts successfully, false otherwise.

When synthesis of text finishes normally or is stopped, the message didFinishSpeaking(True) is called.

One example of how you might use this method is in an email program that automatically converts new messages into sound files that can be stored on an iPod for later listening.

See also:

NSSpeechSynthesizerMBS.StopSpeaking

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 6.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Stops synthesis in progress.

If the receiver is currently generating speech, synthesis is halted, and the message didFinishSpeaking(false) is called.

NSSpeechSynthesizerMBS.stopSpeakingAtBoundary(boundary as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Speech MBS MacCocoa Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Stops speech on the next w

Mac OS X 10.5 only.

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


The biggest plugin in space...