GithubHelp home page GithubHelp logo

josh-richardson / cadmus Goto Github PK

View Code? Open in Web Editor NEW
2.1K 2.1K 55.0 1001 KB

A GUI frontend for @werman's Pulse Audio real-time noise suppression plugin

License: GNU General Public License v3.0

Shell 29.94% Python 70.06%

cadmus's People

Contributors

cbskarmory avatar josh-richardson avatar thebitstick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cadmus's Issues

Input and output problem Ubuntu 20.04

Hi, my problem is that cadmus inverts the output with the sound input, so when I want to apply the cancellation filter, I get cadmus ouput where the microphone is and cadmus sink microphone where the speakers are.

Captura de pantalla de 2020-07-30 21-44-09

Mic sources appearing on sidebar and issue on restarting Cadmun [Solus]

Hello there!

Cadmus seems to be working after setting the mic to denoised on Pavucontrol, but there is a few small issues on Solus when using it:

As you can see on the images below, 2 new audio processes/sources appears in the Raven sidebar on Solus, it's not a big deal, but I think it would be better to not have these be shown there, as it adds to visual clutter a bit:

Desktop

1

Closer look

2

Other than that, the other issue I encountered is that opening and using Cadmus for the first time is fine, but trying to open it again on the same session makes Pulseaudio unable to recognize any audio devices until I restart my PC.

If there is any log I can attach to help with this, just tell me how to get it and I will update this post.

Add better descriptions for the sinks

Currently, Cadmus creates two devices with Pulseaudio.

mic_denoise_out has no description, giving it the default of Null Output.
mic_raw_in gets the description of LADSPA Plugin Noise Suppresor for Voice (Mono) on Null Output from librnnoise_ldspa.
mic_denoise_out.monitor has a better description, Denoised Microphone.

These names are horrible, confusing and cluttering. I propose Cadmus Denoised Microphone Output for the null sink, Cadmus Raw Microphone Redirect for the raw loopback, not giving a description to the monitor and creating a Virtual Input Device, as I mentioned in #11 , which would get the description of Cadmus Denoised Microphone.

Edit: The precise names are not that important, as long as they give an idea to whom they belong (Cadmus) and what they are used.

Is cadmus development dead?

Is cadmus dead? Noisetorch is still pretty active as far as I know but their noise suppression algorithm seems to aggressive for me, more like a Noise Gate. Cadmus runs so much better, but I'd love to see more activity, IT IS very promising.

Dummy output in sound settings

Sound does not work after running cadus (installed via .deb) in Ubuntu 20.04 gnome shell.

In sound settings, output device shows only "Dummy Output".

Tried to reinstall alsa, force-reload alsa, remove .config/pulse/, none of them works.

Please help!

No status bar applet

I'm on Arch with GNOME as DE, I've tried running Cadmus from the appimage and from the extracted .zip but in neither case I get the applet in the status bar.
The Cadmus process it's running but I get no effect (testing on Discord, using default input)
Are there any dependencies not explicitly stated as required?
I can give more info if needed, I don't know what could be useful for troubleshooting here

Not working on Elementary OS Hera

I installed the last version in deb format on my Elementary OS Hera based on Ubuntu 18.04.
The program launch normaly, but doesn't have any input in the list to enable the Noise Supression function.

Can you use this in the terminal

I have a little baby monitor and I wanted to try and cancel out a sound machine that basically makes wave sounds as a kind of white noise to prevent the babies from waking up because of racket going on in the house.

The device I am running it on is a raspberry pi 4 and I have a mic attached to it. The raspberry pi doesn't currently run with a graphical interface. I might be able to start one up, but I was curious if I even had to and what my luck would be if I tried using this software.

Thanks

ARM64 Support

Deb, AppImage, and Zip are not marked for being x86_64 only and there are users who would like to use this on x86 and even ARM64/ARMHF (Raspberry Pi/Pinebook Pro).

At the very least the first step would be to properly label future releases as being x86_64.

.deb file appears as "proprietary" in Ubuntu 20.04

Heya,
when installing cadmus on Ubuntu 20.04, it gets licensed as "Proprietary", while the license file in GitHub, clearly puts it as GPL 3.0. Inspecting the .deb file, learns that it contains no license information.

