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
RNNoise #3427
RNNoise #3427
Conversation
So about the linker problems: librnnoise apparently uses a few functions copied (?) from opus. Building a static library causes these to conflict. Building a shared library works, but requires the user/packager to install librnnoise.so.0 to /usr/lib (the mumble subfolder doesn't work for some reason?? I have no idea how any of this works) . This is clearly awful, if you have any ideas please help (ffs it can't be this hard just to hide a few symbols). |
The CELT library is built as shared, in order not to conflict with Opus. mumble/3rdparty/celt-0.11.0-build/celt-0.11.0-build.pro Lines 23 to 26 in 6195761
mumble/3rdparty/celt-0.7.0-build/celt-0.7.0-build.pro Lines 25 to 33 in 6195761
In the Debian package, it's located in |
Ah I worked it out. The glue code in CELTCodec.cpp manually loads the library from Not sure what to do here. This patch is tiny, adding custom library loading for rnnoise would probably more than double the code. Dropping a The only missing piece then is Windows. Thus the AppVeyor build fails. The travis build is mostly green, except for, again, the Windows build. Can you help me with that? Is there any way I can get a working Windows build without a Windows development environment? |
|
||
win32 { | ||
DEFINES += WIN32 _WIN32 | ||
INCLUDEPATH += ../$$BUILDDIR/win32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config.h
is in $$BUILDDIR
, not in $$BUILDDIR/win32
.
Remove this line.
DEFINES += FLOAT_APPROX | ||
} | ||
|
||
INCLUDEPATH += ../$$BUILDDIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this out of the unix
block, so that the path is included for Windows too.
Since RNNoise is not released yet, what do you think about building it as static library and Opus as shared library instead?
See my comments above. |
I just copy-pasted the build structure from some other submodule (opus I think). I thought perhaps windows needs a different
Makes sense to me. Honestly at this point I think it would be best if you make the necessary changes to this patch yourself (you have push access) as most of what I would do is just guesswork - I'm not familiar enough with the build system to make these changes. All I can say is that RNNoise works amazingly well in Mumble, it almost perfectly removes common annoyances with voice activation like typing and breathing noises. The only downside is slightly reduced quality but this is a price I would think many are willing to pay (me and all of my friends that tested this included). |
Yes, but you didn't put a
No problem, thank you very much for your contribution! I'm sure RNNoise will be much appreciated, especially on Linux, where echo cancellation is not supported. |
src/mumble/AudioInput.cpp
Outdated
@@ -23,6 +23,10 @@ | |||
#include "opus.h" | |||
#endif | |||
|
|||
#ifdef USE_RNNOISE | |||
#include "rnnoise.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi the linker error is caused by the missing extern "C"
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thank you.
b1b00cf
to
031fcba
Compare
d4e23cb
to
5d4872b
Compare
Updating 'mumble_en.ts'... Found 1709 source text(s) (3 new and 1706 already existing)
Thank you again for your contribution! |
RNNoise is machine learning based noise suppression. It is used in WebRTC (chromium and firefox afaik).
It compiles, runs and works (on my machine). I'm not sure if I integrated the build system correctly though. I'm building a shared library because rnnoise has symbol clashes with opus. I also didn't work with windows at all.