From b615790a5ff41ab173781f98ec796f81a972a11e Mon Sep 17 00:00:00 2001 From: jgart Date: Tue, 30 Nov 2021 12:59:59 -0500 Subject: gnu: Add python-resampy. * gnu/packages/audio.scm (python-resampy): New variable. Signed-off-by: Mathieu Othacehe --- gnu/packages/audio.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 05c6354e45..bf647eabaf 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -103,6 +103,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) ;libsndfile, libsamplerate #:use-module (gnu packages python) + #:use-module (gnu packages python-science) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages rdf) @@ -5443,6 +5444,43 @@ information such as sample rate, determining whether an audio file is silent, and much more.") (license license:bsd-3)))) +(define-public python-resampy + (package + (name "python-resampy") + (version "0.2.2") + (source + (origin + (method git-fetch) + (uri + (git-reference + ;; PyPi does not include tests. + (url "https://github.com/bmcfee/resampy") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0qmkxl5sbgh0j73n667vyi7ywzh09iaync91yp1j5rrcmwsn0qfs")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "tests"))))))) + (propagated-inputs + (list python-numba python-numpy python-scipy python-six)) + (native-inputs + (list python-pytest python-pytest-cov)) + (home-page "https://github.com/bmcfee/resampy") + (synopsis "Efficient signal resampling") + (description + "@code{python-resampy} implements the band-limited sinc interpolation +method for sampling rate conversion as described by Julius O. Smith at the +@url{https://ccrma.stanford.edu/~jos/resample/, Digital Audio Resampling +Home Page}.") + (license license:isc))) + (define-public mda-lv2 (package (name "mda-lv2") -- cgit v1.2.3