diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-01-12 05:29:59 +0100 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-01-14 20:20:52 +0100 |
commit | bd383edb36ca232b93f7db1035970d0a2855ca07 (patch) | |
tree | 4a73f8e398ab3b4d32dbe83593085234e057ccb1 /pkgs/tools/audio | |
parent | 21453aa6d889f0a311a086d68a1dc8a5944cea8d (diff) |
larynx: init at 0.0.2
Diffstat (limited to 'pkgs/tools/audio')
-rw-r--r-- | pkgs/tools/audio/larynx/default.nix | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/tools/audio/larynx/default.nix b/pkgs/tools/audio/larynx/default.nix new file mode 100644 index 0000000000000..e0fb72e151a4c --- /dev/null +++ b/pkgs/tools/audio/larynx/default.nix @@ -0,0 +1,60 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkgconfig +, espeak-ng +, onnxruntime +, pcaudiolib +, larynx-train +}: + +let + pname = "larynx"; + version = "0.0.2"; +in +stdenv.mkDerivation { + inherit pname version; + + src = fetchFromGitHub { + owner = "rhasspy"; + repo = "larynx2"; + rev = "refs/tags/v${version}"; + hash = "sha256-6SZ1T2A1DyVmBH2pJBHJdsnniRuLrI/dthRTRRyVSQQ="; + }; + + sourceRoot = "source/src/cpp"; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace "/usr/local/include/onnxruntime" "${onnxruntime}" + ''; + + nativeBuildInputs = [ + cmake + pkgconfig + ]; + + buildInputs = [ + espeak-ng + onnxruntime + pcaudiolib + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + install -m 0755 larynx $out/bin + + runHook postInstall + ''; + + meta = with lib; { + changelog = "https://github.com/rhasspy/larynx2/releases/tag/v${version}"; + description = "A fast, local neural text to speech system"; + homepage = "https://github.com/rhasspy/larynx2"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} |