From bcac6c42eaf9e004716d72960bddefb1db68a93c Mon Sep 17 00:00:00 2001 From: historia Date: Tue, 25 Aug 2026 17:41:58 -0400 Subject: fix: build audio.cpp with --deployment-build --- app/backends/audiocpp.py | 4 ++-- app/docs/backend-audiocpp.md | 4 +++- app/tests/test_backends_audiocpp.py | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/backends/audiocpp.py b/app/backends/audiocpp.py index b950ac6..0feb480 100755 --- a/app/backends/audiocpp.py +++ b/app/backends/audiocpp.py @@ -1931,7 +1931,7 @@ def build_audiocpp(audiocpp_dir: Path, backend: str, *, common.record_post_tui_notice(message) return patch_rc argv = ["sh", str(script), "--backend", backend, "--target", - "audiocpp_server"] + "audiocpp_server", "--deployment-build"] command = f"cd {audiocpp_dir} && {shlex.join(argv)}" if emit is None: print(f"[INFO] Building audiocpp_server for {backend} ({command})...") @@ -2003,7 +2003,7 @@ def _print_launch_hint(audiocpp_dir: Path, output_path: Path, script = find_build_script(audiocpp_dir) if script is not None: print(f" sh {script} --backend " - "--target audiocpp_server") + "--target audiocpp_server --deployment-build") print(f" then run: cd {audiocpp_dir} && ./build/-" f"-release/bin/audiocpp_server --config {output_path}") diff --git a/app/docs/backend-audiocpp.md b/app/docs/backend-audiocpp.md index 926dc6a..318e629 100644 --- a/app/docs/backend-audiocpp.md +++ b/app/docs/backend-audiocpp.md @@ -15,9 +15,11 @@ Download and build `audiocpp_server` for your platform and backend `(cuda, vulka ```bash git clone https://github.com/0xShug0/audio.cpp cd audio.cpp -scripts/build_linux.sh --backend cuda --target audiocpp_server +scripts/build_linux.sh --backend cuda --target audiocpp_server --deployment-build ``` +`--deployment-build` compiles the `model_specs/` catalog into the binary so every family resolves its model contract even when the server is started outside the checkout (GGUF packages whose embedded spec is legacy, such as today's Qwen3-TTS ones, otherwise need `model_specs/.json` found relative to the working directory). The macOS script takes the same flag; the Windows PowerShell scripts take `-DeploymentBuild`. + ### Install models Download model packages with the python model manager script from the audio.cpp checkout. Each installs to `./models`. Here are two examples, Higgs Audio and Qwen3-TTS: diff --git a/app/tests/test_backends_audiocpp.py b/app/tests/test_backends_audiocpp.py index 7704ff4..e206ddd 100644 --- a/app/tests/test_backends_audiocpp.py +++ b/app/tests/test_backends_audiocpp.py @@ -915,6 +915,7 @@ class BuildAudiocppTests(unittest.TestCase): self.assertIn("cuda", argv) self.assertIn("--target", argv) self.assertIn("audiocpp_server", argv) + self.assertIn("--deployment-build", argv) self.assertEqual(run.call_args[1]["cwd"], self.checkout) def test_missing_script_returns_nonzero(self): @@ -966,7 +967,7 @@ class BuildAudiocppTests(unittest.TestCase): self.assertIn(f"Build log: {logs[0]}", notice) command = (f"cd {self.checkout} && sh " f"{self.scripts / 'build_linux.sh'} --backend cuda " - "--target audiocpp_server") + "--target audiocpp_server --deployment-build") self.assertIn(command, notice) self.assertIn("Troubleshoot by re-running this command", notice) self.assertTrue(any("failed (exit code 3)" in line -- cgit v1.2.3