cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-AUDIO-KIT Audio Latency

zachwilliams
Associate

Hey all,

I was just reading out the new release of the X-CUBE-Audio-Kit and it says:

Configurable latency mode and audio buffer sizes adjustable down to fractions of milliseconds

Does anyone know the lowest latency that can be achieved?

I'm looking to possibly replace a codec that is doing my DSP - need to be able to do a a 5 to 8 band EQ, compression and volume control as well as mixing 2 stereo signals, but need it to be less than 0.5ms.

Is that achievable with what the X-CUBE-Audio-Kit provides? Are there any low latency examples?

1 ACCEPTED SOLUTION

Accepted Solutions
MichelM
ST Employee

The latency of the dataflow is made of the audio framework and the filter you mention in your dataflow.

Regarding the EQ and compressor algorithms, we suggest you to use a FIR-graphic-equalizer and/or mdrc audio-kit algorithms if possible in your use case.
The FIR-graphic-equalizer is an equalizer in which you can choose the number of bands, note that default setting for firType is "linear phase" which adds a firSize/2 samples latency but which has the best behavior in terms of signal quality (for music experts); if your main concern is latency, choose "minimal phase" for firType, it has also good quality performance at the expense of a variable latency (very low, comparable to IIR filtering) depending on signal frequency.
mdrc is a Multi-band Dynamic Range Compressor, it is a 1 to 5 bands Dynamic Range Compressor, when there is more than 1 band, bands separation is made through IIR filtering thus with very low latency and each band may have its own compression curve; maybe it can comply to your requirement alone (without additional equalizer) since you can apply a different compression curve and gain for each band.

Regarding the audio framework,
on STM32N6 we could get very low latency (it works fine up to 0.125 ms), with a computation power extracost. I don’t have the measures on STM32H5 yet, 0.5 or 0.25 ms is probably around the limit on that one.
If you want to experiment with your dataflow, you will find more info in audio-kit reference manual, chapter "How to reduce latency".

View solution in original post

2 REPLIES 2
MichelM
ST Employee

The latency of the dataflow is made of the audio framework and the filter you mention in your dataflow.

Regarding the EQ and compressor algorithms, we suggest you to use a FIR-graphic-equalizer and/or mdrc audio-kit algorithms if possible in your use case.
The FIR-graphic-equalizer is an equalizer in which you can choose the number of bands, note that default setting for firType is "linear phase" which adds a firSize/2 samples latency but which has the best behavior in terms of signal quality (for music experts); if your main concern is latency, choose "minimal phase" for firType, it has also good quality performance at the expense of a variable latency (very low, comparable to IIR filtering) depending on signal frequency.
mdrc is a Multi-band Dynamic Range Compressor, it is a 1 to 5 bands Dynamic Range Compressor, when there is more than 1 band, bands separation is made through IIR filtering thus with very low latency and each band may have its own compression curve; maybe it can comply to your requirement alone (without additional equalizer) since you can apply a different compression curve and gain for each band.

Regarding the audio framework,
on STM32N6 we could get very low latency (it works fine up to 0.125 ms), with a computation power extracost. I don’t have the measures on STM32H5 yet, 0.5 or 0.25 ms is probably around the limit on that one.
If you want to experiment with your dataflow, you will find more info in audio-kit reference manual, chapter "How to reduce latency".

zachwilliams
Associate

Great - thanks for the info @MichelM!