2022-12-28 21:21:41 +00:00
|
|
|
{ stdenv, lib, fetchurl, autoPatchelfHook, bzip2, lzma }:
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "stt";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "1.4.0";
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-12-28 21:21:41 +00:00
|
|
|
url = "https://github.com/coqui-ai/STT/releases/download/v${version}/native_client.tflite.Linux.tar.xz";
|
|
|
|
hash = "sha256-RVYc64pLYumQoVUEFZdxfUUaBMozaqgD0h/yiMaWN90=";
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
setSourceRoot = "sourceRoot=`pwd`";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-12-28 21:21:41 +00:00
|
|
|
bzip2
|
|
|
|
lzma
|
2021-05-28 09:39:13 +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-28 21:21:41 +00:00
|
|
|
install -D libkenlm.so $out/lib/libkenlm.so
|
|
|
|
install -D libsox.so.3 $out/lib/libsox.so.3
|
2021-05-28 09:39:13 +00:00
|
|
|
install -D libstt.so $out/lib/libstt.so
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/coqui-ai/STT";
|
2021-05-28 09:39:13 +00:00
|
|
|
description = "Deep learning toolkit for Speech-to-Text, battle-tested in research and production";
|
2022-07-14 12:49:19 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-05-28 09:39:13 +00:00
|
|
|
license = licenses.mpl20;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ rvolosatovs ];
|
|
|
|
};
|
|
|
|
}
|