Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why haven’t you used TensorFlow lite to use your RNNoise model in Android ? Why have you ported into C #185

Open
Khubaib96 opened this issue May 24, 2021 · 1 comment

Comments

@Khubaib96
Copy link

Hello Mr. Valin,

Hope you are enjoying the healthy days of your life. I came across RNNoise for noise suppression. I have a query related to your model.
• Why haven’t you used TensorFlow lite to use your RNNoise model in Android?
• Why have you ported into C?

My basic understanding is that TensorFlow doesn’t support real-time audio-related models with long-term running and efficiency which we can attain from porting model to C.
I need your help in clarification of this issue.

@ziemek99
Copy link

ziemek99 commented Jul 4, 2021

I'm not Jean-Marc, but I can already answer the second question: you're right, it's for performance reasons.

All the design and training of the neural network is done in Python using the awesome Keras deep learning library. Since Python is usually not the language of choice for real-time systems, we have to implement the run-time code in C. Fortunately, running a neural network is by far easier than training one, so all we had to do was implement feed-forward and GRU layers. To make it easier to fit the weights in a reasonable footprint, we constrain the magnitude of the weights to +/- 0.5 during training, which makes it easy to store them using 8-bit values. The resulting model fits in just 85 kB (instead of the 340 kB required to store the weights as 32-bit floats).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants