Chapter 7: Creating an Online Java Tutorial Application


 Download CD Content

The Java API provides the javax.speech.synthesis and javax.speech packages to develop an application that converts the text in an online Java tutorial to speech.

This chapter describes how to develop the Online Java Tutorial application, which converts the text in the Java tutorial to speech by using the javax.speech and javax.speech.synthesis packages. This application provides a user interface using, which end users can select, any topic of the tutorial to view the text in that topic. The application then reads out the selected topic.

Architecture of the Online Java Tutorial Application

The Online Java Tutorial application allows end users to listen to the text in the tutorial. The application provides two panes, left and right. The left pane shows the various topics of the tutorial. The right pane shows the text contained in the selected topic. The application converts the text corresponding to the selected topic in the tutorial to speech.

The Online Java Tutorial application uses the following files:

  • Tutorial.java: Allows end users to select a topic from the tutorial to view the corresponding text.

  • SpeakText.java: Converts the text in the Java tutorial to speech.

Figure 7-1 shows the architecture of the Online Java Tutorial application:

click to expand: this figure shows the files that the online java tutorial application uses and the sequence in which the application uses them.
Figure 7-1: Architecture of the Online Java Tutorial Application

The Tutorial.java file provides the main user interface, which is divided into two panes, left and right.

The Tutorial.java file calls the SpeakText.java file to convert the text corresponding to the selected topic to speech.




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