nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs

OPUS encoder sampling rate upper limits

Hello,

I recently started looking through the Smart Remote 3 code as I'm interested in potentially using a suitable nRF device + I2S ADC to encode and stream music using OPUS/CELT. Since I'm new to nRF products, there's a lot to digest here. Looking at sr3_config_nrf52832_custom.h, max sample rate is listed as 32kHz, and in drv_audio_codec_opus.c, the highest frequency is 24kHz.

What is the reason for these limits in the code? Is it RAM and/or CPU limitations? Is 48kHz sampling rate a possibility?

Thanks,

Mark

Parents Reply Children
  • Mark,

    We're using 16kHz sample rate in our application, so I'm afraid I'm not able to tell you if you're able to go beyond 32kHz. We have been focusing on minimizing system latency, and it works really well. Opus does a good job in terms of sound quality and we use 5ms frame size. Nordic team should be able to answer your sample rate question since they have experience with it from the SR3 demo. Opus codec can naturally support 48kHz, so this not the problem. My guess is that the only limitation limitation would be related to RAM/CPU as you suggest, but we haven't checked.

  • The smart remote 3 was designed to transfer audio commands, not music, so the quality just needed to be good enough for the purpose and of course a trade-off between throughput/latency/power consumpton. I am not aware of any reason using better quality should not work (given you don't care about latency), but it's 3 years since it was launched, so I don't expect the developers have all the details anymore, I suggest if you want to change anyhthing you try it out and work through the issues you may see, it might also be that RAM/CPU will be the bottleneck.

    Kenneth

Related