I'm starting to learn about Red5 and java servlets.
I have some background in java but most of my web development is in .Net.
What I aim to do is use red5 to stream microphone input to a speech recognition engine, Sphinx4 in this case.
Sphinx4 recognizer uses a StreamDataSource to get an InputStream with audio features such as sample rate, bit rate, big endian format and so on.
From Red5, I can use packetReceived from IStreamListener to get the packet data. I think what I can do from there is to use writeExternal() from AudioData and forward that to the input stream I created.
Is this the right way to do it? And how do I change the audio format if I figure out I needed to?
Also I'm wondering how could I run the recognizer as a server thread (or multiple threads for multiple requests). How is that achievable with Red5 or tomcat in general?