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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
hatchling,
# dependencies
beartype,
einops,
fastapi,
huggingface-hub,
numpy,
pydantic,
python-multipart,
requests,
safetensors,
scipy,
sentencepiece,
torch,
typer,
typing-extensions,
uvicorn,
# optional-dependencies
soundfile,
}:
buildPythonPackage (finalAttrs: {
pname = "pocket-tts";
version = "1.0.2";
pyproject = true;
src = fetchFromGitHub {
owner = "kyutai-labs";
repo = "pocket-tts";
tag = "v${finalAttrs.version}";
hash = "sha256-m//UCZEENE5bl9TV0rDCA3Th1TykvC5oZLay+f7lEr8=";
};
build-system = [
hatchling
];
pythonRelaxDeps = [
"beartype"
"python-multipart"
];
dependencies = [
beartype
einops
fastapi
huggingface-hub
numpy
pydantic
python-multipart
requests
safetensors
scipy
sentencepiece
torch
typer
typing-extensions
uvicorn
];
optional-dependencies = {
audio = [
soundfile
];
};
pythonImportsCheck = [ "pocket_tts" ];
# All tests are failing as the model cannot be downloaded from the sandbox
doCheck = false;
meta = {
description = "Lightweight text-to-speech (TTS) application designed to run efficiently on CPUs";
homepage = "https://github.com/kyutai-labs/pocket-tts";
changelog = "https://github.com/kyutai-labs/pocket-tts/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ GaetanLepage ];
mainProgram = "pocket-tts";
};
})
|