Chapter 4: Creating a Voice Help Application


 Download CD Content

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.

Architecture of the Voice Help Application

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:

click to expand: this figure shows the files that the voice help application uses and the sequence in which the application uses them.
Figure 4-1: 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.




Java InstantCode. Developing Applications using Java Speech API
Java InstantCode. Developing Applications using Java Speech API
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 46

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net