0

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 help 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."

mzjn
  • 48,958
  • 13
  • 128
  • 248
Nubkadiya
  • 3,285
  • 13
  • 40
  • 45

2 Answers2

0

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

Nubkadiya
  • 3,285
  • 13
  • 40
  • 45
0

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

Nubkadiya
  • 3,285
  • 13
  • 40
  • 45