aboutsummaryrefslogtreecommitdiff
path: root/app/backends/audiocpp/constants.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-08-26 02:25:55 -0400
committerhistoria <historiavg@proton.me>2026-08-26 02:25:55 -0400
commit8b5c8697740ff415cf7f1d03c9fb5a8c8851d420 (patch)
tree28c0323c54c896af5f89fb34b89a62e0fe0df291 /app/backends/audiocpp/constants.py
parentacbd9ff2c91182d96c57ffb57bee6e9b3fcbcbd4 (diff)
downloadtts-audiobook-generator-8b5c8697740ff415cf7f1d03c9fb5a8c8851d420.tar.gz
refactor: audiocpp.py setup flow
Diffstat (limited to 'app/backends/audiocpp/constants.py')
-rw-r--r--app/backends/audiocpp/constants.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/app/backends/audiocpp/constants.py b/app/backends/audiocpp/constants.py
new file mode 100644
index 0000000..aaa1eed
--- /dev/null
+++ b/app/backends/audiocpp/constants.py
@@ -0,0 +1,32 @@
+"""Constants shared across the audio.cpp backend modules."""
+
+import re
+from pathlib import Path
+
+DEFAULT_HOST = "127.0.0.1"
+
+
+FALLBACK_PORT = 8080
+
+
+BACKENDS = ("cuda", "vulkan", "hip", "cpu")
+
+
+TASK_TTS = "tts"
+
+
+TASK_VDES = "vdes"
+
+
+AUDIOCPP_DIR_NAME = "audio.cpp"
+
+
+AUDIOCPP_GIT_URL = "https://github.com/0xShug0/audio.cpp"
+
+
+
+# ggml build patches shipped in this repo and applied to the (gitignored)
+# audio.cpp checkout before building, so a fresh clone survives known ggml
+# build bugs the audio.cpp fork has not re-vendored yet. See
+# apply_ggml_patches() in backends.audiocpp.build.
+PATCH_DIR = Path(__file__).resolve().parent / "patches"