Merge pull request #264476 from mweinelt/wyoming-piper-1.4.0

wyoming-piper: 1.3.2 -> 1.4.0
This commit is contained in:
Martin Weinelt 2023-11-02 02:07:35 +01:00 committed by GitHub
commit 8858191857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 44 deletions

View file

@ -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

View file

@ -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 ];
};