• Audio
  • Audio sample rate for Bela and NN

Hi everyone,

I am new to using Neural Network with Bela. I have downloaded a set of audio clips with sr = 16000Hz, and I am now pre-processing the data. I want to use tensorflow to perform NN, and convert to tflite then use on Bela for real time speech enhancement. I am aware that Bela only has two sr to choose from in the setting tab (screenshot below) , what should I do in the pre-processing step? should I keep sr = 16000Hz and use librosa.resample(audio, orig_sr=16000, target_sr=44100) (or similar ) just before converting to tflite ? ( at this stage I will have done all the pre-processing and tranings); or can I keep sr = 16000Hz and it will still work fine on Bela ?

thank you very much!

that sampling rate only affects the sampling rate (and channel count) of the analog inputs, not the audio inputs.

The - unsupported - way of changing sampling rate for the audio - which applies across all projects - is to replace the hardcoded value of 44100 in /root/Bela/core/I2c_Codec.cpp. Here's a way to do it without having to open the file for editing in a terminal:
https://forum.bela.io/d/4631-cpu-usage-and-management-with-pure-data-patches/8