1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 wheel,
7 julius,
8 librosa,
9 torch,
10 torchaudio,
11 torch-pitch-shift,
12}:
13
14buildPythonPackage rec {
15 pname = "torch-audiomentations";
16 version = "0.11.1";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "asteroid-team";
21 repo = "torch-audiomentations";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-0+5wc+mP4c221q6mdaqPalfumTOtdnkjnIPtLErOp9E=";
24 };
25
26 propagatedBuildInputs = [
27 julius
28 librosa
29 torch
30 torchaudio
31 torch-pitch-shift
32 ];
33
34 nativeBuildInputs = [
35 setuptools
36 wheel
37 ];
38
39 pythonImportsCheck = [ "torch_audiomentations" ];
40
41 meta = with lib; {
42 description = "Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning";
43 homepage = "https://github.com/asteroid-team/torch-audiomentations";
44 license = licenses.mit;
45 maintainers = with maintainers; [ matthewcroughan ];
46 };
47}