noopkat / ms-bing-speech-service

NodeJS service wrapper for Microsoft Speech API and Custom Speech Service
MIT License
82 stars 17 forks source link

generate new request id on turn end #5

Closed noopkat closed 7 years ago

noopkat commented 7 years ago

If there are periods of silence in an active audio stream, the turn will end after speech.endDetected fires. We cannot initiate a turn start preemptively - that's for the service to decide for us. Therefore, on each turn.end, a new request id should be generated and made available for new audio packets to include when sending. This new request id will then initiate the next turn start for us.