开发者

how 2 use logmath twice in same form(sphinx4)

i have configured sphinx with netbeans and its wroking fine. but im using a button to do the process. but after it recognisers. i want to do the process again. but then it gives a error saying the "logmath instance is already present" and saying cannot open the microphone.

can someone give me a solution. what i want to do is use speech recogntion in several times in the same form. till it gives the correct answer.

please he开发者_运维知识库lp me

this is the error i get

"Creating new instance of LogMath while another instance is already present 10:53:27.833 SEVERE microphone Can't open microphone line with format PCM_SIGNED 16000.0 Hz, 16 bit, mono, 2 bytes/frame, big-endian not supported."


you are using the Recognizer again and again each time you done the speech recognition.


make sure to " //Get the spoken text Result result = recognizer.recognize(); "

call this above result only one time. if you call again and again in the same event. it will give a error. so make it public to call only once and do the process. then it should work

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