python311Packages.speechrecognition: init at 3.10.1

Speech recognition module for Python, supporting several engines
and APIs, online and offline

https://github.com/Uberi/speech_recognition
This commit is contained in:
Fabian Affolter 2024-03-21 10:17:34 +01:00
parent 18b481134f
commit 71731f7967
2 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,63 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, pytestCheckHook
, pythonOlder
, torch
, requests
, setuptools
, soundfile
, typing-extensions
}:
buildPythonPackage rec {
pname = "speechrecognition";
version = "3.10.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "Uberi";
repo = "speech_recognition";
rev = "refs/tags/${version}";
hash = "sha256-lO1CW4j5aBnPtemNGsW8cytSa/H+Tb4Jpbfh4Z/0WHk=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
requests
typing-extensions
];
nativeCheckInputs = [
numpy
pytestCheckHook
torch
soundfile
];
pythonImportsCheck = [
"speech_recognition"
];
disabledTests = [
# Test files are missing in source
"test_flac"
# Attribute error
"test_whisper"
# PocketSphinx is not available in Nixpkgs
"test_sphinx"
];
meta = with lib; {
description = "Speech recognition module for Python, supporting several engines and APIs, online and offline";
homepage = "https://github.com/Uberi/speech_recognition";
license = with licenses; [ gpl2Only bsd3 ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -13910,6 +13910,8 @@ self: super: with self; {
speechbrain = callPackage ../development/python-modules/speechbrain { };
speechrecognition = callPackage ../development/python-modules/speechrecognition { };
speedtest-cli = callPackage ../development/python-modules/speedtest-cli { };
speg = callPackage ../development/python-modules/speg { };