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

Load at startup #6

Closed
StefanRacoveanu opened this issue Jul 16, 2020 · 17 comments
Closed

Load at startup #6

StefanRacoveanu opened this issue Jul 16, 2020 · 17 comments
Labels
enhancement New feature or request

Comments

@StefanRacoveanu
Copy link

I would love to see a feature to automatically load NoiseTorch at startup

@lawl
Copy link
Contributor

lawl commented Jul 16, 2020

Hey!

Unfortunately this is currently unlikely to happen because the module currently consumes CPU even if no application is using the microphone. See this issue which in turn filed an issue on PulseAudio.

I'm not super opposed to it, if enough people want this. But it's something you can already achieve by configuring pulseaudio manually as described here.

@lawl lawl added the enhancement New feature or request label Jul 16, 2020
@legendofmiracles
Copy link
Contributor

Couldn't you easily check, if there is a recording application (several other apps already did this with pulse, e.g. palva and kmixer), and only then activate noise cancellation?

@lawl
Copy link
Contributor

lawl commented Jul 17, 2020

no, because a lot of applications require the virtual microphone to be present before they start, otherwise they don't see it as they query the device list only once on start unfortunately.

@lawl
Copy link
Contributor

lawl commented Aug 14, 2020

With 0.7.0-beta this could now be achieved by using commandline options and placing them in your desktop environments auto start.

Would this be sufficient as a solution, or did you have something else in mind?

@StefanRacoveanu
Copy link
Author

With 0.7.0-beta this could now be achieved by using commandline options and placing them in your desktop environments auto start.

Would this be sufficient as a solution, or did you have something else in mind?

Yes, this is enough, thank you for improving the app, also I would like to give you some feedback:

I think it is more intuitive to give the device id to the -i parameter(noisetorch -i <DEVICE_ID), rather than noisetorch -s <DEVICE_ID> -i

And also I can't run the app with sudo
image

@lawl
Copy link
Contributor

lawl commented Aug 15, 2020

Yeah that may may been better, but too late to change now.

As for not being able to run it with sudo, that's because it's only in your users PATH and not in root's PATH. You'll need to specify the absolute path.

However, since the original issue here is resolved, I'll now close this.

@lawl lawl closed this as completed Aug 15, 2020
@Razer0123
Copy link

Hello, so what is the recommended command to run this automatically on boot?

@lawl
Copy link
Contributor

lawl commented May 3, 2021

There's a wiki entry here: https://github.com/lawl/NoiseTorch/wiki/Start-automatically-with-Systemd

@lawl
Copy link
Contributor

lawl commented May 3, 2021

I cannot provide support for people's individual system configuration, sorry.

@lnicola
Copy link

lnicola commented Jul 29, 2021

FWIW, I'm using NoiseTorch with PipeWire and it doesn't seem to be burning any CPU when no application is recording.

@qualk
Copy link

qualk commented Sep 14, 2021

Yes, same here

@RyuunosukeDS3
Copy link

Can someone give me some help? I Have my startup config like this:

[Unit]
Description=Noisetorch Noise Cancelling
Requires=sys-devices-pci0000:00-0000:00:08.1-0000:0a:00.3-usb3-3\x2d1-3\x2d1:1.0-sound-card1-controlC1.device
After=sys-devices-pci0000:00-0000:00:08.1-0000:0a:00.3-usb3-3\x2d1-3\x2d1:1.0-sound-card1-controlC1.device
# Depending on if you're using pulseaudio or pipewire, uncomment the correct line
After=pulseaudio.service
# After=pipewire.service

[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/home/ryuunsuke/.local/bin/noisetorch -i -s "alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201306-00.mono-fallback" -t 95
ExecStop=/home/ryuunsuke/.local/bin/noisetorch -u

[Install]
WantedBy=default.target

But it exits with

PulseAudio source not found: alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201306-00.mono-fallback

I set the device as required, so I'm not sure why it won't load.

@lnicola
Copy link

lnicola commented Nov 14, 2021

@RyuunosukeDS3 does systemctl --user restart noisetorch help? I've had issues with it not working after resume (probably because the microphone was gone).

If not, does it actually work if you run that command from a terminal?

@RyuunosukeDS3
Copy link

Running it manually does work, yes!

@lnicola
Copy link

lnicola commented Nov 14, 2021

I'm not sure why that would happen (surely your USB microphone is initialized by the time you log in?).

@RyuunosukeDS3
Copy link

I'm not sure why that would happen (surely your USB microphone is initialized by the time you log in?).

I don't know if there is a reason it wouldn't, tbh... I'm fairly sure it is...

@Razer0123
Copy link

I had to add a delay to make mine work, but suddenly stopped again

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

No branches or pull requests

7 participants