<s>
The	O
Java	B-Language
Speech	I-Language
API	I-Language
(	O
JSAPI	O
)	O
is	O
an	O
application	B-Application
programming	I-Application
interface	I-Application
for	O
cross-platform	O
support	O
of	O
command	O
and	O
control	O
recognizers	O
,	O
dictation	O
systems	O
,	O
and	O
speech	B-Application
synthesizers	I-Application
.	O
</s>
<s>
Although	O
JSAPI	O
defines	O
an	O
interface	O
only	O
,	O
there	O
are	O
several	O
implementations	O
created	O
by	O
third	O
parties	O
,	O
for	O
example	O
FreeTTS	B-Language
.	O
</s>
<s>
Two	O
core	O
speech	O
technologies	O
are	O
supported	O
through	O
the	O
Java	B-Language
Speech	I-Language
API	I-Language
:	O
speech	B-Application
synthesis	I-Application
and	O
speech	B-Application
recognition	I-Application
.	O
</s>
<s>
Speech	B-Application
synthesis	I-Application
provides	O
the	O
reverse	O
process	O
of	O
producing	O
synthetic	O
speech	O
from	O
text	O
generated	O
by	O
an	O
application	O
,	O
an	O
applet	O
,	O
or	O
a	O
user	O
.	O
</s>
<s>
It	O
is	O
often	O
referred	O
to	O
as	O
text-to-speech	B-Application
technology	O
.	O
</s>
<s>
The	O
remaining	O
steps	O
convert	O
the	O
spoken	O
text	B-Application
to	I-Application
speech	I-Application
:	O
</s>
<s>
Speech	B-Application
synthesizers	I-Application
can	O
make	O
errors	O
in	O
any	O
of	O
the	O
processing	O
steps	O
described	O
above	O
.	O
</s>
<s>
Speech	B-Application
recognition	I-Application
provides	O
computers	O
with	O
the	O
ability	O
to	O
listen	O
to	O
spoken	O
language	O
and	O
determine	O
what	O
has	O
been	O
said	O
.	O
</s>
<s>
The	O
major	O
steps	O
of	O
a	O
typical	O
speech	B-Application
recognizer	I-Application
are	O
as	O
follows	O
:	O
</s>
<s>
Phoneme	B-Application
recognition	I-Application
:	O
Compares	O
the	O
spectrum	O
patterns	O
to	O
the	O
patterns	O
of	O
the	O
phonemes	O
of	O
the	O
language	O
being	O
recognized	O
.	O
</s>
<s>
A	O
grammar	O
is	O
an	O
object	O
in	O
the	O
Java	B-Language
Speech	I-Language
API	I-Language
that	O
indicates	O
what	O
words	O
a	O
user	O
is	O
expected	O
to	O
say	O
and	O
in	O
what	O
patterns	O
those	O
words	O
may	O
occur	O
.	O
</s>
<s>
Grammars	O
are	O
important	O
to	O
speech	B-Application
recognizers	I-Application
because	O
they	O
constrain	O
the	O
recognition	O
process	O
.	O
</s>
<s>
The	O
Java	B-Language
Speech	I-Language
API	I-Language
1	O
supports	O
two	O
basic	O
grammar	O
types	O
:	O
rule	O
grammars	O
and	O
dictation	O
grammars	O
.	O
</s>
<s>
Rule	O
grammars	O
are	O
defined	O
in	O
JSAPI	O
1	O
by	O
JSGF	B-General_Concept
,	O
the	O
Java	B-General_Concept
Speech	I-General_Concept
Grammar	I-General_Concept
Format	I-General_Concept
.	O
</s>
<s>
The	O
different	O
classes	O
and	O
interfaces	O
that	O
form	O
the	O
Java	B-Language
Speech	I-Language
API	I-Language
are	O
grouped	O
into	O
the	O
following	O
three	O
packages	O
:	O
</s>
<s>
javax.speech.synthesis	O
:	O
Contains	O
classes	O
and	O
interfaces	O
for	O
speech	B-Application
synthesis	I-Application
.	O
</s>
<s>
javax.speech.recognition	O
:	O
Contains	O
classes	O
and	O
interfaces	O
for	O
speech	B-Application
recognition	I-Application
.	O
</s>
<s>
The	O
EngineManager	O
class	O
is	O
like	O
a	O
factory	O
class	O
used	O
by	O
all	O
Java	B-Language
Speech	I-Language
API	I-Language
applications	O
.	O
</s>
<s>
It	O
provides	O
static	O
methods	O
to	O
enable	O
access	O
to	O
speech	B-Application
synthesis	I-Application
and	O
speech	B-Application
recognition	I-Application
engines	O
.	O
</s>
<s>
The	O
Engine	O
interface	O
is	O
subclassed	O
by	O
the	O
Synthesizer	O
and	O
Recognizer	O
interfaces	O
,	O
which	O
define	O
additional	O
speech	B-Application
synthesis	I-Application
and	O
speech	B-Application
recognition	I-Application
functionality	O
.	O
</s>
<s>
The	O
Synthesizer	O
interface	O
encapsulates	O
a	O
Java	O
Speech	O
API-compliant	O
speech	B-Application
synthesis	I-Application
engine	O
's	O
operations	O
for	O
speech	O
applications	O
.	O
</s>
<s>
The	O
Java	B-Language
Speech	I-Language
API	I-Language
is	O
based	O
on	O
event	O
handling	O
.	O
</s>
<s>
The	O
Java	B-Language
Speech	I-Language
API	I-Language
was	O
written	O
before	O
the	O
Java	B-Language
Community	I-Language
Process	I-Language
(	O
JCP	O
)	O
and	O
targeted	O
the	O
Java	B-Language
Platform	I-Language
,	I-Language
Standard	I-Language
Edition	I-Language
(	O
Java	B-Language
SE	I-Language
)	O
.	O
</s>
<s>
Subsequently	O
,	O
the	O
Java	B-Language
Speech	I-Language
API	I-Language
2	O
(	O
JSAPI2	O
)	O
was	O
created	O
as	O
under	O
the	O
JCP	O
.	O
</s>
<s>
This	O
API	B-Application
targets	O
the	O
Java	B-Language
Platform	I-Language
,	I-Language
Micro	I-Language
Edition	I-Language
(	O
Java	B-Language
ME	I-Language
)	O
,	O
but	O
also	O
complies	O
with	O
Java	B-Language
SE	I-Language
.	O
</s>
