Clase no encontrada, ¿por qué?

I am trying to import javax.speech.recognition.Result; in my code. But i am getting class not found error.

On checking with javap; as follows:-

C:\Documents and Settings\ankit.g>javap javax.speech.recognition.Result
Error:  class not found: javax.speech.recognition.Result

I am using java 7, please find the following output:-

C:\Documents and Settings\ankit.g>java -version
  java version "1.7.0_05"
  Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
  Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing)

Please help, I am trying to work on speech recognition.

Muchas Gracias


after installing jsapi.sh file the screenshot of the dir is as follows:- enter image description here

are all the jar files needs to be included; any easy tutorial or steps would help me a lot.

preguntado el 28 de agosto de 12 a las 14:08

You need to include a speech recognition library. AFAIK Its not built in. Try searching for a library which implements the standard API which suits your needs. -

3 Respuestas

Tu clase

javax.speech.recognition.Result.class

is not available on the classpath. You might have misplaced you speech recognition jar (java library containing speech recognition specific classes) containing this class. Check out on that.

Respondido 28 ago 12, 14:08

Try the 'FreeTTS' implementation and get the JSAPI implementation from within the package. I don't remember that JSAPI was provided with the regular JDK, but I could be wrong.

http://freetts.sourceforge.net/docs/index.php

The src zip file contains the JSAPI.sh and JSAPI.exe script with a readme on how to make it available.

Respondido 28 ago 12, 14:08

i HAVE installed freetts, but still I am not able to import the classes. Please help - Ankit

When you get the FreeTTS SRC.zip, there's a LIB folder in it. In there, you will find a JSAPI.exe file or a JSAPI.sh script that you need to run. It will unpack the file 'jsapi.jar'. You then only need to use this jar file and reference it from your ant, eclipse, maven or whatever else you might be using. - user1054394

thanks, i ran the file and some files might have populated in the directory. I am not sure how do i import the files to eclipse. Any help, please? - Ankit

Here is a Hello World type speech recognition sample program with commentary.

Aquí está la wikipedia article on the Java Speech API with a link to an open source speech synthesis package FreeTTS.

Aquí hay una stackoverflow question on Java speech recognition packages for Android. There are other stackoverflow questions and answers available as well.

contestado el 23 de mayo de 17 a las 13:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.