Can anyone show me how to use a CustomStream object for inputting audio
directly to the SAPI 5.1 speech engine? The help docs all say it can be done,
but the only examples they give are for wav files! I have tried using the
MemoryStream class, the CustomStream class, the SpMMAudioIn class, and the
base Stream class, but I get different errors each time. Here's what I'm
trying to do:
1. receive raw audio from a network/internet stream (done)
2. Test the packets to be sure they have viable audio content (done)
3. write the audio bytes to the AudioInputStream property of the Recognizer
object (?????)
4. Raise events when the spoken word as are recognized (done)
The test above works perfectly when the incoming audio is first written as a
RIFF/wav file and then fed to the speech engine. THIS IS CLEARLY A BAD WAY TO
INPUT THE SPEECH:-)
Can anyone help me?
--
Jon L. Arking, SCJP, MCSD
|