I'm trying to get SAPI 5.4 (also MS Speech Platform SDK v11) to perform continuous speech recognition on the audio coming in from a Skype call.
I can use the SKYPE4COMLib to grab the audio coming in from Skype and push it over a TCP port by issuing an ALTER CALL instruction. You can direct the Skype audio to file or TCP socket. File worked fine, but I want it to run recognition live so use the TCP socket.
I then built a TCP listener to gather up the incoming data (audio raw format) and pass the byte array as a MemoryStream to SAPI. I've setup SAPI to expect raw audio in the format of 16bit, 16khz, mono, PCM. However a recognition event never occurs?!
I've tried saving that raw audio to disk instead, and then reading that into SAPI and it works fine... so the data itself is fine and Skype is correctly sending on the audio. However this doesn't let me do the continuous recognition I need.
The SAPI recognition code works fine using a WAV file, or raw file loaded from disk, or microphone. I just can't get it to work from a MemoryStream.
I found this similar article, none of the suggestions there seem to work for me, and discussion seems to have gone quiet.
Streaming input to System.Speech.Recognition.SpeechRecognitionEngine
Does anyone have any guidance on how to successfully get SAPI to continuously recognise speech from raw audio sent as a MemoryStream in C#?