Bit rate and sample rate #611
-
Hi, Very inspiring project. I built a birdNET-pi based on raspberry 3B+, simple usb sound card and primo EM172 mono mic. It worked out of the box. Now I am wondering, what is the bit rate and sample rate of the recorder, and is there a way to adjust them? I could not find an answer to this question in any of the discussions. kind regards, Gerwin |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, @Gerwin12 -- thanks for your kind words about the project and a special thank you for your attempt to find this answer within the discussions. I don't mention anything about the sample-rate within the documentation simply as an oversight, since this is a fork of the BirdNET-Lite repo, where that information is available. I forget, sometimes, that a lot of folks find BirdNET-Pi without ever reaching the BirdNET-Lite github README.md page. The answer to your question is that the BirdNET-Lite classification model expects (requires) the recording sample rate to be 48kHz. If it is less than that, the model will pad the extra frequency range with noise and will process the audio -- if higher than that sample rate, the audio is down-sampled and whatever was out of range is truncated. For that reason, there are not options for adjusting the sample-rate, as those are set to 48kHz within the recording script. As far as bitdepth is concerned, the WAVE encoding uses 16-bit Little Endian and is also not adjustable as a setting, though you are welcome to change it in the script For the live audio stream's bitrate, the audio is encoded there (not sent through analysis) as MP3 and streamed with a 320k bitrate -- the bitrate can be lowered in the script for the service ( I hope that information is helpful and please accept my best regards~~ |
Beta Was this translation helpful? Give feedback.
Hi, @Gerwin12 -- thanks for your kind words about the project and a special thank you for your attempt to find this answer within the discussions. I don't mention anything about the sample-rate within the documentation simply as an oversight, since this is a fork of the BirdNET-Lite repo, where that information is available. I forget, sometimes, that a lot of folks find BirdNET-Pi without ever reaching the BirdNET-Lite github README.md page.
The answer to your question is that the BirdNET-Lite classification model expects (requires) the recording sample rate to be 48kHz. If it is less than that, the model will pad the extra frequency range with noise and will process the audio -- if highe…