1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4
5# dependencies
6, einops
7, numpy
8, torch-bin
9, torchaudio-bin
10}:
11
12buildPythonPackage rec {
13 pname = "encodec";
14 version = "0.1.1";
15 format = "setuptools";
16
17 src = fetchFromGitHub {
18 owner = "facebookresearch";
19 repo = "encodec";
20 rev = "v${version}";
21 hash = "sha256-+iJZkX1HoyuNFu9VRxMO6aAzNQybkH9lrQJ5Ao9+/CY=";
22 };
23
24 propagatedBuildInputs = [
25 einops
26 numpy
27 torch-bin
28 torchaudio-bin
29 ];
30
31 pythonImportsCheck = [ "encodec" ];
32
33 # requires model data from the internet
34 doCheck = false;
35
36 meta = with lib; {
37 description = "State-of-the-art deep learning based audio codec supporting both mono 24 kHz audio and stereo 48 kHz audio";
38 homepage = "https://github.com/facebookresearch/encodec";
39 changelog = "https://github.com/facebookresearch/encodec/blob/${src.rev}/CHANGELOG.md";
40 license = licenses.mit;
41 maintainers = with maintainers; [ hexa ];
42 };
43}