summaryrefslogtreecommitdiff
path: root/gnu/packages/audio.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-12-05 19:17:41 +0100
committerRicardo Wurmus <rekado@elephly.net>2021-12-05 19:17:41 +0100
commit9bc0f45df5d6aed217020b1183dca54989844fb0 (patch)
treed927e89949ff7f65b5059bc94273c53fd43d0763 /gnu/packages/audio.scm
parent6db3c536e89deb8a204e756f427614925a7d2582 (diff)
parent10554e0a57feeea470127a1d0441957d1776b0bd (diff)
downloadguix-patches-9bc0f45df5d6aed217020b1183dca54989844fb0.tar
guix-patches-9bc0f45df5d6aed217020b1183dca54989844fb0.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates-frozen
Diffstat (limited to 'gnu/packages/audio.scm')
-rw-r--r--gnu/packages/audio.scm55
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index a6238835bc..4dd813b73a 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -34,6 +34,7 @@
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2021 jgart <jgart@dismail.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -5532,6 +5533,60 @@ generator, generating audio signals out of Linux's /dev/dsp audio
device. There is support for mono and/or stereo and 8 or 16 bit samples.")
(license license:gpl2)))
+(define-public python-pysox
+ ;; PyPi does not include the data folder containing audio files for testing.
+ (let ((commit "3d0053381c24ae3490f759d4de87194b85789d36")
+ (revision "0"))
+ (package
+ (name "python-pysox")
+ (version (git-version "1.4.2" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rabitt/pysox")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0i62jx92vfpcr2z7lp69yzqdi9idfs3pifl3rzm2akc2c4cr1mac"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-sox
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((sox-store-path (assoc-ref inputs "sox"))
+ (sox-bin (string-append sox-store-path "/bin/sox")))
+ (substitute* "sox/__init__.py"
+ (("sox -h")
+ (string-append sox-bin " -h")))
+ (substitute* "sox/core.py"
+ (("\\['sox")
+ (string-append "['" sox-bin))))))
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest")))))))
+ (propagated-inputs
+ `(("python-numpy" ,python-numpy)
+ ("python-typing-extensions" ,python-typing-extensions)))
+ (native-inputs
+ `(("sox" ,sox)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-soundfile" ,python-soundfile)))
+ (home-page "https://github.com/rabitt/pysox")
+ (synopsis "Python wrapper around SoX")
+ (description "@code{python-pysox} is a wrapper around the @command{sox}
+command line tool. The API offers @code{Transformer} and @code{Combiner}
+classes that allow the user to incrementally build up effects and audio
+manipulations. @code{python-pysox} also provides methods for querying audio
+information such as sample rate, determining whether an audio file is silent,
+and much more.")
+ (license license:bsd-3))))
+
(define-public mda-lv2
(package
(name "mda-lv2")