diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 66af265cd0a..15b5a79ab1e 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -57,6 +57,7 @@ ;;; Copyright © 2025 Kjartan Oli Agustsson ;;; Copyright © 2024 Janneke Nieuwenhuizen ;;; Copyright © 2025 Antoine Côté +;;; Copyright © 2025 Evgenii Klimov ;;; ;;; This file is part of GNU Guix. ;;; @@ -247,6 +248,40 @@ promoting the market for advanced audio.") (home-page "https://www.khronos.org/opensles/") (license (license:non-copyleft "file:///LICENSE.txt")))) +(define-public python-sounddevice + (package + (name "python-sounddevice") + (version "0.5.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sounddevice" version)) + (sha256 + (base32 "0jcb8kzlv8vyp9wrznii3pv4gjcpr1f9f6jyzbqdc8p9shdxad66")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #false ; no tests + #:phases + #~(modify-phases %standard-phases + (add-after 'patch-generated-file-shebangs 'add-path-to-portaudio + (lambda* (#:key inputs #:allow-other-keys) + (substitute* + "sounddevice.py" + (("_find_library\\(_libname\\)") + (string-append "\"" + (search-input-file inputs + "/lib/libportaudio.so.2") + "\"")))))))) + (inputs (list portaudio)) + (propagated-inputs (list python-cffi python-numpy)) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://python-sounddevice.readthedocs.io/") + (synopsis "Play and record sound with Python") + (description "This Python module provides bindings for the PortAudio +library and a few convenience functions to play and record NumPy arrays +containing audio signals.") + (license license:expat))) + (define-public wildmidi (package (name "wildmidi")