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