The Java API provides the javax.speech and javax.speech.synthesis packages to develop the Voice Help application. This chapter describes how to develop the Voice Help application that provides help information for the various menu options, such as File and Voice. End users can listen to this help information.
The Voice Help application provides end users help information about various interface elements, such as menu options and buttons .
The Voice Help application uses the following files:
SpeakHelp.java: Allows an end user to select a menu option or a button to listen to the help information for that menu option or button in the selected voice.
SelectHelpVoice.java: Allows an end user to select the required voice.
SpeakHelpText.java: Converts the text attached to menu options to speech in the selected voice. This file allows the end users to start and stop the audio.
Figure 4-1 shows the architecture of the Voice Help application:
The SpeakHelp.java file provides end users with the main user interface that contains the File and Voice menus and three buttons: Speak, Stop, and Help.
The File menu allows end users to create a file or open an existing file in the text area provided by the interface. The Voice menu contains the Select Voice menu option to select the required voice from the list of voices that an end user s system supports.
The SpeakHelp.java file calls the SelectHelpVoice.java file to set the selected voice as the help voice. An end user can select any of the menu options and click the Help button to listen to the help information for the selected option.
The SpeakHelp.java file calls the SpeakHelpText.java file to convert the text attached to the menu options to speech in the voice selected by an end user.