Java InstantCode. Developing Applications using Java Speech API
To test the Auto Answering Machine application:
-
Download the free implementation of the Speech Converter API from the following URL:
http://freetts. sourceforge .net/docs/index.php
-
Download the JTAPI1.4 API from the following URL:
http://java.sun.com/products/jtapi/
-
Download the free implementation of the JTAPI 1.4 from the following URL:
http://sourceforge.net/projects/xtapi/
The free implementation includes Audio Service Provider, Microsoft Telephone API (MSTAPI) Service Provider, Serial Service Provider, and Extension Telephone API (XTAPI) JTAPI implementation.
-
Copy the XTapi.dll file to the bin directory in which the J2SDK is installed.
-
Set the path of the bin directory of J2SDK by executing the following command at the command prompt:
set path=%path%;D:\j2sdk1.4.0_02\bin;
-
Set the classpath of the lib directory of J2SDK, Speech Converter API, and JTAPI by executing the following command at the command prompt:
set classpath = %classpath%;d:\j2sdk1.4.0_02\lib;C:\j2sdk1.4.0_02\lib;c: \freetts-bin-1_2_beta\lib\freetts.jar;c:\freetts-bin-1_2_beta\lib\cmulex.jar;c: \freetts-bin-1_2_beta\lib\jsapi.jar;C:\XTAPI\XTapi.dll;C:\XTAPI\audiosp.jar;C: \XTAPI\mstapisp.jar;C:\XTAPI\serialsp.jar;C:\XTAPI\xtapi.jar;C:\JTAPI1.4;
-
Copy the AutoAnswerGUI.java, AutoAnswerObserver.java, AnswerText.java files, and Java Telephony API to a folder on your computer. Use the cd command at the command prompt to move to the folder in which you have copied the Java files. Compile the files by using the following javac command:
javac *.java
-
To run the Auto Answering Machine application, specify the following command at the command prompt:
java AutoAnswerGUI
-
The user interface of the Auto Answering Machine application appears.
-
Select the required provider to establish a connection with the modem. Then, click the Start Service button to start the Auto Answering Machine application.
Категории