voiceinfo(
VOICE
)

The voiceinfo( function returns information about a speech synthesis voice.


Parameters

This function has one parameter:

voice – name of the voice. Note: This name is case sensitive – some names are all lower case, and some begin with an initial capital letter. Use the info(“voices”) function to get a list of all available voices.


Description

This function returns information about a speech synthesis voice. The information is returned as a dictionary.

dumpdictionaryquoted(voiceinfo("amelie")) ☞ 

        VoiceLocaleIdentifier="fr_CA"
        VoiceGender="VoiceGenderFemale"
        VoiceIdentifier="com.apple.speech.synthesis.voice.amelie"
        VoiceVersion="4.0.5"
        VoiceLanguage="fr-CA"
        VoiceName="Amelie"
        VoiceDemoText="Bonjour, je m’appelle Amelie. Je suis une voix canadienne."
        VoiceAge="35"
        VoiceNameRoot="Amelie"
        VoiceGroup="VoiceGroupCompact"

The exact information returned will vary for different voices, but it should always include the gender, identifier, version, language and name.

This example will cause the computer to say Isn’t it nice to have a computer that will talk to you? in a female voice.

local theVoice
theVoice = "Victoria"
speak getdictionaryvalue(voiceinfo(theVoice),"VoiceDemoText"),"voice",theVoice

If you change the name to Bruce it will say I sure like being inside this fancy computer.


See Also


History

VersionStatusNotes
10.0NewNew in this version.