1{
2 lib,
3 buildPythonPackage,
4 cmake,
5 cython,
6 memory-profiler,
7 ninja,
8 pathspec,
9 pocketsphinx,
10 pytestCheckHook,
11 scikit-build-core,
12 sounddevice,
13}:
14
15buildPythonPackage rec {
16 inherit (pocketsphinx) version src;
17 pname = "pocketsphinx";
18 pyproject = true;
19
20 dontUseCmakeConfigure = true;
21
22 env.CMAKE_ARGS = lib.cmakeBool "USE_INSTALLED_POCKETSPHINX" true;
23
24 buildInputs = [ pocketsphinx ];
25
26 build-system = [
27 cmake
28 cython
29 ninja
30 pathspec
31 scikit-build-core
32 ];
33
34 dependencies = [ sounddevice ];
35
36 nativeCheckInputs = [
37 memory-profiler
38 pytestCheckHook
39 ];
40
41 pythonImportsCheck = [ "pocketsphinx" ];
42
43 meta = with lib; {
44 description = "Small speech recognizer";
45 homepage = "https://github.com/cmusphinx/pocketsphinx";
46 changelog = "https://github.com/cmusphinx/pocketsphinx/blob/v${version}/NEWS";
47 license = with licenses; [
48 bsd2
49 bsd3
50 mit
51 ];
52 maintainers = with maintainers; [ jopejoe1 ];
53 };
54}