[PATCH 1/2] Add python-librosa

  • Done
  • quality assurance status badge
Details
2 participants
  • jgart
  • Mathieu Othacehe
Owner
unassigned
Submitted by
jgart
Severity
normal

Debbugs page

jgart wrote 3 years ago
(name . Guix Patches)(address . guix-patches@gnu.org)
20211130125304.GB10918@gac.attlocal.net
Hi Guixers,

Here is a patchset for librosa, a python library for music and audio analysis.


all best,

jgart
jgart wrote 3 years ago
[PATCH 1/2] gnu: Add python-resampy.
(address . 52203@debbugs.gnu.org)(name . jgart)(address . jgart@dismail.de)
20211130180000.11063-1-jgart@dismail.de
* gnu/packages/audio.scm (python-resampy): New variable.
---
gnu/packages/audio.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (62 lines)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 694ea1a21b..cc484c0b67 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -102,6 +102,7 @@ (define-module (gnu packages audio)
#: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)
@@ -5588,6 +5589,47 @@ (define-public python-pysox
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
+ `(("python-numba" ,python-numba)
+ ("python-numpy" ,python-numpy)
+ ("python-scipy" ,python-scipy)
+ ("python-six" ,python-six)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,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")
--
2.34.0
jgart wrote 3 years ago
[PATCH 2/2] gnu: Add python-librosa.
(address . 52203@debbugs.gnu.org)(name . jgart)(address . jgart@dismail.de)
20211130180000.11063-2-jgart@dismail.de
* gnu/packages/audio.scm (python-librosa): New variable.
---
gnu/packages/audio.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index cc484c0b67..b91b97f47e 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -90,6 +90,7 @@ (define-module (gnu packages audio)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
+ #:use-module (gnu packages machine-learning)
#:use-module (gnu packages man)
#:use-module (gnu packages maths)
#:use-module (gnu packages mp3) ;taglib
@@ -5630,6 +5631,39 @@ (define-public python-resampy
Home Page}.")
(license license:isc)))
+(define-public python-librosa
+ (package
+ (name "python-librosa")
+ (version "0.8.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "librosa" version))
+ (sha256
+ (base32 "1cx6rhcvak0hy6bx84jwzpxmwgi92m82w77279akwjmfd3khagf5"))))
+ (build-system python-build-system)
+ (arguments
+ ;; Tests require internet connection to download MATLAB scripts for
+ ;; generating the testing data.
+ `(#:tests? #f))
+ (propagated-inputs
+ `(("python-audioread" ,python-audioread)
+ ("python-decorator" ,python-decorator)
+ ("python-joblib" ,python-joblib)
+ ("python-numba" ,python-numba)
+ ("python-numpy" ,python-numpy)
+ ("python-packaging" ,python-packaging)
+ ("python-pooch" ,python-pooch)
+ ("python-resampy" ,python-resampy)
+ ("python-scikit-learn" ,python-scikit-learn)
+ ("python-scipy" ,python-scipy)
+ ("python-soundfile" ,python-soundfile)))
+ (home-page "https://librosa.org")
+ (synopsis "Python module for audio and music processing")
+ (description
+"@code{librosa} is a python package for music and audio analysis.")
+ (license license:isc)))
+
(define-public mda-lv2
(package
(name "mda-lv2")
--
2.34.0
Mathieu Othacehe wrote 3 years ago
Re: bug#52203: [PATCH 1/2] Add python-librosa
(name . jgart)(address . jgart@dismail.de)(address . 52203-done@debbugs.gnu.org)
87h7avnsil.fsf@gnu.org
Hello,

Toggle quote (2 lines)
> Here is a patchset for librosa, a python library for music and audio analysis.

Pushed with various cosmetic fixes.

Thanks,

Mathieu
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 52203@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 52203
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help