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

How to complete a recognize loop #37

Closed LGinC closed 6 years ago

LGinC commented 6 years ago

I use the Kinect v2 as microphone input device, and I want to use audio stream to complete auto recognition, like the Kinect SDK v2 Sample “Speech Basics”, I just speech without start Button.

wolfma61 commented 6 years ago

what is the problem you are seeing? Does Kinect generate the correct audio format?

from the docs: PCM audio must be sampled at 16 kHz with 16 bits per sample and one channel (riff-16khz-16bit-mono-pcm). The Microsoft Speech Service does not support stereo audio streams and will reject audio streams that do not use the specified bit rate, sample rate or number of channels.

LGinC commented 6 years ago

the Kinect v2 audio format is sampled 16KHz, 32bit depth and one channel, I have converted to 16bit depth, actually, it's work, but when I hadn't speech a while, I want to continue speech but it didn't work, there's any response

zhouwangzw commented 6 years ago

The connection will get closed after some period of inactivity. You need to set up the connection again to start a new recognition.