dpkg --info cadmus.deb 
 new Debian package, version 2.0.
 size 35615736 bytes: control archive=4095 bytes.
     345 bytes,    11 lines      control              
    9293 bytes,   125 lines      md5sums              
 Package: cadmus
 Version: 1.0
 License: unknown
 Vendor: Joshua Richardson
 Architecture: amd64
 Maintainer: Joshua Richardson <[email protected]>
 Installed-Size: 90765
 Section: default
 Priority: extra
 Homepage: https://github.com/josh-richardson/cadmus/
 Description: A GUI frontend for @werman's Pulse Audio real-time noise suppression plugin 

Slide 33 here can be of aid: https://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf

support for window

Hello, it would be nice if you could spawn cadmus window instead of it being a notification applet. Usefull for dwm and other wms.

Just did not work. Appimage.

I got the latest version of cadmus.Appimage and ran it on my computer which runs manjaro the latest version. I get the icon but the denoise output gives no sound.
Would love to know what I am doing wrong or its something else. Thanks in advance.

In KDE/Plasma it is impossible to change the suppression level

image

Since in my desktop environment it isn't allowed that a menu have a slider, I cannot set the suppression level.

Is there any workaround?

I didn't figure how to build it outside of an dpkg-deb environment, so I'm not able to compile and run from source yet, but I'd be happy enough with some way to change the default suppression level in the source code. I'm able to run other DE and figure out a good suppression value for me.

I'm not expecting a fix any time soon, but I hope anyone can point me out some workaround, since 50 is a bit too high for me right now.

Cadmus all of a sudden stopped working, it has no sound output.

It was working earlier today, I went to sleep and when I woke up. I couldn't get it to work, It didn't output any sound. I'm not sure what happened because I never had any problems with it before, I've spent a few hours messing around trying to get it to work. I'm using Pop!_OS 20.04

Incorrect source in loopback

I just installed cadmus to try but it didnt work but after a little try and error found the problem
after i switched the source of "Loopback to LADSPA Plugin Noise Suppressor for Voice (Mono) on Null Output" from "Denoised Microphone" to "Built-in Audio Analog Stereo" (the microphone source) It worked without major issues.
Screenshot_2020-06-29_21-25-27

Restart required to attach to new input devices

The title says it all, I guess.

When I

  1. start cadmus
  2. attach a USB microphone

I am unable to denoise that microphone via cadmus as it is not displayed as a possible source. After killing and re-starting cadmus this works.

On that note, the list of inputs seems to have other issues as well: a certain "Denoised microphone" turns up here which is unexpected as I do not thnk cadmus should daisy-chain the denoise filterson top of each other.

AUR package

(I already read on the readme that it's planned. This issue is just for people to subscribe to so they get notified once it's been added on there)

Flatpak?

Love this project, brilliant idea and great job!

Have you considered adding Cadmus to Flathub as a Flatpak?

fbs run fails with pulsectl error when attempting to run form source

everything seems fine up until fbs run:

Traceback (most recent call last):
  File "/home/xxx/git/cadmus/src/main/python/main.py", line 11, in <module>
    pulse = pulsectl.Pulse("t")
  File "/home/xxx/git/cadmus/python-environments/env/lib/python3.6/site-packages/pulsectl/pulsectl.py", line 359, in __init__
    try: self.connect(autospawn=True)
  File "/home/xxx/git/cadmus/python-environments/env/lib/python3.6/site-packages/pulsectl/pulsectl.py", line 402, in connect
    if self.connected is False: raise PulseError('Failed to connect to pulseaudio server')
pulsectl.pulsectl.PulseError: Failed to connect to pulseaudio server

Haven't tried building the deb yet, but maybe this is an environment issue...?

No show in Audacity

The title pretty much says it. OpenSUSE Tumbleweed, pulseaudio. Cadmus appears in Chromium-based browsers and Skype. It does not appear as a choice in Audacity 2.4.2 I have forced Audacity to generate a new config file with no joy. Any suggestions would be greatly appreciated.

Core dump under Wayland

Trying to start Cadmus under Wayland results in this:

This application failed to start because it could not find or load the Qt platform plugin "wayland"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
[1]    19775 abort (core dumped)  cadmus

Other Qt apps work. I have the environment variable QT_QPA_PLATFORM=wayland set.

