Package Details: noisetorch 0.12.2-4

Git Clone URL: https://aur.archlinux.org/noisetorch.git (read-only, click to copy)
Package Base: noisetorch
Description: Real-time microphone noise suppression on Linux.
Upstream URL: https://github.com/noisetorch/NoiseTorch
Licenses: GPL-3.0-or-later
Provides: noisetorch
Submitter: erbrecht
Maintainer: g3tchoo (HurricanePootis)
Last Packager: HurricanePootis
Votes: 67
Popularity: 0.64
First Submitted: 2020-12-11 15:09 (UTC)
Last Updated: 2024-08-06 01:16 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

stasadev commented on 2022-06-05 07:50 (UTC) (edited on 2022-06-05 11:08 (UTC) by stasadev)

NoiseTorch doesn't work without internet in v0.12.0, temporary patch:

# Maintainer:  Travis Collins <erbrecht at pobox dot com>
# Contributor: Justin Kromlinger <hashworks@archlinux.org>
# Contributor: Sefa Eyeoglu <contact@scrumplex.net>

# Note: The upstream maintainer does not allow ANY modifications
# to the source code. Please refrain from doing so.
# https://lists.archlinux.org/pipermail/aur-general/2021-May/036230.html

pkgname=noisetorch
pkgver=0.12.0
pkgrel=2
pkgdesc='Real-time microphone noise suppression on Linux.'
arch=('x86_64')
url=https://github.com/noisetorch/NoiseTorch
license=('GPL3')
depends=('pulseaudio' 'polkit' 'hicolor-icon-theme')
makedepends=('go' 'cmake' 'git')
provides=('noisetorch')
install="${pkgname}.install"
source=(
    "$pkgname::git+https://github.com/noisetorch/NoiseTorch.git#tag=v${pkgver}"
    "https://github.com/noisetorch/NoiseTorch/pull/317.patch"
    "git+https://github.com/noisetorch/c-ringbuf.git"
    "git+https://github.com/noisetorch/rnnoise.git"
)
sha512sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP')


prepare() {
    cd "$pkgname"

    # fix(updates): Fix crash when no internet connection
    patch -Np1 -i "$srcdir/317.patch"

    git submodule init
    git config submodule.c-ringbuf.url "${srcdir}/c-ringbuf"
    git config submodule.rnnoise.url "${srcdir}/rnnoise"
    git submodule update
}

build() {
    cd "$pkgname"

    export GOPATH="$srcdir/go"

    pushd "c/ladspa"
    make
    popd

    vendor_flags="-X main.version=${pkgver} -X main.distribution=archlinux"

    export CGO_CPPFLAGS="${CPPFLAGS}"
    export CGO_CFLAGS="${CFLAGS}"
    export CGO_CXXFLAGS="${CXXFLAGS}"
    export CGO_LDFLAGS="${LDFLAGS}"
    export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
    go generate
    go build -ldflags "$vendor_flags -linkmode=external" -o bin/noisetorch
    go clean -modcache
}

package() {
    cd "$pkgname"

    install -D -m755 bin/noisetorch "${pkgdir}/usr/bin/noisetorch"
    install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -D -m644 assets/noisetorch.desktop "${pkgdir}/usr/share/applications/noisetorch.desktop"
    install -D -m644 assets/icon/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/icon-LICENSE"
    install -D -m644 assets/icon/noisetorch.png "${pkgdir}/usr/share/icons/hicolor/256x256/apps/noisetorch.png"
}

ranixon commented on 2022-06-05 02:59 (UTC) (edited on 2022-06-05 05:32 (UTC) by ranixon)

EDIT: I don't know what the hell happend, but after I ran noisetorch -log and gave me the log, for some reason started working normally including the systemd service.


Hi, I can't launch noisetorch. After install it I made the systemd unit as is explained here (I installed it using yay): https://github.com/noisetorch/NoiseTorch/wiki/Start-automatically-with-Systemd

Resulting in using the path where the binary is placed with this aur package, the directory is ~/.config/systemd/user/noisetorch.service:

[Unit]
Description=Noisetorch Noise Cancelling
Requires=sys-devices-pci0000:00-0000:00:08.1-0000:08:00.4-sound-card1-controlC1.device
After=sys-devices-pci0000:00-0000:00:08.1-0000:08:00.4-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=/usr/bin/noisetorch -i -s alsa_input.pci-0000_08_00.4.analog-stereo -t 95
ExecStop=/usr/bin/noisetorch -u
Restart=on-failure
RestartSec=3

[Install]
WantedBy=default.target

Enable it with systemctl --user enable noisetorch.service then reboot, run systemctl --user status noisetorch.service and gives this output:

