javax.speech

speech recognition in java

[亡魂溺海] 提交于 2019-12-05 04:51:32
问题 I want to use speech recognition in my project and I found this code but when I run it I get an error which is: run: java.lang.NullPointerException at newpackage.HelloWorld.main(HelloWorld.java:55) Please could one of you help me in this problem? This is the server code that I use: package newpackage; import java.util.logging.Level; import java.util.logging.Logger; import javax.speech.*; import javax.speech.recognition.*; import java.io.FileReader; import java.util.Locale; public class

speech recognition in java

情到浓时终转凉″ 提交于 2019-12-03 20:25:50
I want to use speech recognition in my project and I found this code but when I run it I get an error which is: run: java.lang.NullPointerException at newpackage.HelloWorld.main(HelloWorld.java:55) Please could one of you help me in this problem? This is the server code that I use: package newpackage; import java.util.logging.Level; import java.util.logging.Logger; import javax.speech.*; import javax.speech.recognition.*; import java.io.FileReader; import java.util.Locale; public class HelloWorld extends ResultAdapter { static Recognizer rec; // Receives RESULT_ACCEPTED event: print it, clean