Skip to content

Commit

Permalink
Merge PR #6389: Backport "Merge PR #6364: FEAT(client): Add ReNameNoi…
Browse files Browse the repository at this point in the history
…se as a replacement for RNNoise" to 1.5.x
  • Loading branch information
Hartmnt authored Apr 10, 2024
2 parents ae3e59b + 2ef93a0 commit 9411968
Show file tree
Hide file tree
Showing 15 changed files with 67 additions and 272 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
[submodule "3rdparty/speexdsp"]
path = 3rdparty/speexdsp
url = https://github.com/xiph/speexdsp.git
[submodule "3rdparty/rnnoise-src"]
path = 3rdparty/rnnoise-src
url = https://github.com/mumble-voip/rnnoise.git
[submodule "3rdparty/FindPythonInterpreter"]
path = 3rdparty/FindPythonInterpreter
url = https://github.com/Krzmbrzl/FindPythonInterpreter.git
Expand All @@ -28,3 +25,6 @@
[submodule "3rdparty/cmake-compiler-flags"]
path = 3rdparty/cmake-compiler-flags
url = https://github.com/Krzmbrzl/cmake-compiler-flags.git
[submodule "3rdparty/renamenoise"]
path = 3rdparty/renamenoise
url = https://github.com/mumble-voip/ReNameNoise.git
1 change: 1 addition & 0 deletions 3rdparty/renamenoise
Submodule renamenoise added at 2a551a
57 changes: 0 additions & 57 deletions 3rdparty/rnnoise-build/CMakeLists.txt

This file was deleted.

122 changes: 0 additions & 122 deletions 3rdparty/rnnoise-build/config.h

This file was deleted.

1 change: 0 additions & 1 deletion 3rdparty/rnnoise-src
Submodule rnnoise-src deleted from a9afcc
16 changes: 8 additions & 8 deletions docs/dev/build-instructions/cmake_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ Use the bundled GSL version instead of looking for one on the system
Build the included version of nlohmann_json instead of looking for one on the system
(Default: ON)

### bundled-rnnoise
### bundled-renamenoise

Build the included version of RNNoise instead of looking for one on the system.
(Default: ${rnnoise})
Build the included version of ReNameNoise instead of looking for one on the system.
(Default: ${renamenoise})

### bundled-speex

Expand Down Expand Up @@ -189,14 +189,14 @@ Build support for custom Diffie-Hellman parameters.
Use Qt's text-to-speech system (part of the Qt Speech module) instead of Mumble's own OS-specific text-to-speech implementations.
(Default: OFF)

### retracted-plugins
### renamenoise

Build redacted (outdated) plugins as well
(Default: OFF)
Use ReNameNoise for machine learning noise reduction.
(Default: ON)

### rnnoise
### retracted-plugins

Use RNNoise for machine learning noise reduction.
Build redacted (outdated) plugins as well
(Default: OFF)

### server
Expand Down
15 changes: 2 additions & 13 deletions installer/ClientInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
public struct Features {
public bool overlay;
public bool g15;
public bool rnnoise;
}

public class ClientInstaller : MumbleInstall {
Expand Down Expand Up @@ -87,14 +86,11 @@ public ClientInstaller(string version, string arch, Features features) {
// 64 bit
this.Platform = WixSharp.Platform.x64;
binaries = new List<string>() {
"renamenoise.dll",
"speexdsp.dll",
"mumble.exe",
};

if (features.rnnoise) {
binaries.Add("rnnoise.dll");
}

if (features.overlay) {
binaries.Add("mumble_ol.dll");
binaries.Add("mumble_ol_helper.exe");
Expand All @@ -109,14 +105,11 @@ public ClientInstaller(string version, string arch, Features features) {
// 32 bit
this.Platform = WixSharp.Platform.x86;
binaries = new List<string>() {
"renamenoise.dll",
"speexdsp.dll",
"mumble.exe",
};

if (features.rnnoise) {
binaries.Add("rnnoise.dll");
}

if (features.overlay) {
binaries.Add("mumble_ol.dll");
binaries.Add("mumble_ol_helper.exe");
Expand Down Expand Up @@ -221,10 +214,6 @@ public static void Main(string[] args) {
if (args[i] == "--overlay") {
features.overlay = true;
}

if (args[i] == "--rnnoise") {
features.rnnoise = true;
}
}

if (version != null && arch != null) {
Expand Down
26 changes: 13 additions & 13 deletions src/mumble/AudioConfigDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ AudioInputDialog::AudioInputDialog(Settings &st) : ConfigWidget(st) {
// Hide the slider by default
showSpeexNoiseSuppressionSlider(false);

#ifndef USE_RNNOISE
// Hide options related to RNNoise
qrbNoiseSupRNNoise->setVisible(false);
#ifndef USE_RENAMENOISE
// Hide options related to ReNameNoise
qrbNoiseSupReNameNoise->setVisible(false);
qrbNoiseSupBoth->setVisible(false);
#endif
}
Expand Down Expand Up @@ -143,12 +143,12 @@ void AudioInputDialog::load(const Settings &r) {
loadSlider(qsSpeexNoiseSupStrength, 14);
}

bool allowRNNoise = SAMPLE_RATE == 48000;
bool allowReNameNoise = SAMPLE_RATE == 48000;

if (!allowRNNoise) {
if (!allowReNameNoise) {
const QString tooltip = QObject::tr("RNNoise is not available due to a sample rate mismatch.");
qrbNoiseSupRNNoise->setEnabled(false);
qrbNoiseSupRNNoise->setToolTip(tooltip);
qrbNoiseSupReNameNoise->setEnabled(false);
qrbNoiseSupReNameNoise->setToolTip(tooltip);
qrbNoiseSupBoth->setEnabled(false);
qrbNoiseSupBoth->setToolTip(tooltip);
}
Expand All @@ -161,9 +161,9 @@ void AudioInputDialog::load(const Settings &r) {
loadCheckBox(qrbNoiseSupSpeex, true);
break;
case Settings::NoiseCancelRNN:
#ifdef USE_RNNOISE
if (allowRNNoise) {
loadCheckBox(qrbNoiseSupRNNoise, true);
#ifdef USE_RENAMENOISE
if (allowReNameNoise) {
loadCheckBox(qrbNoiseSupReNameNoise, true);
} else {
// We have to switch to speex as a fallback
loadCheckBox(qrbNoiseSupSpeex, true);
Expand All @@ -174,8 +174,8 @@ void AudioInputDialog::load(const Settings &r) {
#endif
break;
case Settings::NoiseCancelBoth:
#ifdef USE_RNNOISE
if (allowRNNoise) {
#ifdef USE_RENAMENOISE
if (allowReNameNoise) {
loadCheckBox(qrbNoiseSupBoth, true);
} else {
// We have to switch to speex as a fallback
Expand Down Expand Up @@ -233,7 +233,7 @@ void AudioInputDialog::save() const {
s.noiseCancelMode = Settings::NoiseCancelOff;
} else if (qrbNoiseSupBoth->isChecked()) {
s.noiseCancelMode = Settings::NoiseCancelBoth;
} else if (qrbNoiseSupRNNoise->isChecked()) {
} else if (qrbNoiseSupReNameNoise->isChecked()) {
s.noiseCancelMode = Settings::NoiseCancelRNN;
} else {
s.noiseCancelMode = Settings::NoiseCancelSpeex;
Expand Down
Loading

0 comments on commit 9411968

Please sign in to comment.