From ecf43257a4298d1e3bd4bb10c210c3c4dbc07ac7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 16 Apr 2026 17:51:16 +0200 Subject: [PATCH] python3Packages.speechrecognition: 3.14.3 -> 3.16.0 Changelog: https://github.com/Uberi/speech_recognition/releases/tag/3.16.0 --- .../speechrecognition/default.nix | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/speechrecognition/default.nix b/pkgs/development/python-modules/speechrecognition/default.nix index 61b0da9c3358..9eaa09b20a85 100644 --- a/pkgs/development/python-modules/speechrecognition/default.nix +++ b/pkgs/development/python-modules/speechrecognition/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, fetchFromGitHub, cacert, + cohere, faster-whisper, flac, google-cloud-speech, @@ -12,6 +13,7 @@ openai, pocketsphinx, pyaudio, + pytest-httpserver, pytestCheckHook, requests, respx, @@ -21,16 +23,16 @@ typing-extensions, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "speechrecognition"; - version = "3.14.3"; + version = "3.16.0"; pyproject = true; src = fetchFromGitHub { owner = "Uberi"; repo = "speech_recognition"; - tag = version; - hash = "sha256-g//KKxPRe1pWVJo7GsRNIV59r0J7XJEoXvH0tGuV3Jk="; + tag = finalAttrs.version; + hash = "sha256-EIDhWx1s1B0DX4Vmd/a8hRnTBgdBx9ALOonOWFPgUOg="; }; postPatch = '' @@ -52,6 +54,7 @@ buildPythonPackage rec { optional-dependencies = { assemblyai = [ requests ]; audio = [ pyaudio ]; + cohere = [ cohere ]; faster-whisper = [ faster-whisper ]; google-cloud = [ google-cloud-speech ]; groq = [ @@ -67,15 +70,17 @@ buildPythonPackage rec { openai-whisper soundfile ]; + # vosk = [ vosk ]; }; nativeCheckInputs = [ groq + pytest-httpserver pytestCheckHook pocketsphinx respx ] - ++ lib.concatAttrValues optional-dependencies; + ++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies); pythonImportsCheck = [ "speech_recognition" ]; @@ -84,14 +89,19 @@ buildPythonPackage rec { "test_sphinx_keywords" ]; + disabledTestPaths = [ + # vosk is not available in nixpkgs + "tests/recognizers/test_vosk.py" + ]; + meta = { description = "Speech recognition module for Python, supporting several engines and APIs, online and offline"; homepage = "https://github.com/Uberi/speech_recognition"; - changelog = "https://github.com/Uberi/speech_recognition/releases/tag/${src.tag}"; + changelog = "https://github.com/Uberi/speech_recognition/releases/tag/${finalAttrs.src.tag}"; license = with lib.licenses; [ gpl2Only bsd3 ]; maintainers = with lib.maintainers; [ fab ]; }; -} +})