I'm trying to get an audiostream (from any source file/other stream/...) into the microsoft speech recognition engine.
So far I've got:
ffmpeg.exe -rtsp_transport tcp -i rtsp://%_return1%/audio -acodec pcm_u16le -f rtp rtp://localhost:2222
Then I have inside my code:
SpeechRecognitionEngine _engine = new SpeechRecognitionEngine(CultureInfo.CurrentCulture);
this._engine.SetInputToAudioStream(this._rtpClient.AudioStream, new SpeechAudioFormatInfo(16000, AudioBitsPerSample.Sixteen, AudioChannel.Mono));
Then I have the events registered:
this._engine.SpeechRecognized += this.SpeechRegocnized;
this._engine.SpeechDetected += this.EngineOnSpeechDetected;
I'm not sure about the codec settings... I've tried other codecs but doesn't work.