1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 packaging,
7 primepy,
8 torch,
9 torchaudio,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "torch-pitch-shift";
15 version = "1.2.5";
16 pyproject = true;
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "KentoNishi";
22 repo = "torch-pitch-shift";
23 tag = "v${version}";
24 hash = "sha256-QuDz9IpmBdzfMjwAuG2Ln0x2OL/w3RVd/EfO4Ws78dw=";
25 };
26
27 pythonRelaxDeps = [ "torchaudio" ];
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 packaging
33 primepy
34 torch
35 torchaudio
36 ];
37
38 # Module has no tests
39 doCheck = false;
40
41 pythonImportsCheck = [ "torch_pitch_shift" ];
42
43 meta = with lib; {
44 description = "Pitch-shift audio clips quickly with PyTorch (CUDA supported)! Additional utilities for searching efficient transformations are included";
45 homepage = "https://github.com/KentoNishi/torch-pitch-shift";
46 changelog = "https://github.com/KentoNishi/torch-pitch-shift/releases/tag/v${version}";
47 license = licenses.mit;
48 maintainers = with maintainers; [ matthewcroughan ];
49 };
50}