Loading pkgs/applications/audio/flac/default.nix +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ stdenv.mkDerivation rec { homepage = "https://xiph.org/flac/"; description = "Library and tools for encoding and decoding the FLAC lossless audio file format"; changelog = "https://xiph.org/flac/changelog.html"; mainProgram = "flac"; platforms = platforms.all; license = licenses.bsd3; maintainers = with maintainers; [ ruuda ]; Loading pkgs/by-name/po/pocketsphinx/package.nix 0 → 100644 +66 −0 Original line number Diff line number Diff line { lib, stdenv, cmake, doxygen, fetchFromGitHub, gitUpdater, graphviz, gst_all_1, pkg-config, testers, }: stdenv.mkDerivation (finalAttrs: { pname = "pocketsphinx"; version = "5.0.3"; src = fetchFromGitHub { owner = "cmusphinx"; repo = "pocketsphinx"; rev = "refs/tags/v${finalAttrs.version}"; hash = "sha256-aCQpRmGHX08rA8UIt6Xf37XM34HysEzvcucLhL355k8="; }; nativeBuildInputs = [ cmake doxygen graphviz pkg-config ]; buildInputs = [ gst_all_1.gstreamer ]; cmakeFlags = [ (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) (lib.cmakeBool "BUILD_GSTREAMER" true) (lib.cmakeFeature "CMAKE_INSTALL_DATADIR" "${placeholder "data"}/share") ]; outputs = [ "out" "data" "dev" "lib" "man" ]; passthru = { updateScript = gitUpdater { rev-prefix = "v"; }; tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; }; meta = with lib; { description = "Small speech recognizer"; homepage = "https://github.com/cmusphinx/pocketsphinx"; changelog = "https://github.com/cmusphinx/pocketsphinx/blob/v${finalAttrs.version}/NEWS"; license = with licenses; [ bsd2 bsd3 mit ]; pkgConfigModules = [ "pocketsphinx" ]; mainProgram = "pocketsphinx"; maintainers = with maintainers; [ jopejoe1 ]; }; }) pkgs/development/python-modules/pocketsphinx/default.nix 0 → 100644 +57 −0 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, cmake, cython, fetchFromGitHub, memory-profiler, ninja, pathspec, pocketsphinx, pytestCheckHook, scikit-build, scikit-build-core, sounddevice, }: buildPythonPackage rec { inherit (pocketsphinx) version src; pname = "pocketsphinx"; pyproject = true; dontUseCmakeConfigure = true; env.CMAKE_ARGS = lib.cmakeBool "USE_INSTALLED_POCKETSPHINX" true; buildInputs = [ pocketsphinx ]; build-system = [ cmake cython ninja pathspec scikit-build-core ]; dependencies = [ sounddevice ]; nativeCheckInputs = [ memory-profiler pytestCheckHook ]; pythonImportsCheck = [ "pocketsphinx" ]; meta = with lib; { description = "Small speech recognizer"; homepage = "https://github.com/cmusphinx/pocketsphinx"; changelog = "https://github.com/cmusphinx/pocketsphinx/blob/v${version}/NEWS"; license = with licenses; [ bsd2 bsd3 mit ]; maintainers = with maintainers; [ jopejoe1 ]; }; } pkgs/development/python-modules/speechrecognition/default.nix +27 −12 Original line number Diff line number Diff line Loading @@ -2,10 +2,13 @@ lib, buildPythonPackage, fetchFromGitHub, numpy, flac, openai, openai-whisper, pocketsphinx, pyaudio, pytestCheckHook, pythonOlder, torch, requests, setuptools, soundfile, Loading @@ -26,29 +29,41 @@ buildPythonPackage rec { hash = "sha256-icXZUg2lVLo8Z5t9ptDj67BjQLnEgrG8geYZ/lZeJt4="; }; postPatch = '' # Remove Bundled binaries rm speech_recognition/flac-* rm -r third-party substituteInPlace speech_recognition/audio.py \ --replace-fail 'shutil_which("flac")' '"${lib.getExe flac}"' ''; build-system = [ setuptools ]; dependencies = [ pyaudio requests typing-extensions ]; nativeCheckInputs = [ numpy pytestCheckHook torch optional-dependencies = { whisper-api = [ openai ]; whisper-local = [ openai-whisper soundfile ]; }; nativeCheckInputs = [ pytestCheckHook pocketsphinx ] ++ optional-dependencies.whisper-local ++ optional-dependencies.whisper-api; pythonImportsCheck = [ "speech_recognition" ]; disabledTests = [ # Test files are missing in source "test_flac" # Attribute error "test_whisper" # PocketSphinx is not available in Nixpkgs "test_sphinx" # Parsed string does not match expected "test_sphinx_keywords" ]; meta = with lib; { Loading pkgs/top-level/python-packages.nix +4 −0 Original line number Diff line number Diff line Loading @@ -10559,6 +10559,10 @@ self: super: with self; { pocket = callPackage ../development/python-modules/pocket { }; pocketsphinx = callPackage ../development/python-modules/pocketsphinx { inherit (pkgs) pocketsphinx; }; podcastparser = callPackage ../development/python-modules/podcastparser { }; podcats = callPackage ../development/python-modules/podcats { }; Loading Loading
pkgs/applications/audio/flac/default.nix +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ stdenv.mkDerivation rec { homepage = "https://xiph.org/flac/"; description = "Library and tools for encoding and decoding the FLAC lossless audio file format"; changelog = "https://xiph.org/flac/changelog.html"; mainProgram = "flac"; platforms = platforms.all; license = licenses.bsd3; maintainers = with maintainers; [ ruuda ]; Loading
pkgs/by-name/po/pocketsphinx/package.nix 0 → 100644 +66 −0 Original line number Diff line number Diff line { lib, stdenv, cmake, doxygen, fetchFromGitHub, gitUpdater, graphviz, gst_all_1, pkg-config, testers, }: stdenv.mkDerivation (finalAttrs: { pname = "pocketsphinx"; version = "5.0.3"; src = fetchFromGitHub { owner = "cmusphinx"; repo = "pocketsphinx"; rev = "refs/tags/v${finalAttrs.version}"; hash = "sha256-aCQpRmGHX08rA8UIt6Xf37XM34HysEzvcucLhL355k8="; }; nativeBuildInputs = [ cmake doxygen graphviz pkg-config ]; buildInputs = [ gst_all_1.gstreamer ]; cmakeFlags = [ (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) (lib.cmakeBool "BUILD_GSTREAMER" true) (lib.cmakeFeature "CMAKE_INSTALL_DATADIR" "${placeholder "data"}/share") ]; outputs = [ "out" "data" "dev" "lib" "man" ]; passthru = { updateScript = gitUpdater { rev-prefix = "v"; }; tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; }; meta = with lib; { description = "Small speech recognizer"; homepage = "https://github.com/cmusphinx/pocketsphinx"; changelog = "https://github.com/cmusphinx/pocketsphinx/blob/v${finalAttrs.version}/NEWS"; license = with licenses; [ bsd2 bsd3 mit ]; pkgConfigModules = [ "pocketsphinx" ]; mainProgram = "pocketsphinx"; maintainers = with maintainers; [ jopejoe1 ]; }; })
pkgs/development/python-modules/pocketsphinx/default.nix 0 → 100644 +57 −0 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, cmake, cython, fetchFromGitHub, memory-profiler, ninja, pathspec, pocketsphinx, pytestCheckHook, scikit-build, scikit-build-core, sounddevice, }: buildPythonPackage rec { inherit (pocketsphinx) version src; pname = "pocketsphinx"; pyproject = true; dontUseCmakeConfigure = true; env.CMAKE_ARGS = lib.cmakeBool "USE_INSTALLED_POCKETSPHINX" true; buildInputs = [ pocketsphinx ]; build-system = [ cmake cython ninja pathspec scikit-build-core ]; dependencies = [ sounddevice ]; nativeCheckInputs = [ memory-profiler pytestCheckHook ]; pythonImportsCheck = [ "pocketsphinx" ]; meta = with lib; { description = "Small speech recognizer"; homepage = "https://github.com/cmusphinx/pocketsphinx"; changelog = "https://github.com/cmusphinx/pocketsphinx/blob/v${version}/NEWS"; license = with licenses; [ bsd2 bsd3 mit ]; maintainers = with maintainers; [ jopejoe1 ]; }; }
pkgs/development/python-modules/speechrecognition/default.nix +27 −12 Original line number Diff line number Diff line Loading @@ -2,10 +2,13 @@ lib, buildPythonPackage, fetchFromGitHub, numpy, flac, openai, openai-whisper, pocketsphinx, pyaudio, pytestCheckHook, pythonOlder, torch, requests, setuptools, soundfile, Loading @@ -26,29 +29,41 @@ buildPythonPackage rec { hash = "sha256-icXZUg2lVLo8Z5t9ptDj67BjQLnEgrG8geYZ/lZeJt4="; }; postPatch = '' # Remove Bundled binaries rm speech_recognition/flac-* rm -r third-party substituteInPlace speech_recognition/audio.py \ --replace-fail 'shutil_which("flac")' '"${lib.getExe flac}"' ''; build-system = [ setuptools ]; dependencies = [ pyaudio requests typing-extensions ]; nativeCheckInputs = [ numpy pytestCheckHook torch optional-dependencies = { whisper-api = [ openai ]; whisper-local = [ openai-whisper soundfile ]; }; nativeCheckInputs = [ pytestCheckHook pocketsphinx ] ++ optional-dependencies.whisper-local ++ optional-dependencies.whisper-api; pythonImportsCheck = [ "speech_recognition" ]; disabledTests = [ # Test files are missing in source "test_flac" # Attribute error "test_whisper" # PocketSphinx is not available in Nixpkgs "test_sphinx" # Parsed string does not match expected "test_sphinx_keywords" ]; meta = with lib; { Loading
pkgs/top-level/python-packages.nix +4 −0 Original line number Diff line number Diff line Loading @@ -10559,6 +10559,10 @@ self: super: with self; { pocket = callPackage ../development/python-modules/pocket { }; pocketsphinx = callPackage ../development/python-modules/pocketsphinx { inherit (pkgs) pocketsphinx; }; podcastparser = callPackage ../development/python-modules/podcastparser { }; podcats = callPackage ../development/python-modules/podcats { }; Loading