Subject: [PATCH 2/2] gnu: Add python-librosa.

From: jgart <[email-masked]>
Date: Tue, 30 Nov 2021 13:00:00 -0500

* gnu/packages/audio.scm (python-librosa): New variable.
---
 gnu/packages/audio.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

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