espressif / esp-tflite-micro

TensorFlow Lite Micro for Espressif Chipsets
Apache License 2.0
395 stars 85 forks source link

Suggestion for improvement: To setup up DMA for stream audio from microphone to dedicated buffer rather than using task #58

Closed misterb0407 closed 1 year ago

misterb0407 commented 1 year ago

This is not an issue, rather, just thinking out loud of ways to improve the speed and accuracy of the audio detection in micro_speech example.

So as I analyze the code, it uses a task with function entry CaptureSamples() to keep polling the data from I2S that is the interface to microphone. This consumes CPU resources, so depending on the dynamic of the whole system contributed by different task priorities, it may impact the acquired audio data quality.

I am thinking, would it be better if we just setup a DMA for the stream data from I2S goes to a dedicated buffer in RAM?