Too aggressive

I just tested the 0.0.1 release (AppImage) and everything I hear are some crackle while with the app off everything is fine.

I appended the recording done with cadmus on:
unbenannt.zip

Unable to change volume level. Wrong output device selected.

I am using Linux Mint 19.3 XFCE.

When I enable noise suppression, cadmus seems to set my default output device to 'LADSPA Plugin Suppressor for Voice (Mono) on Null Output. Although I can hear audio this means when adjusting the volume with the media keys or the slider in the PulseAudio Plugin (xfce4-pulseaudio-plugin) the sound level is not changed.

To fix this.
After enabling the noise suppression, I have to re-select the sound output device I wish to use in the PulseAudio Plugin.
Then open up pavucontrol and under the Playback tab set
'LADSPA Stream on' back to 'Null Output'
and
'Loopback of Denoised Microphone on' back to 'LADSPA Plugin Noise Suppressor for Voice (Mono) on Null Output'.

Is this just some kind of xfce4-pulseaudio-plugin quirk or a bug?

Occasional crashing on Arch

After selecting an input source I'll get this output, followed by the output of journalctl:

alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_797_2018_07_17_00046-00.analog-stereo
/home/work/.cache/cadmus/librnnoise_ladspa.so
Traceback (most recent call last):
  File "main.py", line 142, in <module>
  File "main.py", line 125, in enable_noise_suppression
  File "main.py", line 37, in load_modules
  File "pulsectl/pulsectl.py", line 655, in module_load
  File "contextlib.py", line 88, in __exit__
  File "pulsectl/pulsectl.py", line 482, in _pulse_op_cb
pulsectl.pulsectl.PulseOperationFailed: 2
Jul 11 10:15:45  pulseaudio[306484]: [pulseaudio] module-ladspa-sink.c: Failed to parse, validate or set control parameters
Jul 11 10:15:45  pulseaudio[306484]: [pulseaudio] module.c: Failed to load module "module-ladspa-sink" (argument: "sink_name=mic_raw_in sink_master=mic_denoised_out label=noise_suppressor_mono plugin=/home/work/.cache/cadmus/librnnoise_ladspa.so sink_properties="device.description='Cadmus Raw Microphone Redirect'""): initialization failed.
Jul 11 10:15:45  pulseaudio[306484]: [pulseaudio] module-loopback.c: No such sink.
Jul 11 10:15:45  pulseaudio[306484]: [pulseaudio] module.c: Failed to load module "module-loopback" (argument: "latency_msec=1 source=alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_797_2018_07_17_00046-00.analog-stereo sink=mic_raw_in channels=1"): initialization failed.

When I can successfully start Cadmus and choose an audio input, the Cadmus output device registers as hearing no audio.

This is running the latest version of cadmus (0.0.2).

pip failing - ERROR: No matching distribution found for sip==4.19.8

Running on Arch, I got an error trying to install via the pip command in the README.md.

I believe this log should provide all the details:

