about summary refs log tree commit diff
path: root/pkgs/tools/audio/wyoming/faster-whisper.nix
blob: bbef9e0813108b2830412fc9bb9287d2e7a4ec94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ lib
, python3
, fetchFromGitHub
, fetchpatch
}:

python3.pkgs.buildPythonApplication rec {
  pname = "wyoming-faster-whisper";
  version = "1.1.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "rhasspy";
    repo = "wyoming-faster-whisper";
    rev = "refs/tags/v${version}";
    hash = "sha256-RD6J/Q7kvd+sgTpR6ERyV+D8gpm0fF38L3U/Jp7gOgk=";
  };

  patches = [
    (fetchpatch {
      # fix setup.py
      url = "https://github.com/rhasspy/wyoming-faster-whisper/commit/cdd1536997a091dcf9054da9ff424a2603067755.patch";
      hash = "sha256-LGYo21FhKGXcAN9DjXzwIRqkOzTz3suXiQdgGrJSDBw=";
    })
  ];

  nativeBuildInputs = with python3.pkgs; [
    setuptools
    pythonRelaxDepsHook
  ];

  pythonRelaxDeps = [
    "wyoming"
  ];

  propagatedBuildInputs = with python3.pkgs; [
    ctranslate2
    tokenizers
    wyoming
  ];

  pythonImportsCheck = [
    "wyoming_faster_whisper"
  ];

  # no tests
  doCheck = false;

  meta = with lib; {
    description = "Wyoming Server for Faster Whisper";
    homepage = "https://github.com/rhasspy/wyoming-faster-whisper";
    license = licenses.mit;
    maintainers = with maintainers; [ hexa ];
  };
}