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
  • Hello Mark,
    We are running Opus codec on nRF52840 and it works well, both on encoding and de-coding. We have developed a proprietary protocol based on ESB. There is quite a bit of work required on your side, but the good news is that it's possible. Nordic is talking about the off-the-shelf LE Audio solution on nRF5340, and if this doesn't work for you your original idea should be possible. Good luck.

  • Eggz,

    Can you tell me about the sampling rate you're using? I want to know if allowing higher rates than those available in the SR3 demo is just a matter of changing the ifdefs to not return an error (ignoring RAM/CPU limitations for now), rather than it being some inherent limitation in the codec library itself.

  • 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.

Reply
  • 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.

Children
No Data
Related