┌[omer☮omer-desk]-(~/repos/cadmus)-[git://master ✗]-
└> git rev-parse HEAD
68b9942e2fc8523a5c70367135d34a9a2477b5ac
┌[omer☮omer-desk]-(~/repos/cadmus)-[git://master ✗]-
└> ve cad
created virtual environment CPython3.8.3.final.0-64 in 108ms
  creator CPython3Posix(dest=/home/omer/repos/cadmus/cad, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/omer/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
(cad) ┌[omer☮omer-desk]-(~/repos/cadmus)-[git://master ✗]-
└> python3 -m pip install -r requirements.txt
Collecting altgraph==0.17
  Using cached altgraph-0.17-py2.py3-none-any.whl (21 kB)
Processing /home/omer/.cache/pip/wheels/28/ba/c3/7df832544fd9f5e3184cca56a7ccb00c5255a501cfd664c652/fbs-0.8.6-py3-none-any.whl
Processing /home/omer/.cache/pip/wheels/8e/70/28/3d6ccd6e315f65f245da085482a2e1c7d14b90b30f239e2cf4/future-0.18.2-py3-none-any.whl
Collecting macholib==1.14
  Using cached macholib-1.14-py2.py3-none-any.whl (37 kB)
Processing /home/omer/.cache/pip/wheels/42/52/d5/9550bbfb9eeceaf0f19db1cf651cc8ba41d3bcf8b4d20e4279/pefile-2019.4.18-py3-none-any.whl
Collecting pulsectl==20.5.1
  Using cached pulsectl-20.5.1-py2.py3-none-any.whl (33 kB)
Processing /home/omer/.cache/pip/wheels/39/ee/a8/2ca0838cbf79fe670b74b5214f532c229c8ee91d4824763619/PyInstaller-3.4-py2.py3-none-any.whl
Collecting PyQt5==5.9.2
  Using cached PyQt5-5.9.2-5.9.3-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl (105.3 MB)
Processing /home/omer/.cache/pip/wheels/56/f2/76/4da2a929cac39664c65d56c775deec5de05e5a8f0c12906686/PyQt5_stubs-5.14.2.2-py3-none-any.whl
ERROR: Could not find a version that satisfies the requirement sip==4.19.8 (from -r requirements.txt (line 10)) (from versions: 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.2.0, 5.3.0)
ERROR: No matching distribution found for sip==4.19.8 (from -r requirements.txt (line 10))

I'm not really familiar with pip so maybe I'm missing something obvious here?

Bugfix + Suggestion

Hi. Firstly, This program is great. And abstracts multiple features that would normally require opening up pavucontrol into a nice neat little applet. And I do like that. But it's shortcoming is it does not work on discord, And it does not work on chrome/chromium. And being as many audio/video call programs rely on chromium (which is sad seeing that google follows the footsteps of microsoft with their embrace, extend, extinguish)

Secondly, If it's any help atall v4l2loopback does not work on discord if you load it with no paramaters. But if you load it with
sudo modprobe v4l2loopback exclusive_caps=1 Discord picks up whatever you're outputting just fine and accepts it. May or not be helpful in some way.

This is a very neat program and I would like to see it have some success as each program having their own form of noise supression is archaic dogshit and something that should realistically be handeled by the microphone driver in the first place for the sake of consistency, optimization, space saving, etc. But this is one step closer to that.

Startup with Selected Microphone

Hi,

Thanks for cadmus. It is a great application. I appreciate your work.

It is unclear to me how to add cadmus to startup with a selected microphone. Can you please share with me custom command syntax to add a selected microphone to cadmus?

Thanks,
-SHD

High latency

Not sure if this issue belongs here, or upstream to Werman's plugin, but there is very high latency between speaking and hearing output being looped back to me (3-5 seconds +)

My pulseaudio version is 13.0, I am using Arch Linux, and am using a generic analog microphone
Are there any possible solutions to this? Without noise suppression latency isn't an issue (sub 0.5s latency by ear)

No longer getting any audio from 0.2

As of the latest release, it doesn't seem to actually get any audio.

Running in terminal:

[liam@liam-manjaro ~]$ /home/liam/Downloads/cadmus2.AppImage
qt.qpa.xcb: QXcbConnection: XCB error: 5 (BadAtom), sequence: 547, resource id: 0, major code: 20 (GetProperty), minor code: 0
alsa_input.usb-ZOOM_Corporation_U-22-00.analog-stereo
/home/liam/.cache/cadmus/librnnoise_ladspa.so

The Cadmus Denoised Output is just totally silent. The previous version worked.

If I can provide more info, let me know.

Feature Request: Make latency_msec configurable

Seem to be a common issue (e.g. #19) that the requested latency wraps around for some mics (mine included, causing it to configure requested latency to 2000ms).

E.g. By running manually with 10 instead of 1 I get (more) expected behavior and the input reports a requested latency of 2.5ms.

Understand it might be an upstream issue, but would be neat if there was a way to configure it with cadmus.

On the topic I guess it would be nice to be able to configure both mono/stereo and the VAB threshold as well.

Stopping and starting has issues

When stopping it and then starting it again, it doesn't seem to be able to bring it back up.

Noticed this in terminal:

  File "main.py", line 102, in <module>
  File "main.py", line 22, in <lambda>
  File "main.py", line 62, in enable_noise_suppression
  File "main.py", line 43, in load_modules
  File "pulsectl/pulsectl.py", line 655, in module_load
pulsectl.pulsectl.PulseOperationInvalid: Bad state [pulse errno 15]
/home/liam/.cache/cadmus
/home/liam/.cache/cadmus/librnnoise_ladspa.so
Traceback (most recent call last):
  File "pulsectl/pulsectl.py", line 654, in module_load
  File "pulsectl/_pulsectl.py", line 665, in _wrapper
pulsectl._pulsectl.LibPulse.CallError: ('pa_context_load_module', (<pulsectl._pulsectl.LP_PA_CONTEXT object at 0x7f7c05b0e0d0>, b'module-null-sink', b'sink_name=mic_denoised_out', <CFunctionType object at 0x7f7bf5378048>, None), <pulsectl._pulsectl.LP_PA_OPERATION object at 0x7f7c05b0ee18>, 'Bad state [pulse errno 15]')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 102, in <module>
  File "main.py", line 22, in <lambda>
  File "main.py", line 62, in enable_noise_suppression
  File "main.py", line 43, in load_modules
  File "pulsectl/pulsectl.py", line 655, in module_load
pulsectl.pulsectl.PulseOperationInvalid: Bad state [pulse errno 15]```

Allow to filter output

The noise suppression can also be used on the audio output. Denoising the sound coming from an application and forwarding the denoised results to the speaker. This way you can not only denoise your own microphone but also benefit if:

  • you have a noisy videorecording
  • you want to watch a noisy livestream
  • You are in a video chat and someone has a noisy microphone

Would you be interested in integrating this into cadmus?

What is the working principle Cadmus?

Hello, friend!

It's just a question. The application "RTX Voice" uses "neural networks" and "artificial intelligence" for its work.
Does your application "Cadmus" use them too? What is the principle of its work?

Sound output delay

Sometimes when I run Cadmus it doesn't work at all, but when it does, the delay from me speaking until it gives some output fluctuates tremendously. Sometimes it works great with under half a second delay. But at other times the delay can be up to several seconds which makes it unusable. Does someone know what is happening and how to solve it? I am using Manjaro.

Still picking up keystrokes

I select my Microphone "Hyperx Quadcast" and then it adds an output for "denoised microphone" I use that but it still picks up everything even things that are not my voice. Am I selecting something wrong?

No show in Audacity

The title pretty much says it. OpenSUSE Tumbleweed, pulseaudio. Cadmus appears in Chromium-based browsers and Skype. It does not appear as a choice in Audacity 2.4.2 I have forced Audacity to generate a new config file with no joy. Any suggestions would be greatly appreciated.

Additional option to denoise audio output

It would be nice to denoise audio output, for example if you're speaking to someone who has noise in the background and they can't install the denoiser.
This also would make it more familiar to RTX Voice.
I think good implementation would be for additional checkbox like "Allow denosing the output" so the audio devices wouldn't be confused

"Disable Noise Suppression" unloads all instances of PA modules, not just those created by Cadmus

Clicking "Disable Noise Suppression" unloads all instances of module-loopback, module-null-sink, module-ladspa-sink and module-remap-source, even if they are unrelated to Cadmus.

I use a global DRC (dynamic range compression) filter chain on my default sink (aesthetics, and to overcome ambient noise). This uses two different instances of module-ladspa-sink, so when I fire up Cadmus it works (mostly) but if I toggle NS to Disabled it unloads all module-ladspa-sink instances, including my DRC chain.

Cadmus should be selective about which modules it unloads so as not to bork other pulseaudio configurations and applications.

I've forked and am going to look at resolving it, this issue has been filed for visibility.

Sane Packaging for Zip

Related to #14 since it only contains x86_64 libraries, but the main topic for this issue is: the Zip release is basically just a torn-apart AppImage.

I attempted to run the cadmus binary outside the Zip directory it gave this error:

[20309] Error loading Python lib '$HOME/Downloads/libpython3.6m.so.1.0': dlopen: $HOME/Downloads/libpython3.6m.so.1.0: cannot open shared object file: No such file or directory

with $HOME being substituted for my actual home directory

There are too many hard-linked libraries. That's expected for an AppImage but not a Zip release.
I understand that you can't expect the user to automatically have the exact same libraries, but that's that dependency listings are for. If AUR packaging (#6) is a hope for the future, it can't be built with third-party libraries included.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.