diff --git a/pkgs/by-name/po/pocket-tts/package.nix b/pkgs/by-name/po/pocket-tts/package.nix new file mode 100644 index 000000000000..4c0c7c28d0de --- /dev/null +++ b/pkgs/by-name/po/pocket-tts/package.nix @@ -0,0 +1 @@ +{ python3Packages }: with python3Packages; toPythonApplication pocket-tts diff --git a/pkgs/development/python-modules/pocket-tts/default.nix b/pkgs/development/python-modules/pocket-tts/default.nix new file mode 100644 index 000000000000..2ef871f5428c --- /dev/null +++ b/pkgs/development/python-modules/pocket-tts/default.nix @@ -0,0 +1,78 @@ +{ + 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, +}: + +buildPythonPackage (finalAttrs: { + pname = "pocket-tts"; + version = "1.0.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "kyutai-labs"; + repo = "pocket-tts"; + tag = "v${finalAttrs.version}"; + hash = "sha256-VFLpUsHnQYSr5RgNKJOX1TD30o1A8rG4cs2VeZWriaU="; + }; + + 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 + ]; + + 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"; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1ed705affa04..bb96a9c85bfc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12402,6 +12402,8 @@ self: super: with self; { pocket = callPackage ../development/python-modules/pocket { }; + pocket-tts = callPackage ../development/python-modules/pocket-tts { }; + pocketsphinx = callPackage ../development/python-modules/pocketsphinx { inherit (pkgs) pocketsphinx; };