This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / 5pkgs / vosk / package.nix
1.8 kB 67 lines
1{ 2 lib, 3 python3Packages, 4 fetchurl, 5 stdenv, 6 autoPatchelfHook, 7}: 8let 9 version = "0.3.44"; 10 11 # Platform-specific wheels 12 wheels = { 13 "x86_64-linux" = { 14 url = "https://files.pythonhosted.org/packages/py3/v/vosk/vosk-${version}-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl"; 15 hash = "sha256-JlLvITxMeAfcQK8eeqV43Mz8TcQZKCKia8RalZG8v3Y="; 16 }; 17 "aarch64-linux" = { 18 url = "https://files.pythonhosted.org/packages/py3/v/vosk/vosk-${version}-py3-none-manylinux2014_aarch64.whl"; 19 hash = "sha256-mZW3+lQ0sTS0vQmJfiSQ28VhFcKtKUPAMGIeEMcDezQ="; 20 }; 21 "x86_64-darwin" = { 22 url = "https://files.pythonhosted.org/packages/py3/v/vosk/vosk-${version}-py3-none-macosx_10_6_universal2.whl"; 23 hash = "sha256-Ap0LPWpc/4dMV1uKWBSkzM+zdgjP9S6EbAKoxnqIKAE="; 24 }; 25 "aarch64-darwin" = { 26 url = "https://files.pythonhosted.org/packages/py3/v/vosk/vosk-${version}-py3-none-macosx_10_6_universal2.whl"; 27 hash = "sha256-Ap0LPWpc/4dMV1uKWBSkzM+zdgjP9S6EbAKoxnqIKAE="; 28 }; 29 }; 30 31 wheel = 32 wheels.${stdenv.hostPlatform.system} 33 or (throw "Unsupported platform: ${stdenv.hostPlatform.system}"); 34in 35python3Packages.buildPythonPackage { 36 pname = "vosk"; 37 inherit version; 38 format = "wheel"; 39 40 src = fetchurl { 41 inherit (wheel) url hash; 42 }; 43 44 nativeBuildInputs = [ autoPatchelfHook ]; 45 46 buildInputs = [ stdenv.cc.cc.lib ]; 47 48 dependencies = with python3Packages; [ 49 cffi 50 requests 51 tqdm 52 srt 53 websockets 54 ]; 55 56 # Skip tests as they require audio files and models 57 doCheck = false; 58 59 pythonImportsCheck = [ "vosk" ]; 60 61 meta = { 62 description = "Offline speech recognition API based on Kaldi and Vosk"; 63 homepage = "https://alphacephei.com/vosk/"; 64 license = lib.licenses.asl20; 65 platforms = lib.attrNames wheels; 66 }; 67}