cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure AcousticBF library for PCM mode?

PIvan.9
Associate II

Are here any example projects on how AcousticBF library should be configured exactly for PCM mode? There are plenty of examples for PDM mode configuration, but none for PCM, which is frustrating, since the documentation on this library is not very explicit.

When I'm trying to configure it, AcousticBF_FirstStep function fills only 1/3 of the output buffer, so the output sound is very distorted. Any help is appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @PIvan.9​ ,

as explained in the User manual Getting started with AcousticBF real-time beam forming middleware,

"The library takes two PDM or PCM input streams from the respective MEMS microphones and is able to output up to two PCM channels (16 kHz, 16 bits per sample) representing the algorithm output (first channel) and the unprocessed output from one of the two omnidirectional microphones (second channel). The latter may be used as a reference for test and evaluation purposes".

Audio data has to be acquired in PCM format at 16 kHz (in this case, in the current version, microphone distance must be equal to 21 mm). You need an application processor such as the STM32 microcontroller with Floating Point Unit (FPU).

So it should be enough to configure the MCU inputs for the PCM acquisition at 16kHz, and feed the Beamforming library in that way.

-Eleon

View solution in original post

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi @PIvan.9​ ,

as explained in the User manual Getting started with AcousticBF real-time beam forming middleware,

"The library takes two PDM or PCM input streams from the respective MEMS microphones and is able to output up to two PCM channels (16 kHz, 16 bits per sample) representing the algorithm output (first channel) and the unprocessed output from one of the two omnidirectional microphones (second channel). The latter may be used as a reference for test and evaluation purposes".

Audio data has to be acquired in PCM format at 16 kHz (in this case, in the current version, microphone distance must be equal to 21 mm). You need an application processor such as the STM32 microcontroller with Floating Point Unit (FPU).

So it should be enough to configure the MCU inputs for the PCM acquisition at 16kHz, and feed the Beamforming library in that way.

-Eleon

PIvan.9
Associate II

Ok, then it looks like this issue is caused because I've configure the PCM sampling frequency for 48kHz. Thanks for help.