This collection of frequently asked questions (FAQ) provides
brief answers to many common questions about the
JavaTM Speech API (JSAPI).

Question Index
API Questions
Implementation Questions
Question Index
The JavaTM Speech API allows Java applications
to incorporate speech technology into their user interfaces. It defines a
cross-platform API to support command and control recognizers, dictation systems
and speech synthesizers.
Question Index
The Java Speech 1.0 API specification was released on October 26, 1998,
and is available at
http://java.sun.com/products/java-media/speech/
Question Index
The Java Speech API specification includes the Javadoc-style API documentation
for the approximately 70 classes and interfaces in the API. The specification
also includes a detailed Programmer's Guide which explains both introductory
and advanced speech application programming with JSAPI. Two companion
specifications are available: JSML and JSGF.
The specification is not yet provided with the .class files needed to compile
applications with JSAPI.
Question Index
The Java Speech API Markup Language (JSML) and the
Java Speech API Grammar Format (JSGF)
are companion specifications to the Java Speech API. JSML (currently in beta)
defines a standard text format for marking up text for input to a speech
synthesizer. JSGF version 1.0 defines a standard text format for providing a grammar to
a speech recognizer. Both specifications are available at
http://java.sun.com/products/java-media/speech/
Question Index
Sun Microsystems, Inc. worked in partnership with leading speech technology
companies to define the initial specification of the Java Speech API, JSML and
JSGF. Sun is grateful for the contributions of:
The JSAPI specification and JSGF and JSML specifications were developed
as open specifications with input from a public review process.
Question Index
The Java Speech API is part of a family of APIs that work together as a suite
to provide customers with enhanced graphics and extended communications capabilities.
These APIs include the
Question Index
The Java Speech API is a freely available specification and therefore anyone
is welcome to develop an implementation. The following implementations
are known to exist.
Note: Sun Microsystems, Inc. makes no
representations or warranties about the suitability of the software listed here, either
express or implied, including but not limited to the implied warranties of
mechantability, fitness for a particular purpose, or non-infringement. The implementations
listed here have not been tested with regard to compliance to the JSAPI
specification, nor does their appearance on this page imply any form of endorsement of
compliance on the part of Sun.
IBM's "Speech for Java"
- Description:
Implementation based on IBM's ViaVoice product, which
supports continuous dictation, command and control and speech synthesis.
It supports all the European language versions of ViaVoice --
US & UK English, French, German, Italian and Spanish -- plus Japanese.
- Requirements:
JDK 1.1.7 or later or JDK 1.2 on Windows 95 with 32MB, or Windows NT
with 48MB. Both platforms also require an installation ViaVoice 98.
IBM's "Speech for Java" on Linux
- Description:
Beta version of "Speech for Java" on Linux. Currently only supports
speech recognition.
- Requirements:
RedHat Linux 6.0 with 32MB, and
Blackdown JDK 1.1.7 with native thread
support.
Lernout & Hauspie's TTS for Java Speech
API
- Description:
Implementations based upon ASR1600 and TTS3000 engines, which support
command and control and speech synthesis. Supports 10 different voices
and associated whispering voices for the English language. Provides
control for pitch, pitch range, speaking rate, and volume.
- Requirements:
Sun Solaris OS version 2.4 or later, JDK 1.1.5.
Sun Swing package (free download) for graphical Type-n-Talk demo.
- More information:
Contact Edmund Kwan,
Director of Sales, Western Region Speech and Language Technologies
and Solutions (ekwan@lhs.com)
Conversa Web 3.0
- Description:
Conversa Web is a voice-enabled Web browser that provides a range of
facilities for voice-navigation of the web by speech recognition and
text-to-speech. The developers of Conversa Web chose to write a
JSAPI implementation for the speech support.
- Requirements:
Windows 95/98 or NT 4.0 running on Intel Pentium 166 MHz
processor or faster (or equivalent). Minimum of 32 MB RAM (64 MB
recommended). Multimedia system: sound card and speakers. Microsoft
Internet Explorer 4.0 or higher.
Festival
- Description:
Festival is a general multi-lingual speech synthesis
system developed by the Centre for Speech Technology Research at the
University of Edinburgh. It offers a full text to speech system with
various APIs, as well an environment for development and research of
speech synthesis techniques. It is written in C++ with a Scheme-based
command interpreter for general control and provides a binding to the
Java Speech API. Supports the English (British and American), Spanish
and Welsh languages.
- Requirements:
Festival runs on Suns (SunOS and Solaris), FreeBSD,
Linux, SGIs, HPs and DEC Alphas and is portable to other Unix machines.
Preliminary support is available for Windows 95 and NT. For details and
requirements see the Festival download page.
Question Index
It is possible to use JSAPI in an applet. In order to do this, users
will need the Java Plug-in (see
http://java.sun.com/products/plugin). The reason for this
is that JSAPI implementations require access to the AWT EventQueue,
and the built-in JDK support in the browsers we've worked with denies
any applet access to the AWT EventQueue. The Java Plug-in doesn't have
this restriction, and users can configure the Java Plug-in to grant or
deny applet access to the AWT Queue.
If you are using JRE 1.1:
Have your users follow these steps if your applet is based upon
JDK 1.1:
Then perform these steps on your applet:
-
Use javakey to both create a signature database for your system and to
sign your applet's jar file. This will allow the applet to participate
in the security model.
-
Create an HTML page that uses your applet in the Plug-in. See
http://java.sun.com/products/plugin/1.1.1/docs for more
information on how to do this.
-
If the user experiences a "checkread" exception while attempting to run
your applet, it's most likely due to a mismatch between the user's
identitydb.obj file and the signature on your applet's jar file. A way
to remedy this is to recreate your identitydb.obj and re-sign your jar
file.
If you are using JRE 1.2:
The Java 2 platform's security model allows signing as done with JDK
1.1, but it also permits finer grained access control. The following
are just some examples, and we recommend you read the Java Security
Architecture Specification at the following URL before deciding what to
do:
http://java.sun.com/products/jdk/1.2/docs/guide/security/spec/security-spec.doc.html
For a quick start, have your users do the following if your
applet uses the Java 2 (i.e., JDK 1.2) platform:
-
Obtain the JDK 1.2 Plug-in.
-
Before running the browser, have the user modify their CLASSPATH
environment variable to include the supporting classes for JSAPI. For
example, if the user has IBM's Speech for Java, have the user include
the ibmjs.jar file in CLASSPATH.
-
Make sure any shared libraries for the JSAPI support are in the user's
PATH. For example, if the user has IBM's Speech For Java, have the
user include the ibmjs lib directory in their PATH (e.g.,
c:\ibmjs\lib).
-
Have the user copy the speech.properties to their home directory. A
user can determine their home directory by enabling the console for the
Java Plug-in. When the user accesses a page that uses the Java
Plug-in, the Java Plug-in console will tell the user what it thinks the
user's home directory is.
-
Have the user modify their java.policy file in the Java Plug-in's
security directory appropriately. There are many ways to do this. The
following are just a few possibilities:
The information in this FAQ is not meant to be a complete tutorial on
the JDK 1.1 and JDK 1.2 architecture. Instead, it is meant to be
hopefully enough to get you started with running JSAPI applets in a
browser. We suggest you visit the following URLs to obtain more
information on the Java Security models:
Java Security Home Page:
http://java.sun.com/security
Tutorial on JDK 1.1 Security:
http://java.sun.com/docs/books/tutorial/security1.1
Tutorial on JDK 1.2 Security:
http://java.sun.com/docs/books/tutorial/security1.2
Question Index
JSAPI implementations require access to the AWT EventQueue. The
built-in Java platform support in the browsers we've worked with denies
an applet access to the AWT EventQueue. As a result, JSAPI
implementations will be denied access to the AWT EventQueue. In
addition, we are not aware of a way to configure the built-in Java
platform support in these environments to allow access to the AWT
EventQueue.
The Java Plug-in (see
http://java.sun.com/products/plugin), however, can be configured to
allow an applet the necessary permissions it needs to use an
implementation of JSAPI. As a result, we currently recommend using the
Java Plug-in for applets that use JSAPI.
Question Index
The JSAPI 1.0 specification includes the SpeechPermission class that
currently only supports one SpeechPermission: javax.speech. When that
permission is granted, an application or applet has access to all the
capabilities provided by installed speech recognizers and synthesizers.
Without that permission, an application or applet has no access to
speech capabilities.
As speech technology matures it is anticipated that a finer-grained
permission model will be introduced to provide access by applications
and applets to some, but not all, speech capabilities.
Before granting speech permission, developers and users should consider
the potential impact of the grant.
Question Index
This support is currently not in JSAPI. We plan to use the
Java Sound API
to help provide this support in the future. We purposely left room for
expansion in the javax.speech.AudioManager
interface and will further investigate this support after the Java Sound API
is finalized.
Question Index
|