RovioWrap help

Jan 24, 2009 at 12:57 AM

Currently I'm attempting to hook up the RTSP microphone audio directly to the Microsoft Speech Recognition objects.  I'm nearly there, I have the RTSP data streaming in, but I am hitting a roadblock with exceptions being thrown deep within the Speech Recognition system when I use SetInputToAudioStream.  Any ideas or tips would be appreciated.




'From RTSP audio stream (DOESN'T WORK FOR ALAW?)
ms1 = New System.IO.MemoryStream


saf1 =

New System.Speech.AudioFormat.SpeechAudioFormatInfo( _
                        Speech.AudioFormat.EncodingFormat.ALaw, 8000, Speech.AudioFormat.AudioBitsPerSample.Eight, _
                        Speech.AudioFormat.AudioChannel.Mono, 8000, 1,


SR.SetInputToAudioStream(ms1, saf1)

Jan 26, 2009 at 8:17 PM
I have now implemented a workaround to this.  I capture 2 seconds of microphone data from the RTSP stream and then dump it into a properly formatted WAV file, which I then use Speech Recognition to do SR.SetInputToWavFile .  This, of course, means that I will have only 2 seconds of data to recognize at a time and if the word or phrase is split in between two 2 second samples, I will not get the proper recognition.

I tried also to "stream" that same WAV data into SR.SetInputToWavStream and it keeps giving me back an exception about improperly formatted WAV file, which seems ridiculous because that is the same WAV data that I am writing to the file for my workaround!

Anyone have any ideas, let me know!