MrBuddyCasino / ESP32_Alexa

An Alexa Smart Speaker project for the ESP32.
Mozilla Public License 2.0
265 stars 72 forks source link

Upload 10ms 320 bytes per chunk to AVS #10

Closed hchaudhary1 closed 6 years ago

hchaudhary1 commented 6 years ago

Per the AVS documentation, it is recommend to upload 10ms aka 320 bytes per chunk while uploading audio.

reviewing the code, it seems that this is not observed: https://github.com/MrBuddyCasino/ESP32_Alexa/blob/master/components/alexa/alexa_speech_recognizer.c#L115

MrBuddyCasino commented 6 years ago

Yes I know, this is to decrease latency. But using 320 bytes creates an awful lot of overhead per packet and leads to throughput issues on the ESP32, so by trial and error I arrived at the current values.

hchaudhary1 commented 6 years ago

got it. it looks like, you are transmitting as many samples as possible. I suppose it makes sense to let AVS buffer the data rather than an extremely constrained device like an ESP32