From: 
Subject: Debian changes

The Debian packaging of python-pyopen-wakeword is maintained in git, using a workflow
similar to the one described in dgit-maint-merge(7).
The Debian delta is represented by this one combined patch; there isn't a
patch queue that can be represented as a quilt series.

A detailed breakdown of the changes is available from their canonical
representation -- git commits in the packaging repository.
For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:

    % git clone https://git.dgit.debian.org/python-pyopen-wakeword
    % cd python-pyopen-wakeword
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

(If you have dgit, use `dgit clone python-pyopen-wakeword`, rather than plain `git clone`.)

We don't use debian/source/options single-debian-patch because it has bugs.
Therefore, NMUs etc. may nevertheless have made additional patches.

---

diff --git a/pyopen_wakeword/openwakeword.py b/pyopen_wakeword/openwakeword.py
index eb8dfcf..c3701e9 100644
--- a/pyopen_wakeword/openwakeword.py
+++ b/pyopen_wakeword/openwakeword.py
@@ -1,6 +1,7 @@
 """openWakeWord implementation."""
 
 import ctypes as C
+import ctypes.util
 from collections.abc import Iterable
 from pathlib import Path
 from typing import Final, Optional, Union
@@ -15,6 +16,7 @@ _REPO_DIR = _DIR.parent
 _MODULE_LIB_DIR = _DIR / "lib"
 _REPO_LIB_DIR = _REPO_DIR / "lib"
 _MODELS_DIR = _DIR / "models"
+_SYSTEM_TENSORFLOW_LITE = "tensorflow-lite"
 
 c_void_p = C.c_void_p
 c_int32 = C.c_int32
@@ -389,7 +391,7 @@ class OpenWakeWordFeatures(TfLiteWakeWord):
 # -----------------------------------------------------------------------------
 
 
-def _find_tensorflowlite_c() -> Path:
+def _find_tensorflowlite_c() -> Union[str, Path]:
     # Try module lib dir first (inside wheel)
     libtensorflowlite_c_path = next(
         iter(_MODULE_LIB_DIR.glob("*tensorflowlite_c.*")), None
@@ -404,6 +406,9 @@ def _find_tensorflowlite_c() -> Path:
         lib_dir = _REPO_LIB_DIR / platform
         libtensorflowlite_c_path = next(iter(lib_dir.glob("*tensorflowlite_c.*")), None)
 
+    if not libtensorflowlite_c_path:
+        libtensorflowlite_c_path = ctypes.util.find_library(_SYSTEM_TENSORFLOW_LITE)
+
     if not libtensorflowlite_c_path:
         raise ValueError("Failed to find tensorflowlite_c library")
 
diff --git a/pyopen_wakeword/wakeword.py b/pyopen_wakeword/wakeword.py
index 26fcd01..c2d1c98 100644
--- a/pyopen_wakeword/wakeword.py
+++ b/pyopen_wakeword/wakeword.py
@@ -27,7 +27,13 @@ def _not_null(result, func, args):
 
 class TfLiteWakeWord:
     def __init__(self, libtensorflowlite_c_path: Union[str, Path]):
-        self.libtensorflowlite_c_path = Path(libtensorflowlite_c_path).resolve()
+        libtensorflowlite_c_path = os.fspath(libtensorflowlite_c_path)
+        if os.path.dirname(libtensorflowlite_c_path):
+            self.libtensorflowlite_c_path: Union[str, Path] = Path(
+                libtensorflowlite_c_path
+            ).resolve()
+        else:
+            self.libtensorflowlite_c_path = libtensorflowlite_c_path
 
         if sys.platform == "win32":
             self.lib = C.CDLL(str(self.libtensorflowlite_c_path))
diff --git a/pyproject.toml b/pyproject.toml
index 3d0a19b..b7a8502 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -31,6 +31,9 @@ dependencies = [
 [project.urls]
 "Source Code" = "https://github.com/rhasspy/pyopen-wakeword"
 
+[project.scripts]
+pyopen-wakeword = "pyopen_wakeword.__main__:main"
+
 [tool.setuptools]
 platforms = ["any"]
 zip-safe  = false