Loaded: loaded (/home/ramiro/.config/systemd/user/noisetorch.service; enabled; vendor preset: enabled)
 Active: activating (auto-restart) (Result: exit-code) since Sat 2022-06-04 23:53:44 -03; 2s ago
Process: 1265 ExecStart=/usr/bin/noisetorch -i -s alsa_input.pci-0000_08_00.4.analog-stereo -t 95 (code=exited, status=2)
Main PID: 1265 (code=exited, status=2)
    CPU: 32ms

Later running journalctl --user-unit=noisetorch.service I have:

jun 04 23:57:38 Ramiro-PCA systemd[750]: Started Noisetorch Noise Cancelling.
jun 04 23:57:38 Ramiro-PCA noisetorch[2502]: 2022/06/04 23:57:38 Reading JSON for latest_release failed json: cannot unmarshal object into Go value of type main.github_releases
jun 04 23:57:38 Ramiro-PCA noisetorch[2502]: panic: runtime error: index out of range [0] with length 0
jun 04 23:57:38 Ramiro-PCA noisetorch[2502]: goroutine 1 [running]:
jun 04 23:57:38 Ramiro-PCA noisetorch[2502]: main.getLatestRelease()
jun 04 23:57:38 Ramiro-PCA noisetorch[2502]:         noisetorch/update.go:199 +0x477
jun 04 23:57:38 Ramiro-PCA noisetorch[2502]: main.init()
jun 04 23:57:38 Ramiro-PCA noisetorch[2502]:         noisetorch/update.go:77 +0x2e
jun 04 23:57:38 Ramiro-PCA systemd[750]: noisetorch.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
jun 04 23:57:38 Ramiro-PCA systemd[750]: noisetorch.service: Failed with result 'exit-code'.
jun 04 23:57:41 Ramiro-PCA systemd[750]: noisetorch.service: Scheduled restart job, restart counter is at 85.
jun 04 23:57:41 Ramiro-PCA systemd[750]: Stopped Noisetorch Noise Cancelling.

And now I can't run noisetorchin konsole and gives:

2022/06/04 23:51:58 Reading JSON for latest_release failed json: cannot unmarshal object into Go value of type main.github_releases
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
main.getLatestRelease()
        noisetorch/update.go:199 +0x477
main.init()
        noisetorch/update.go:77 +0x2e

What I'm doing wrong here?

robiot commented on 2022-05-31 14:05 (UTC)

Looks good! @Scrumplex

jpegxguy commented on 2022-05-30 20:32 (UTC)

I just found out about the upstream maintainer's email. What a rude individual, lmao.

It's funny how they think their opinion should matter when it comes to an open source project like this.

Removing that line does not constitute a fork, wtf.

Scrumplex commented on 2022-05-29 21:01 (UTC)

Switched the package to the new repository. Also added a disclaimer when installing/upgrading the package.

gileri commented on 2022-05-27 21:34 (UTC)

@lectrode : done

lectrode commented on 2022-05-21 21:37 (UTC) (edited on 2022-05-21 21:38 (UTC) by lectrode)

progress of binary and code review of noisetorch can be found here:

https://github.com/noisetorch/NoiseTorch/discussions/275

timschumi commented on 2022-05-19 10:42 (UTC)

I updated the package to 0.11.6 as there were no code changes between 0.11.5 0.11.6. So in any case it doesn't really matter. It was basically just a version bump to notify users about this. I don't have any convenient tools to tell people about problems with upstream.

Fair thought (although I'd argue that making users wonder why the package isn't yet updated to 0.11.6 and letting them inquire that would be more effective than just silently pushing through the update :P).

Also, if there is still a chance that the compromise is still going on, it is probably a good idea to lock the revision to a Git SHA1 instead of a tag. Even though I hope that makepkg would choke on that, tags can change (not to mention new users, that don't have an existing checkout and therefore can't detect tag changes).

I just deleted the vendor directory and ran go mod vendor and got the exact same tree again (no changes in Git). So seems like they are fine. At least as long as the go.mod is fine

I can confirm the same results, but I haven't yet checked go.mod either.

Also, the files in the c/ directory look pretty vendored (although still reasonably auditable compared to the Go vendor directory), don't they?

Scrumplex commented on 2022-05-19 10:34 (UTC) (edited on 2022-05-19 10:34 (UTC) by Scrumplex)

EDIT: Also, confirming that the vendored dependencies match what is upstream should be relatively easy, right?

I just deleted the vendor directory and ran go mod vendor and got the exact same tree again (no changes in Git). So seems like they are fine. At least as long as the go.mod is fine

Scrumplex commented on 2022-05-19 10:30 (UTC)

I updated the package to 0.11.6 as there were no code changes between 0.11.5 0.11.6. So in any case it doesn't really matter. It was basically just a version bump to notify users about this. I don't have any convenient tools to tell people about problems with upstream.