Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Any ADPCM / Opus example available?

Hi, guys! I noticed this answer from the devzone.

I have nRF52 DK and an nRF Thingy. I want to play a short speech using I2S with MAX98357A.

This speech is usually has a length of 5~20 seconds.

This doesn't need to be played in strict real time. I'm worried while playing the speech can disconnect the BLE/Mesh connection.

I'm trying to insert this speech file, which is an MP3 file, into the nRF52's flash memory using SEGGER ES 3.

My questions are,

0) Are there C codes for ADPCM/Opus are included in the nRF5 SDKs?

1) Are there any examples that use I2S and ADPCM/Opus?

2) I don't know much about ADPCM/Opus. Can they play MP3 files? Or do I have to use different types of file format like WAV?

I have 200 speech files which are stored in an SD card.

But if this supports other files like MP3 which can decrease the file size, I'm planning to use nRF52840 and QSPI to read it from external flash memory.

-Thanks!

Parents
  • Hi ,

    You have gotten excellent answers from , so there is not much to add. I did not fully understand what you would like a comment on from Nordic, but what I can say is that we have some reference designs using both ADPCM and OPUS, which you can refer to. The nRFready Smart Remote 3 for nRF52 Series support both, and the Thingy:52 firmware use ADPCM. In both cases it is used to compress microphone data.

    Please let me know if you have more specific questions you want me to comment on.

  • Hello, Einar. I want to see an OPUS example which uses I2S and the nRF52840 DK.

    I’m currently using Keil MDK 5 and SEGGER ES 3. Can I get an example C code of this?

    The Smart Remote 3 firmware (nRF6939-FW) has multiple TGZ files and I cannot find anything related to OPUS.

    As a result, I wish to get an example C code which uses OPUS with I2S.

    It will be great if that example can be compiled using Keil or SEGGER ES.

    Will this be available?

    -Thanks!

  • Hi,

    The Smart Remote reference design has most of what you ask for: A example which use Opus and I2S microphones. It is for the nRF52832, but it is equally valid for the nRF52840. Unfortunately we do not have any example in the SDK itself, nor an example which is intended for the nRF52840 DK, but you should be able to use the Smart Remote implementation as a reference.

    You can see the documentation for the SR3 her. The firmware implementation is available here (just download the zip, unzip it and run the installer on a windows computer. To look at the audio implementation you can start in the m_audio.c file and see how the audio input system is implemented, using I2S and Opus (optionally). Unfortunately it is quite complex as it is part of a full smart remote control reference design, but it is the only such example we provide.

  • Hello, Einar.

    The firmware implementation is available here (just download the zip, unzip it and run the installer on a windows computer.

    Are you mentioning about the "nRF6939-FW"? I'm using a MacBook (OS version 10.14.3) and a Windows 10 laptop, by the way.

    I was expecting typical SEGGER ES projects or Keil Projects and C source files, I noticed 2 files; binaries & sources.

    To look at the audio implementation you can start in the m_audio.c file and see how the audio input system is implemented, using I2S and Opus (optionally).

    Then, do I need to type, from the amd64 directory,

    $ sudo dpkg -i *.deb

    on my MacBook to see the "m_audio.c" file?

    How can I install this on Windows 10, then?

    -Thanks for your help

Reply
  • Hello, Einar.

    The firmware implementation is available here (just download the zip, unzip it and run the installer on a windows computer.

    Are you mentioning about the "nRF6939-FW"? I'm using a MacBook (OS version 10.14.3) and a Windows 10 laptop, by the way.

    I was expecting typical SEGGER ES projects or Keil Projects and C source files, I noticed 2 files; binaries & sources.

    To look at the audio implementation you can start in the m_audio.c file and see how the audio input system is implemented, using I2S and Opus (optionally).

    Then, do I need to type, from the amd64 directory,

    $ sudo dpkg -i *.deb

    on my MacBook to see the "m_audio.c" file?

    How can I install this on Windows 10, then?

    -Thanks for your help

Children
  • Hi,

    You need to download the "Desktop Software" file. Then extract it on a windows computer, and run the installer (nRFready Smart Remote 3 nRF52 v121alpha.exe). Then you will get the firmware installed under C:\Nordic Semiconductor\nRFready Smart Remote 3 nRF52 v1.2.1alpha unless you select a different location. You can always copy that folder and move the source code to the mac of another machine without running the installer again.

    You will find the Smart remote projects under nRF5x SDK-SR3\examples\ble_peripheral\smart_remote_3_nrf52\Projects\. Note that there is no SES project, but there are projects for keil. In any case this is the full SR3 reference design, so you will probably want to use it for inspiration and extract what you need rather than using the provided projects. Unfortunately, that is up to you, as we do not provide any other examples.

  • Thanks, Einar. Before closing this thread, may I add 2 questions, please?

    I just installed the EXE file you've mentioned.

    1. Error Message 

    63519-SR3_nRF52832_Shield.axf: error: L6050U
    has appeared.I never saw something like this; can you help me to solve this, please?

    2. Is this Firmware example use the same nRF52 SDK 15.2 as well or it is a different SDK?

    -Thanks!

  • 1. The linker is complaining that the binary is too large for your Keil license. The SR3 firmware is quite large, so there is no way it can be built with the free Keil license (32 kB limitation).

    2. The SR3 firmware use a modified SDK, so there are some differences. The latest is based on SDK 14.2.

Related