Dual Core Audio Framework for ESP32
Posted: Sun Mar 04, 2018 5:01 pm
It may be my poor search skills but I couldn't find a dual core audio
framework (analog in/out) for the ESP32. So I wrote one.
I only needed voice range (8Ksps) but the loading is only about 13%
on the sample service processor and the sample rate could be increased.
In fact, had I known that, I could have sampled at 16Ksps and eliminated
the anti-aliasing filter I built into the mic circuit.
________________________________
Proof Of Concept Demos:
Dual core concurrent multi-task processing of continuous real-time audio
on the ESP-32.
Tested on Espressif ESP32 Dev board
Rev. 1 silicon
Arduino IDE with the ESP32 core from espressif
ADC/DAC sample processing at 8Ksps for voice audio range (< 4KHz).
Not suitable for music as is.
Core 1 -- Sample Service
Core 0 -- Application Processor
Cores use alternating ping-pong buffers to pass samples between them every
N samples. Tasks synchronize on a "FrameAvailable" semaphore. Frame processing
runs every N samples on the Application Processor. The Frame processing technique
introduces latency delay (audio input to output).
Concurrency examples include:
* Continuous sine wave
* Dual tone (frequencies re-create old telephone dial tone)
* Continuous phase frequency sweep test signal (300--3000 Hz in 5 sec.,repeated)
* Microphone talk-through
github:
https://github.com/bobh/ESP32AudioFramework
bobolink
twitter: @wm6h
framework (analog in/out) for the ESP32. So I wrote one.
I only needed voice range (8Ksps) but the loading is only about 13%
on the sample service processor and the sample rate could be increased.
In fact, had I known that, I could have sampled at 16Ksps and eliminated
the anti-aliasing filter I built into the mic circuit.
________________________________
Proof Of Concept Demos:
Dual core concurrent multi-task processing of continuous real-time audio
on the ESP-32.
Tested on Espressif ESP32 Dev board
Rev. 1 silicon
Arduino IDE with the ESP32 core from espressif
ADC/DAC sample processing at 8Ksps for voice audio range (< 4KHz).
Not suitable for music as is.
Core 1 -- Sample Service
Core 0 -- Application Processor
Cores use alternating ping-pong buffers to pass samples between them every
N samples. Tasks synchronize on a "FrameAvailable" semaphore. Frame processing
runs every N samples on the Application Processor. The Frame processing technique
introduces latency delay (audio input to output).
Concurrency examples include:
* Continuous sine wave
* Dual tone (frequencies re-create old telephone dial tone)
* Continuous phase frequency sweep test signal (300--3000 Hz in 5 sec.,repeated)
* Microphone talk-through
github:
https://github.com/bobh/ESP32AudioFramework
bobolink
twitter: @wm6h