about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/audio/wyoming
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/audio/wyoming')
-rw-r--r--nixpkgs/pkgs/tools/audio/wyoming/openwakeword.nix34
-rw-r--r--nixpkgs/pkgs/tools/audio/wyoming/piper-entrypoint.patch32
-rw-r--r--nixpkgs/pkgs/tools/audio/wyoming/piper.nix36
3 files changed, 36 insertions, 66 deletions
diff --git a/nixpkgs/pkgs/tools/audio/wyoming/openwakeword.nix b/nixpkgs/pkgs/tools/audio/wyoming/openwakeword.nix
index d8450dac6983..83da563f3b3b 100644
--- a/nixpkgs/pkgs/tools/audio/wyoming/openwakeword.nix
+++ b/nixpkgs/pkgs/tools/audio/wyoming/openwakeword.nix
@@ -1,61 +1,51 @@
 { lib
-, python3
 , python3Packages
 , fetchFromGitHub
 , fetchpatch
 }:
 
-python3.pkgs.buildPythonApplication {
+python3Packages.buildPythonApplication rec {
   pname = "wyoming-openwakeword";
-  version = "1.5.1";
+  version = "1.8.1";
   pyproject = true;
 
   src = fetchFromGitHub {
     owner = "rhasspy";
-    repo = "rhasspy3";
-    rev = "e16d7d374a64f671db48142c7b635b327660ebcf";
-    hash = "sha256-SbWsRmR1hfuU3yJbuu+r7M43ugHeNwLgu5S8MqkbCQA=";
+    repo = "wyoming-openwakeword";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-N/EjdNQLsYLpJ4kOxY/z+/dMMmF1PPAIEEzSHfnZWaM=";
   };
 
   patches = [
     (fetchpatch {
       # import tflite entrypoint from tensorflow
-      url = "https://github.com/rhasspy/rhasspy3/commit/23b1bc9cf1e9aa78453feb11e27d5dafe26de068.patch";
-      hash = "sha256-fjLJ+VI4c8ABBWx1IjZ6nS8MGqdry4rgcThKiaAvz+Q=";
+      url = "https://github.com/rhasspy/wyoming-openwakeword/commit/8f4ba2750d8c545e77549a7230cdee1301dac09a.patch";
+      hash = "sha256-WPvywpGv0sYYVGc7he4bt7APIsa3ziKaWqpFlx3v+V8=";
     })
     (fetchpatch {
       # add commandline entrypoint
-      url = "https://github.com/rhasspy/rhasspy3/commit/7662b82cd85e16817a3c6f4153e855bf57436ac3.patch";
-      hash = "sha256-41CLkVDSAJJpZ5irwIf/Z4wHoCuKDrqFBAjKCx7ta50=";
+      url = "https://github.com/rhasspy/wyoming-openwakeword/commit/f40e5635543b2315217538dd89a9fe40fe817cfe.patch";
+      hash = "sha256-HNlGqt7bMzwyvhx5Hw7mkTHeQmBpgDCU3pUbZzss1bY=";
     })
   ];
 
-  postPatch = ''
-    cd programs/wake/openwakeword-lite/server
-  '';
-
   nativeBuildInputs = with python3Packages; [
     setuptools
-    wheel
   ];
 
   propagatedBuildInputs = with python3Packages; [
-    tensorflow-bin
-    webrtc-noise-gain
+    tensorflow
     wyoming
   ];
 
-  passthru.optional-dependencies.webrtc = with python3Packages; [
-    webrtc-noise-gain
-  ];
-
   pythonImportsCheck = [
     "wyoming_openwakeword"
   ];
 
   meta = with lib; {
+    changelog = "https://github.com/rhasspy/wyoming-openwakeword/blob/v${version}/CHANGELOG.md";
     description = "An open source voice assistant toolkit for many human languages";
-    homepage = "https://github.com/rhasspy/rhasspy3/commit/fe44635132079db74d0c76c6b3553b842aa1e318";
+    homepage = "https://github.com/rhasspy/wyoming-openwakeword";
     license = licenses.mit;
     maintainers = with maintainers; [ hexa ];
     mainProgram = "wyoming-openwakeword";
diff --git a/nixpkgs/pkgs/tools/audio/wyoming/piper-entrypoint.patch b/nixpkgs/pkgs/tools/audio/wyoming/piper-entrypoint.patch
deleted file mode 100644
index 4f7d09fd40ce..000000000000
--- a/nixpkgs/pkgs/tools/audio/wyoming/piper-entrypoint.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 05e42c1..8347acb 100644
---- a/setup.py
-+++ b/setup.py
-@@ -41,4 +41,9 @@ setup(
-         "Programming Language :: Python :: 3.10",
-     ],
-     keywords="rhasspy wyoming piper",
-+    entry_points={
-+        'console_scripts': [
-+            'wyoming-piper = wyoming_piper:__main__.run'
-+        ]
-+    }
- )
-diff --git a/wyoming_piper/__main__.py b/wyoming_piper/__main__.py
-index ab1580b..4c0a143 100755
---- a/wyoming_piper/__main__.py
-+++ b/wyoming_piper/__main__.py
-@@ -143,8 +143,12 @@ def get_description(voice_info: Dict[str, Any]):
- 
- # -----------------------------------------------------------------------------
- 
-+def run():
-+    asyncio.run(main())
-+
-+
- if __name__ == "__main__":
-     try:
--        asyncio.run(main())
-+        run()
-     except KeyboardInterrupt:
-         pass
diff --git a/nixpkgs/pkgs/tools/audio/wyoming/piper.nix b/nixpkgs/pkgs/tools/audio/wyoming/piper.nix
index fbc52a88aa20..f53f684f6fac 100644
--- a/nixpkgs/pkgs/tools/audio/wyoming/piper.nix
+++ b/nixpkgs/pkgs/tools/audio/wyoming/piper.nix
@@ -1,24 +1,35 @@
 { lib
-, python3
-, fetchPypi
+, python3Packages
+, fetchFromGitHub
+, fetchpatch
 }:
 
-python3.pkgs.buildPythonApplication rec {
+python3Packages.buildPythonApplication rec {
   pname = "wyoming-piper";
-  version = "1.3.2";
-  format = "setuptools";
+  version = "1.4.0";
+  pyproject = true;
 
-  src = fetchPypi {
-    pname = "wyoming_piper";
-    inherit version;
-    hash = "sha256-WyoHwIF3xC5nOa7iQ8/esfdwahbU6YJzK5G2Vi3mV4M=";
+  src = fetchFromGitHub {
+    owner = "rhasspy";
+    repo = "wyoming-piper";
+    # https://github.com/rhasspy/wyoming-piper/issues/3
+    rev = "560927437c72eca4d334ca503d15863f0b42980d";
+    hash = "sha256-Q4S96zs856zXVAGo4mB466an60naHiS2S/qxYxPE4sI=";
   };
 
   patches = [
-    ./piper-entrypoint.patch
+    (fetchpatch {
+      # add console script
+      url = "https://github.com/rhasspy/wyoming-piper/commit/4c27fbd067fd543adede4626fc5868a3f2458734.patch";
+      hash = "sha256-YPjDjeY9RLsgCtbBZoNgPyQTv3rbCJGcqTNSSwiqqEE=";
+    })
   ];
 
-  propagatedBuildInputs = with python3.pkgs; [
+  nativeBuildInputs = with python3Packages; [
+    setuptools
+  ];
+
+  propagatedBuildInputs = with python3Packages; [
     wyoming
   ];
 
@@ -29,8 +40,9 @@ python3.pkgs.buildPythonApplication rec {
   doCheck = false;
 
   meta = with lib; {
+    changelog = "https://github.com/rhasspy/wyoming-openwakeword/v${version}/master/CHANGELOG.md";
     description = "Wyoming Server for Piper";
-    homepage = "https://pypi.org/project/wyoming-piper/";
+    homepage = "https://github.com/rhasspy/wyoming-openwakeword";
     license = licenses.mit;
     maintainers = with maintainers; [ hexa ];
   };