vkataev - 2005-12-19

How to save an audio stream, retrieved from the microphone into a file in the same time with recognition ?

Firstly, I thought that it can be smth. like calling Linux "rec" command from my java app, but microphone sound device is blocked by Sphinx4.

I need smth. like:<pre>
wav = microphone.audioLine();
wav.start()

resultText = '';
while(resultText != 'finish'){
resultText = '';
result = recognizer.recognize();
if result != None{
resultText = result.getBestFinalResultNoFiller();
}
}</pre>

wav.save("example.wav");

Is there any way to get audio data in the same time with recognition process ?