Accessibility
 
Home > Products > Director > Support > Accessibility
Macromedia Director Support Center - Accessibility
Using accessibility Lingo

If you have a basic understanding of Lingo, you can write custom scripts to add text-to-speech functionality to your movies. For more information about Lingo, see the "Writing Scripts with Lingo" chapter in Using Director.

First, you must initialize the speech software.

To initialize the text-to-speech software:

Use the voiceInitialize() command.

The following frame script tests whether text-to-speech software is installed. If no software is installed, the script displays an alert dialog box.

on exitFrame
	if voiceInitialize() then 
		go to frame "Start"
	else
		alert "Text-to-speech is not available"
	end if
end

To determine the number of available voices:

Use the voiceCount() function.

To return a property list that describes the name, gender, age and index number of the current voice:

Use the voiceGet() function.

To return a list of property lists that describes all the available voices:

Use the voiceGetAll() function.

To set a particular voice as the current voice:

Use the voiceSet() command.

After you select a voice for speech synthesis, you can control the progress of the speech.

To begin speech synthesis:

Use the voiceSpeak() command.

To temporarily pause the speech:

Use the voicePause() command.
Some speech engines might continue to speak for several seconds after the pause command is used.

To resume the speech:

Use the voiceResume() command.

To stop speech synthesis:

Use the voiceStop() command.

To check whether the speech is currently speaking, paused, or stopped:

Use the voiceState() function.

To set the volume of the voice:

Use the voiceSetVolume() command.

To set the pitch of the voice:

Use the voiceSetPitch() command.

To determine the chronological number of the current word within the string being spoken:

Use the voiceWordPos() function.

For a complete list of Lingo terms that control text-to-speech and keyboard navigation, see "Accessibility" in the Lingo by Feature chapter of the Lingo Dictionary.

To Table of Contents Back to Previous document Forward to next document