gnu: Add noisetorch.
[jackhill/guix/guix.git] / gnu / packages / pulseaudio.scm
CommitLineData
37bfb448 1;;; GNU Guix --- Functional package management for GNU
3246cc91 2;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4373278e 3;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
870b9ff9 4;;; Copyright © 2016, 2020 Efraim Flashner <efraim@flashner.co.il>
de1b319d 5;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
3cd959a4 6;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
efc95e7b 7;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
05bdb5e6 8;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
27a976ed 9;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
d5e60a2a 10;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
e2332dec 11;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
1a1bce6b 12;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
c2cf286c 13;;; Copyright © 2020 Amin Bandali <bandali@gnu.org>
c7fe7f2c 14;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
a32605fe 15;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
37bfb448
LC
16;;;
17;;; This file is part of GNU Guix.
18;;;
19;;; GNU Guix is free software; you can redistribute it and/or modify it
20;;; under the terms of the GNU General Public License as published by
21;;; the Free Software Foundation; either version 3 of the License, or (at
22;;; your option) any later version.
23;;;
24;;; GNU Guix is distributed in the hope that it will be useful, but
25;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27;;; GNU General Public License for more details.
28;;;
29;;; You should have received a copy of the GNU General Public License
30;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32(define-module (gnu packages pulseaudio)
33 #:use-module (guix packages)
34 #:use-module (guix download)
e2332dec 35 #:use-module (guix git-download)
1a1bce6b 36 #:use-module (guix utils)
b5b73a82 37 #:use-module ((guix licenses) #:prefix l:)
a32605fe 38 #:use-module (guix build-system cmake)
5cca1696 39 #:use-module (guix build-system glib-or-gtk)
37bfb448 40 #:use-module (guix build-system gnu)
59b8daf2 41 #:use-module (guix build-system go)
c1baf5a9 42 #:use-module (guix build-system meson)
df71c88c 43 #:use-module (guix build-system python)
b645425f 44 #:use-module (gnu packages)
54ff0b7d 45 #:use-module (gnu packages algebra)
d5e60a2a 46 #:use-module (gnu packages audio)
38cf2ba0 47 #:use-module (gnu packages autotools)
37bfb448 48 #:use-module (gnu packages avahi)
b2a6a784 49 #:use-module (gnu packages boost)
54ff0b7d 50 #:use-module (gnu packages check)
255d1bbe 51 #:use-module (gnu packages dbm)
37bfb448 52 #:use-module (gnu packages glib)
de2871c9 53 #:use-module (gnu packages gettext)
d9e2f7b2 54 #:use-module (gnu packages gnome)
66fb2d23
LC
55 #:use-module (gnu packages gtk)
56 #:use-module (gnu packages libcanberra)
f6ad09ae 57 #:use-module (gnu packages web)
54ff0b7d 58 #:use-module (gnu packages linux)
37bfb448 59 #:use-module (gnu packages m4)
de2871c9 60 #:use-module (gnu packages perl)
e2332dec
AG
61 #:use-module (gnu packages protobuf)
62 #:use-module (gnu packages python)
63 #:use-module (gnu packages python-xyz)
64 #:use-module (gnu packages python-web)
54ff0b7d 65 #:use-module (gnu packages pkg-config)
531b63eb 66 #:use-module (gnu packages xiph)
55e1475c 67 #:use-module (gnu packages xml)
531b63eb 68 #:use-module (gnu packages xorg))
37bfb448 69
0160458b 70(define-public libsndfile
37bfb448
LC
71 (package
72 (name "libsndfile")
3cd959a4 73 (version "1.0.28")
37bfb448
LC
74 (source (origin
75 (method url-fetch)
76 (uri (string-append "http://www.mega-nerd.com/libsndfile/files/libsndfile-"
77 version ".tar.gz"))
d1a91408
RW
78 (patches (search-patches "libsndfile-armhf-type-checks.patch"
79 "libsndfile-CVE-2017-8361-8363-8365.patch"
1cbdfede
MW
80 "libsndfile-CVE-2017-8362.patch"
81 "libsndfile-CVE-2017-12562.patch"))
37bfb448
LC
82 (sha256
83 (base32
3cd959a4 84 "1afzm7jx34jhqn32clc5xghyjglccam2728yxlx37yj2y0lkkwqz"))))
37bfb448
LC
85 (build-system gnu-build-system)
86 (inputs
87 `(("libvorbis" ,libvorbis)
88 ("libogg" ,libogg)
d7e92b87
ML
89 ("flac" ,flac)))
90 (native-inputs
91 `(("pkg-config" ,pkg-config)))
37bfb448
LC
92 (home-page "http://www.mega-nerd.com/libsndfile/")
93 (synopsis "Reading and writing files containing sampled sound")
94 (description
95 "Libsndfile is a C library for reading and writing files containing
96sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) through
97one standard library interface.
98
99It was designed to handle both little-endian (such as WAV) and
100big-endian (such as AIFF) data, and to compile and run correctly on
101little-endian (such as Intel and DEC/Compaq Alpha) processor systems as well
102as big-endian processor systems such as Motorola 68k, Power PC, MIPS and
103SPARC. Hopefully the design of the library will also make it easy to extend
104for reading and writing new sound file formats.")
105 (license l:gpl2+)))
106
0160458b 107(define-public libsamplerate
37bfb448
LC
108 (package
109 (name "libsamplerate") ; aka. Secret Rabbit Code (SRC)
e1f68c96 110 (version "0.1.9")
37bfb448
LC
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "http://www.mega-nerd.com/SRC/libsamplerate-"
114 version ".tar.gz"))
115 (sha256
116 (base32
e1f68c96 117 "1ha46i0nbibq0pl0pjwcqiyny4hj8lp1bnl4dpxm64zjw9lb2zha"))))
37bfb448 118 (build-system gnu-build-system)
d7e92b87 119 (native-inputs
1a1bce6b
MO
120 `(("pkg-config" ,pkg-config)
121 ("automake" ,automake))) ;For up to date 'config.guess' and 'config.sub'.
37bfb448
LC
122 (propagated-inputs
123 `(("libsndfile" ,libsndfile)
124 ("fftw" ,fftw)))
1a1bce6b
MO
125 (arguments
126 `(#:phases
127 (modify-phases %standard-phases
128 (add-after 'unpack 'fix-configure
129 (lambda* (#:key inputs native-inputs #:allow-other-keys)
130 ;; Replace outdated config.sub and config.guess:
131 (with-directory-excursion "Cfg"
132 (for-each (lambda (file)
133 (install-file (string-append
134 (assoc-ref
135 (or native-inputs inputs) "automake")
136 "/share/automake-"
137 ,(version-major+minor
138 (package-version automake))
139 "/" file) "."))
140 '("config.sub" "config.guess")))
141 #t)))))
37bfb448
LC
142 (home-page "http://www.mega-nerd.com/SRC/index.html")
143 (synopsis "Audio sample rate conversion library")
144 (description
145 "Secret Rabbit Code (aka. libsamplerate) is a Sample Rate Converter for
146audio. One example of where such a thing would be useful is converting audio
147from the CD sample rate of 44.1kHz to the 48kHz sample rate used by DAT
148players.
149
150SRC is capable of arbitrary and time varying conversions; from downsampling by
151a factor of 256 to upsampling by the same factor. Arbitrary in this case means
152that the ratio of input and output sample rates can be an irrational
153number. The conversion ratio can also vary with time for speeding up and
154slowing down effects.
155
156SRC provides a small set of converters to allow quality to be traded off
157against computation cost. The current best converter provides a
158signal-to-noise ratio of 145dB with -3dB passband extending from DC to 96% of
159the theoretical best bandwidth for a given pair of input and output sample
e881752c 160rates.")
0802f3a0 161 (license l:bsd-2)))
37bfb448 162
0160458b 163(define-public pulseaudio
37bfb448
LC
164 (package
165 (name "pulseaudio")
4442d4dc 166 (version "13.0")
37bfb448
LC
167 (source (origin
168 (method url-fetch)
169 (uri (string-append
9dd61217
EF
170 "https://freedesktop.org/software/pulseaudio/releases/"
171 name "-" version ".tar.xz"))
37bfb448
LC
172 (sha256
173 (base32
4442d4dc 174 "0mw0ybrqj7hvf8lqs5gjzip464hfnixw453lr0mqzlng3b5266wn"))
3f9d63df
LC
175 (modules '((guix build utils)))
176 (snippet
177 ;; Disable console-kit support by default since it's deprecated
178 ;; anyway.
6cbee49d
MW
179 '(begin
180 (substitute* "src/daemon/default.pa.in"
181 (("load-module module-console-kit" all)
182 (string-append "#" all "\n")))
183 #t))
fc1adab1
AK
184 (patches (search-patches
185 "pulseaudio-fix-mult-test.patch"
186 "pulseaudio-longer-test-timeout.patch"))))
37bfb448
LC
187 (build-system gnu-build-system)
188 (arguments
5a74d239
LC
189 `(#:configure-flags (list "--localstatedir=/var" ;"--sysconfdir=/etc"
190 "--disable-oss-output"
de1b319d 191 "--enable-bluez5"
5a74d239
LC
192 (string-append "--with-udev-rules-dir="
193 (assoc-ref %outputs "out")
194 "/lib/udev/rules.d"))
277cf3dc
MB
195 #:phases (modify-phases %standard-phases
196 (add-before 'check 'pre-check
197 (lambda _
198 ;; 'tests/lock-autospawn-test.c' wants to create a file
199 ;; under ~/.config/pulse.
200 (setenv "HOME" (getcwd))
201 ;; 'thread-test' needs more time on hydra and on slower
202 ;; machines, so we set the default timeout to 120 seconds.
203 (setenv "CK_DEFAULT_TIMEOUT" "120")
204 #t)))))
37bfb448
LC
205 (inputs
206 ;; TODO: Add optional inputs (GTK+?).
de1b319d
RW
207 `(("alsa-lib" ,alsa-lib)
208 ("bluez" ,bluez)
209 ("sbc" ,sbc)
7136f3e6 210 ("speexdsp" ,speexdsp)
37bfb448 211 ("libsndfile" ,libsndfile)
d5e60a2a 212 ("jack" ,jack-1) ; For routing the output to jack.
37bfb448
LC
213 ("dbus" ,dbus)
214 ("glib" ,glib)
3246cc91 215 ("libltdl" ,libltdl)
7569c5cb 216 ("fftwf" ,fftwf)
37bfb448 217 ("avahi" ,avahi)
531b63eb
DNB
218
219 ;; For the optional X11 modules.
220 ("libice" ,libice)
221 ("libsm" ,libsm)
222 ("libxcb" ,libxcb)
223 ("libxtst" ,libxtst)
224
7136f3e6 225 ("eudev" ,eudev))) ;for the detection of hardware audio devices
d7e92b87 226 (native-inputs
7136f3e6 227 `(("check" ,check)
de2871c9 228 ("gettext" ,gettext-minimal)
7136f3e6 229 ("glib:bin" ,glib "bin")
7136f3e6 230 ("m4" ,m4)
de2871c9
MB
231 ("perl" ,perl)
232 ("perl-xml-parser" ,perl-xml-parser)
7136f3e6 233 ("pkg-config" ,pkg-config)))
37bfb448
LC
234 (propagated-inputs
235 ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
09767fb5 236 `(("libcap" ,libcap)
37bfb448
LC
237 ("gdbm" ,gdbm)))
238 (home-page "http://www.pulseaudio.org/")
239 (synopsis "Sound server")
240 (description
e881752c
AK
241 "PulseAudio is a sound server. It is basically a proxy for your sound
242applications. It allows you to do advanced operations on your sound data as
243it passes between your application and your hardware. Things like
244transferring the audio to a different machine, changing the sample format or
245channel count and mixing several sounds into one are easily achieved using a
246sound server.")
37bfb448
LC
247
248 ;; PulseAudio is LGPLv2+, but some of the optional dependencies (GNU dbm,
249 ;; FFTW, etc.) are GPL'd, so the result is effectively GPLv2+. See
250 ;; 'LICENSE' for details.
251 (license l:gpl2+)))
66fb2d23
LC
252
253(define-public pavucontrol
254 (package
255 (name "pavucontrol")
c7fe7f2c 256 (version "4.0")
66fb2d23
LC
257 (source (origin
258 (method url-fetch)
259 (uri (string-append
5cc3096c 260 "https://freedesktop.org/software/pulseaudio/pavucontrol/pavucontrol-"
66fb2d23
LC
261 version
262 ".tar.xz"))
263 (sha256
264 (base32
c7fe7f2c 265 "1qhlkl3g8d7h72xjskii3g1l7la2cavwp69909pzmbi2jyn5pi4g"))))
5cca1696 266 (build-system glib-or-gtk-build-system)
66fb2d23 267 (inputs
5cca1696 268 `(("adwaita-icon-theme" ,adwaita-icon-theme) ;hard-coded theme
66fb2d23 269 ("gtkmm" ,gtkmm)
5cca1696 270 ("libcanberra" ,libcanberra)
c4c4cc05
JD
271 ("pulseaudio" ,pulseaudio)))
272 (native-inputs
273 `(("intltool" ,intltool)
66fb2d23 274 ("pkg-config" ,pkg-config)))
57e7d748 275 (home-page "https://www.freedesktop.org/software/pulseaudio/pavucontrol/")
66fb2d23
LC
276 (synopsis "PulseAudio volume control")
277 (description
278 "PulseAudio Volume Control (pavucontrol) provides a GTK+
279graphical user interface to connect to a PulseAudio server and
280easily control the volume of all clients, sinks, etc.")
281 (license l:gpl2+)))
05bdb5e6
SR
282
283(define-public ponymix
284 (package
285 (name "ponymix")
286 (version "5")
287 (source (origin
870b9ff9
EF
288 (method git-fetch)
289 (uri (git-reference
290 (url "https://github.com/falconindy/ponymix/")
291 (commit version)))
292 (file-name (git-file-name name version))
05bdb5e6
SR
293 (sha256
294 (base32
870b9ff9 295 "08yp7fprmzm6px5yx2rvzri0l60bra5h59l26pn0k071a37ks1rb"))))
05bdb5e6
SR
296 (build-system gnu-build-system)
297 (arguments
298 `(#:tests? #f ; There is no test suite.
299 #:make-flags (let ((out (assoc-ref %outputs "out")))
300 (list (string-append "DESTDIR=" out)))
301 #:phases
302 (modify-phases %standard-phases
303 (add-after 'unpack 'patch-paths
304 (lambda _
305 (substitute* "Makefile"
306 (("/usr") ""))))
307 (delete 'configure)))) ; There's no configure phase.
308 (inputs
309 `(("pulseaudio" ,pulseaudio)))
310 (native-inputs
311 `(("pkg-config" ,pkg-config)))
312 (home-page "https://github.com/falconindy/ponymix")
313 (synopsis "Console-based PulseAudio mixer")
314 (description "Ponymix is a PulseAudio mixer and volume controller with a
315command-line interface. In addition, it is possible to use named sources and
316sinks.")
317 (license l:expat)))
df71c88c
LF
318
319(define-public pulsemixer
320 (package
321 (name "pulsemixer")
3cc8b4fa 322 (version "1.5.1")
df71c88c 323 (source (origin
fa6abb01
EF
324 (method git-fetch)
325 (uri (git-reference
326 (url "https://github.com/GeorgeFilipkin/pulsemixer")
327 (commit version)))
328 (file-name (git-file-name name version))
df71c88c
LF
329 (sha256
330 (base32
3cc8b4fa 331 "1jagx9zmz5pfsld8y2rj2kqg6ww9f6vqiawfy3vhqc49x3xx92p4"))))
df71c88c
LF
332 (build-system python-build-system)
333 (arguments
334 `(#:phases
335 (modify-phases %standard-phases
336 (add-after 'unpack 'patch-path
337 (lambda* (#:key inputs #:allow-other-keys)
338 (let ((pulse (assoc-ref inputs "pulseaudio")))
339 (substitute* "pulsemixer"
340 (("libpulse.so.0")
341 (string-append pulse "/lib/libpulse.so.0")))
342 #t))))))
343 (inputs
344 `(("pulseaudio" ,pulseaudio)))
345 (home-page "https://github.com/GeorgeFilipkin/pulsemixer/")
346 (synopsis "Command-line and curses mixer for PulseAudio")
347 (description "Pulsemixer is a PulseAudio mixer with command-line and
348curses-style interfaces.")
349 (license l:expat)))
e2332dec
AG
350
351(define-public pulseaudio-dlna
352 ;; The last release was in 2016; use a more recent commit.
353 (let ((commit "4472928dd23f274193f14289f59daec411023ab0")
354 (revision "1"))
355 (package
356 (name "pulseaudio-dlna")
357 (version (git-version "0.5.2" revision commit))
358 (source
359 (origin
360 (method git-fetch)
361 (uri (git-reference
b0e7b699 362 (url "https://github.com/masmu/pulseaudio-dlna")
e2332dec
AG
363 (commit commit)))
364 (file-name (git-file-name name version))
365 (sha256
366 (base32
367 "1dfn7036vrq49kxv4an7rayypnm5dlawsf02pfsldw877hzdamqk"))))
368 (build-system python-build-system)
369 (arguments `(#:python ,python-2))
370 (inputs
371 `(("python2-chardet" ,python2-chardet)
372 ("python2-dbus" ,python2-dbus)
373 ("python2-docopt" ,python2-docopt)
374 ("python2-futures" ,python2-futures)
375 ("python2-pygobject" ,python2-pygobject)
376 ("python2-lxml" ,python2-lxml)
377 ("python2-netifaces" ,python2-netifaces)
378 ("python2-notify2" ,python2-notify2)
379 ("python2-protobuf" ,python2-protobuf)
380 ("python2-psutil" ,python2-psutil)
381 ("python2-requests" ,python2-requests)
382 ("python2-pyroute2" ,python2-pyroute2)
383 ("python2-setproctitle" ,python2-setproctitle)
384 ("python2-zeroconf" ,python2-zeroconf)))
385 (home-page "https://github.com/masmu/pulseaudio-dlna")
386 (synopsis "Stream audio to DLNA/UPnP and Chromecast devices")
387 (description "This lightweight streaming server brings DLNA/UPnP and
388Chromecast support to PulseAudio. It can stream your current PulseAudio
389playback to different UPnP devices (UPnP Media Renderers, including Sonos
390devices and some Smart TVs) or Chromecasts in your network. You should also
391install one or more of the following packages alongside pulseaudio-dlna:
392
393@itemize
394@item ffmpeg - transcoding support for multiple codecs
395@item flac - FLAC transcoding support
396@item lame - MP3 transcoding support
397@item opus-tools - Opus transcoding support
398@item sox - WAV transcoding support
399@item vorbis-tools - Vorbis transcoding support
400@end itemize")
401 (license l:gpl3+))))
b2a6a784
AB
402
403(define-public pamixer
404 (package
405 (name "pamixer")
406 (version "1.4")
407 (source
408 (origin
409 (method git-fetch)
410 (uri (git-reference
b0e7b699 411 (url "https://github.com/cdemoulins/pamixer")
b2a6a784
AB
412 (commit version)))
413 (file-name (git-file-name name version))
414 (sha256
415 (base32 "1i14550n8paijwwnhksv5izgfqm3s5q2773bdfp6vyqybkll55f7"))))
416 (build-system gnu-build-system)
417 (arguments
418 `(#:tests? #f ; There is no test suite.
419 #:make-flags
420 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
421 #:phases
422 (modify-phases %standard-phases
423 (delete 'configure) ; There's no configure phase.
424 (add-before 'install 'mkdir-bin
425 (lambda _
426 (mkdir-p (string-append (assoc-ref %outputs "out") "/bin"))
427 #t)))))
428 (inputs
429 `(("boost" ,boost)
430 ("pulseaudio" ,pulseaudio)))
431 (home-page "https://github.com/cdemoulins/pamixer")
432 (synopsis "PulseAudio command line mixer")
433 (description
434 "pamixer is like amixer but for PulseAudio, allowing easy control of the
435volume levels of the sinks (get, set, decrease, increase, toggle mute, etc).")
436 (license l:gpl3+)))
d9e2f7b2
AB
437
438(define-public pasystray
439 (package
440 (name "pasystray")
441 (version "0.7.1")
442 (source
443 (origin
444 (method git-fetch)
445 (uri (git-reference
b0e7b699 446 (url "https://github.com/christophgysin/pasystray")
d9e2f7b2
AB
447 (commit (string-append name "-" version))))
448 (file-name (git-file-name name version))
449 (sha256
450 (base32 "0xx1bm9kimgq11a359ikabdndqg5q54pn1d1dyyjnrj0s41168fk"))))
451 (build-system gnu-build-system)
452 (arguments
453 `(#:phases
454 (modify-phases %standard-phases
455 (add-before 'bootstrap 'remove-bootstrap.sh
456 (lambda _
457 ;; Interferes with the bootstrap phase.
458 (delete-file "bootstrap.sh")
459 #t)))))
460 (native-inputs
461 `(("autoconf" ,autoconf)
462 ("automake" ,automake)
463 ("pkg-config" ,pkg-config)))
464 (inputs
465 `(("avahi" ,avahi)
466 ("gtk+" ,gtk+)
467 ("libnotify" ,libnotify)
468 ("libx11" ,libx11)
469 ("pulseaudio" ,pulseaudio)))
470 (home-page "https://github.com/christophgysin/pasystray")
471 (synopsis "PulseAudio controller for the system tray")
472 (description "@command{pasystray} enables control of various
473PulseAudio server settings from the X11 system tray. See the project
474README.md for a detailed list of features.")
475 (license l:lgpl2.1+)))
c1baf5a9
MR
476
477(define-public paprefs
478 (package
479 (name "paprefs")
480 (version "1.1")
481 (source
482 (origin
483 (method url-fetch)
484 (uri (string-append "https://www.freedesktop.org/software/pulseaudio/"
485 name "/" name "-" version ".tar.xz"))
486 (sha256
487 (base32
488 "189z5p20hk0xv9vwvym293503j4pwl03xqk9hl7cl6dwgv0l7wkf"))))
489 (build-system meson-build-system)
490 (native-inputs
491 `(("gettext" ,gettext-minimal)
492 ("pkg-config" ,pkg-config)))
493 (inputs
494 `(("gtkmm" ,gtkmm)
495 ("pulseaudio" ,pulseaudio)))
496 (home-page "https://freedesktop.org/software/pulseaudio/paprefs/")
497 (synopsis "Simple GTK based configuration dialog for the PulseAudio sound
498server")
499 (description "@command{paprefs} is a simple GTK based configuration
500dialog for the PulseAudio sound server. Note that this program can
501only configure local servers, and requires that a special module
502module-gsettings is loaded in the sound server.")
503 (license l:gpl2)))
a32605fe
PN
504
505(define-public rnnoise
506 (package
507 (name "rnnoise")
508 (version "0.9")
509 (source
510 (origin
511 (method git-fetch)
512 (uri (git-reference
513 (url "https://github.com/werman/noise-suppression-for-voice")
514 (commit (string-append "v" version))))
515 (file-name (git-file-name name version))
516 (sha256
517 (base32 "18bq5b50xw3d4r1ildinafpg3isb9y216430h4mm9wr3ir7h76a7"))))
518 (build-system cmake-build-system)
519 (arguments
520 ;; No tests.
521 '(#:tests? #f))
522 (inputs
523 `(;; TODO: Package VST to build the corresponding plugin.
524 ("pulseaudio" ,pulseaudio)))
525 (home-page "https://github.com/werman/noise-suppression-for-voice")
526 (synopsis "Real-time Noise suppression plugin based on Xiph's RNNoise")
527 (description "The plugin is meant to suppress a wide range of noise
528origins: computer fans, office, crowd, airplane, car, train, construction.
529
530Mild background noise is always suppressed, loud sounds, like
531clicking of mechanical keyboard, are suppressed while there is no voice
532however they are only reduced in volume when voice is present.
533
534The plugin is made to work with 1 or 2 channels (ladspa plugin),
53516 bit, 48000 Hz audio input.")
536 (license l:gpl3)))
59b8daf2
PN
537
538(define-public noisetorch
539 (package
540 (name "noisetorch")
541 (version "0.6.1-beta")
542 (source
543 (origin
544 (method git-fetch)
545 (uri (git-reference
546 (url "https://github.com/lawl/NoiseTorch")
547 (commit version)))
548 (file-name (git-file-name name version))
549 (sha256
550 (base32 "1jmh7204mhlabdn0azfjrm3kb944j24n0w0cwibqrs9lfgdn8k52"))))
551 (build-system go-build-system)
552 (arguments
553 `(#:import-path "github.com/lawl/NoiseTorch"
554 #:install-source? #f
555 #:phases
556 (modify-phases %standard-phases
557 (add-after 'unpack 'symlink-rnnoise
558 (lambda* (#:key inputs #:allow-other-keys)
559 (with-directory-excursion "src/github.com/lawl/NoiseTorch"
560 (let ((dir "librnnoise_ladspa/bin/ladspa")
561 (rnnoise (assoc-ref inputs "rnnoise")))
562 (mkdir-p dir)
563 (symlink (string-append rnnoise "/lib/ladspa/librnnoise_ladspa.so")
564 (string-append dir "/librnnoise_ladspa.so"))))
565 #t))
566 (add-after 'unpack 'gen-version.go
567 (lambda _
568 (with-directory-excursion "src/github.com/lawl/NoiseTorch"
569 (substitute* "main.go"
570 (("//go:generate go run scripts/embedversion\\.go") ""))
571 (with-output-to-file "version.go"
572 (lambda ()
573 (format #t "package main~%~%var version=~s~&" ,version))))
574 #t))
575 (add-before 'build 'go-generate
576 (lambda _
577 (with-directory-excursion "src/github.com/lawl/NoiseTorch"
578 (invoke "go" "generate")))))))
579 (inputs
580 `(("rnnoise" ,rnnoise)))
581 (home-page "https://github.com/lawl/NoiseTorch")
582 (synopsis "Real-time microphone noise suppression")
583 (description "NoiseTorch creates a virtual PulseAudio microphone that
584suppresses noise, in any application. Use whichever conferencing or VOIP
585application you like and simply select the NoiseTorch Virtual Microphone as
586input to torch the sound of your mechanical keyboard, computer fans, trains
587and the likes.")
588 (license l:gpl3)))