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();