Fix voice sample validation on Python 3.13 (fixes #852) (#853)

* Fix voice sample validation on Python 3.13

Python 3.13 removed audioop from the standard library, which broke reference
audio validation when adding voice samples. Add the audioop-lts backport for
3.13+ installs and bundle audioop in PyInstaller builds on the same versions.

* style(tests): satisfy Ruff import ordering

---------

Co-authored-by: Jamie Pine <[email protected]>
This commit is contained in:
Aftaab Siddiqui
2026-07-20 22:35:40 -07:00
committed by Jamie Pine
co-authored by Jamie Pine
parent a3fa9a2784
commit 901ffcc93b
3 changed files with 127 additions and 0 deletions
+3
View File
@@ -330,6 +330,9 @@ def build_server(cuda=False, rocm=False):
]
)
if sys.version_info >= (3, 13):
args.extend(["--hidden-import", "audioop"])
# Add CUDA/ROCm-specific hidden imports
if cuda or rocm:
variant = "ROCm" if rocm else "CUDA"