2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
numpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
torch,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
|
|
|
soundfile,
|
|
|
|
typing-extensions,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "speechrecognition";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "3.10.4";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Uberi";
|
|
|
|
repo = "speech_recognition";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-icXZUg2lVLo8Z5t9ptDj67BjQLnEgrG8geYZ/lZeJt4=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
requests
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
numpy
|
|
|
|
pytestCheckHook
|
|
|
|
torch
|
|
|
|
soundfile
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "speech_recognition" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
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";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/Uberi/speech_recognition/releases/tag/${version}";
|
|
|
|
license = with licenses; [
|
|
|
|
gpl2Only
|
|
|
|
bsd3
|
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|