This version is out of date, covering development from v9.5.0 to v9.7.3. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

String.speak([voiceNameStr])


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Last Altered: 

Operator Has Optional Arguments: 


Syntax note: Operators without any defined mandatory arguments may omit their empty closing parentheses


String.speak([voiceNameStr])

speaks a string using Mac text-to-speech. If another string is being spoken, the new phrase is spoken after the current phrase is complete.

$Text.speak(); 

An optional second argument voiceNameStr identifies the voice the speech synthesiser should use. If the nominated voiceNameStr is not present no sound is played. The closing parentheses are only needed if the extra argument is being passed:

$Text.speak("Tessa"); 

From v9.5.0, quoted literal strings can be chained to .speak():

"Look on my Works, ye Mighty, and despair".speak(); 

'Look on my Works, ye Mighty, and despair'.speak();