The following code always throws an exception on SetInputToAudioStream, because 'SpStreamWrapper' invokes the length property on the 'SpeechRecognitionStream' class.. which throws a otSupportedException. All the samples follow the below pattern, is this an issue with UCMA 4.0?
Any thoughts? <below is example code>
Choices c = new Choices(new String[] { "later", "bye", "good-bye", "see ya", "chow" }); Grammar g = new Grammar(new GrammarBuilder(c)); SpeechRecognitionConnector rc = new SpeechRecognitionConnector(); rc.AttachFlow(call.Flow); SpeechRecognitionStream s = rc.Start(); SpeechRecognitionEngine re = new SpeechRecognitionEngine(); re.LoadGrammar(g); SpeechAudioFormatInfo safi = new SpeechAudioFormatInfo(16000, AudioBitsPerSample.Sixteen, System.Speech.AudioFormat.AudioChannel.Mono); re.SetInputToAudioStream(s, safi);
Cheers,
Trebor