nixpkgs/pkgs/tools/audio/stt/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.0 KiB
Nix
Raw Normal View History

2023-03-24 22:15:11 +00:00
{ stdenv, lib, fetchurl, autoPatchelfHook, bzip2, xz }:
2021-03-23 23:12:59 +00:00
stdenv.mkDerivation rec {
pname = "stt";
2022-12-26 19:38:45 +00:00
version = "1.4.0";
2021-03-23 23:12:59 +00:00
src = fetchurl {
2022-12-26 19:38:45 +00:00
url = "https://github.com/coqui-ai/STT/releases/download/v${version}/native_client.tflite.Linux.tar.xz";
hash = "sha256-RVYc64pLYumQoVUEFZdxfUUaBMozaqgD0h/yiMaWN90=";
2021-03-23 23:12:59 +00:00
};
sourceRoot = ".";
2021-03-23 23:12:59 +00:00
nativeBuildInputs = [
autoPatchelfHook
];
buildInputs = [
2022-12-26 19:38:45 +00:00
bzip2
2023-03-24 22:15:11 +00:00
xz
2021-03-23 23:12:59 +00:00
stdenv.cc.cc.lib
];
installPhase = ''
install -D stt $out/bin/stt
install -D coqui-stt.h $out/include/coqui-stt.h
2022-12-26 19:38:45 +00:00
install -D libkenlm.so $out/lib/libkenlm.so
install -D libsox.so.3 $out/lib/libsox.so.3
install -D libstt.so $out/lib/libstt.so
2021-03-23 23:12:59 +00:00
'';
meta = with lib; {
homepage = "https://github.com/coqui-ai/STT";
description = "Deep learning toolkit for Speech-to-Text, battle-tested in research and production";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
2021-03-23 23:12:59 +00:00
license = licenses.mpl20;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ rvolosatovs ];
};
}