From 3c5aed34337632498e410f527ab06d37356a1f79 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Fri, 9 Feb 2024 22:14:59 +0000 Subject: [PATCH] python3Packages.torch-audiomentations: init at 0.11.0 --- .../torch-audiomentations/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/torch-audiomentations/default.nix diff --git a/pkgs/development/python-modules/torch-audiomentations/default.nix b/pkgs/development/python-modules/torch-audiomentations/default.nix new file mode 100644 index 000000000000..3d2ea51aa62d --- /dev/null +++ b/pkgs/development/python-modules/torch-audiomentations/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, wheel +, julius +, librosa +, torch +, torchaudio +, torch-pitch-shift +}: + +buildPythonPackage rec { + pname = "torch-audiomentations"; + version = "0.11.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "asteroid-team"; + repo = "torch-audiomentations"; + rev = "v${version}"; + hash = "sha256-r3J8yo3+jjuD4qqpC5Ax3TFPL9pGUNc0EksTkCTJKbU="; + }; + + propagatedBuildInputs = [ + julius + librosa + torch + torchaudio + torch-pitch-shift + ]; + + nativeBuildInputs = [ + setuptools + wheel + ]; + + pythonImportsCheck = [ "torch_audiomentations" ]; + + meta = with lib; { + description = "Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning"; + homepage = "https://github.com/asteroid-team/torch-audiomentations"; + license = licenses.mit; + maintainers = with maintainers; [ matthewcroughan ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e51157c2e53d..e2366a0b49d4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14650,6 +14650,8 @@ self: super: with self; { inherit (pkgs.darwin) libobjc; }; + torch-audiomentations = callPackage ../development/python-modules/torch-audiomentations { }; + torch-pitch-shift = callPackage ../development/python-modules/torch-pitch-shift { }; torch-bin = callPackage ../development/python-modules/torch/bin.nix {