RNNoise porting to Teensy

Status
Not open for further replies.

clockwork

New member
I searched the forum and could not find any references to the open source RNNoise library and was wondering if anyone has attempted to port it to a Teensy. RNNoise is a trainable, "light weight" neural network for noise reduction from the Xiph Foundation (maintainers of Vorbis, FLAC, Speex and Opus codecs) that runs well on a Rasberry Pi with a sampling rate of 48kHz. The demos on the project page are impressive and it uses floating point C code. My coding skills are not quite there yet to tackle porting this to a Teensy 3.6, but I'm curious what you think. The C code is released under a BSD license and the sampling rate should be adjustable to fit in with the Teensy Audio Library.

DD4WH has done a lot of great work already with the spectral noise reduction mode for the Convolution SDR project. If RNNoise can work on a Teensy it would be another useful code base for embedded noise reduction applications.
 
Last edited:
There is a lot of development motion right now in Tensorflow Lite for Microcontrollers with both Sparkfun and Adafruit releasing hardware targets for the framework.

I recently looked into this because I'd love to make physical eurorack versions of the Magenta Studio Tools. Unfortunately there does not seem to be support for even simple RNN operators, let along GRU, or LSTM needed for an algo like RNNoise, or PerformanceRNN

I am by no means qualified to say this, but if I had to make a guess, I'd say this is due to the memory constraints, after all, it's supposed to run on a microcontroller with kilobytes of RAM. That being said, your best bet will be to follow the development of this framework, as it seems makes good use of the available ARM intrinsics with the cmsis lib, something you'd have to do yourself if you were to try and port RNNoise.

Independent of the NN implementation, It'd be awesome to see the primitives necessary for a robust signal processing chain to easily extract a cepstrum like MFCC or the Bark(Opus?) scale coefficients for RNNoise integrated in the Audio library similar to the FFT* objects.
 
That might be cool - maybe on Pending T4. But even that doesn't have the resources of an rPi

For Audio on T_3.x's PJRC maintains a customized integer based library utilizing the best features of the ARM core instruction set to provide great general utility with least overhead. Not seen 'noise' come up as a general problem in watching.
 
You both nailed the memory issue...

It looks like ARM has released the CMSIS-NN Library which incorporates a lot of optimized NN code for ARM processors including Cortex-M. It appears CMSIS-NN code could be be incorporated into projects to help address excessive memory use:

Efficient NN kernels are key in enabling inference on Arm Cortex-M based CPUs. CMSIS-NN provides optimized functions to accelerate key NN layers, such as convolution, pooling and activations. In addition, CMSIS-NN also helps to reduce the memory footprint which is key for memory constrained microcontrollers.

The CMIS-NN library github page has lots of code available
 
Tensorflow Lite for Microcontrollers looks promising... they claim STM32F103 boards are supported. Even Teensy 3.2 has more RAM than these boards... I'll keep an eye on the framework development

it seems makes good use of the available ARM intrinsics with the cmsis lib, something you'd have to do yourself if you were to try and port RNNoise.

You already mentioned CMSIS-NN, my apologies... I read your post too fast
 
Last edited:
Status
Not open for further replies.
Back
Top