Azure-Samples / Cognitive-Speech-STT-Windows

Windows SDK for the Microsoft Speech-to-Text API, part of Cognitive Services
https://www.microsoft.com/cognitive-services/en-us/speech-api
Other
112 stars 89 forks source link

DataRecognitionClient No phrase response is available #11

Closed 0rupp closed 7 years ago

0rupp commented 8 years ago

I try to use the DataRecognitionClient to send audio data for speech to text regocnition. The MicrophoneClient is working fine, however using the DataRecognitionClient does not yield any results at all. I tried using my own wave file (mono, 16bit, 16kHz) and the two sample .wav files (batman and whatstheweatherlike) provided in this repo, using both, ShortPhrase and LongDictation mode.

I use the SpeechRecognitionServiceFactory to create the client instances and connect the OnResponseReceived and OnConversationError events. I noticed that using my own .wav file which has some initial silence, results in OnResponseReceived being called, before EndAudio() is called. However, the RecognitionStatus is not "InitialSilenceTimeout" but always "None".

Using the sample wav files OnResponseReceived is being called after EndAudio, but still the result remains RecognitionStatus "None" and e.PhraseResponse.Results.Length equals zero. OnConversationError is never called, with the exception, when I provide a false key when initializing the client.

Could you direct me where I'm going wrong or fix this issue, please?

0rupp commented 8 years ago

I got it working now: I put en-EN as language instead of en-US. However putting en-asdf does not result in an error, which should be fixed.