diff options
author | Pierre Neidhardt <mail@ambrevar.xyz> | 2020-07-28 16:44:31 +0200 |
---|---|---|
committer | Pierre Neidhardt <mail@ambrevar.xyz> | 2020-08-06 18:54:03 +0200 |
commit | 59b8daf2d2ec693467f299c06cb7f689a984a1d9 (patch) | |
tree | f6dd11a8dfffb1699ffb872b3789cd605333403f /gnu/packages | |
parent | a32605fee7e08be80244f3be135be08da0bbcbc2 (diff) | |
download | guix-59b8daf2d2ec693467f299c06cb7f689a984a1d9.tar.gz |
gnu: Add noisetorch.
* gnu/packages/pulseaudio.scm (noisetorch): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/pulseaudio.scm | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index 238205237f..3757859d11 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -38,6 +38,7 @@ #:use-module (guix build-system cmake) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) + #:use-module (guix build-system go) #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (gnu packages) @@ -533,3 +534,55 @@ however they are only reduced in volume when voice is present. The plugin is made to work with 1 or 2 channels (ladspa plugin), 16 bit, 48000 Hz audio input.") (license l:gpl3))) + +(define-public noisetorch + (package + (name "noisetorch") + (version "0.6.1-beta") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lawl/NoiseTorch") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1jmh7204mhlabdn0azfjrm3kb944j24n0w0cwibqrs9lfgdn8k52")))) + (build-system go-build-system) + (arguments + `(#:import-path "github.com/lawl/NoiseTorch" + #:install-source? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'symlink-rnnoise + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "src/github.com/lawl/NoiseTorch" + (let ((dir "librnnoise_ladspa/bin/ladspa") + (rnnoise (assoc-ref inputs "rnnoise"))) + (mkdir-p dir) + (symlink (string-append rnnoise "/lib/ladspa/librnnoise_ladspa.so") + (string-append dir "/librnnoise_ladspa.so")))) + #t)) + (add-after 'unpack 'gen-version.go + (lambda _ + (with-directory-excursion "src/github.com/lawl/NoiseTorch" + (substitute* "main.go" + (("//go:generate go run scripts/embedversion\\.go") "")) + (with-output-to-file "version.go" + (lambda () + (format #t "package main~%~%var version=~s~&" ,version)))) + #t)) + (add-before 'build 'go-generate + (lambda _ + (with-directory-excursion "src/github.com/lawl/NoiseTorch" + (invoke "go" "generate"))))))) + (inputs + `(("rnnoise" ,rnnoise))) + (home-page "https://github.com/lawl/NoiseTorch") + (synopsis "Real-time microphone noise suppression") + (description "NoiseTorch creates a virtual PulseAudio microphone that +suppresses noise, in any application. Use whichever conferencing or VOIP +application you like and simply select the NoiseTorch Virtual Microphone as +input to torch the sound of your mechanical keyboard, computer fans, trains +and the likes.") + (license l:gpl3))) |