You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -505,6 +505,7 @@ cat > server.json <<'JSON'
505
505
{
506
506
"host": "127.0.0.1",
507
507
"port": 8080,
508
+
"backend": "cuda",
508
509
"device": 0,
509
510
"threads": 1,
510
511
"lazy_load": true,
@@ -536,6 +537,8 @@ JSON
536
537
537
538
Set `"lazy_load": true` to register configured model ids at startup while loading each model only on first use. Use per-model `"lazy": true` or `"lazy": false` to override that default.
538
539
540
+
Set top-level `"backend"` to `"cuda"`, `"cpu"`, `"vulkan"`, or `"metal"`. CUDA is the optimized path for audio.cpp; CPU, Vulkan, and Metal are intended for portability and testing when the binary is built with that backend, but performance and model coverage may be lower.
541
+
539
542
> [!WARNING]
540
543
> Lazy loading does not unload models after a request. Once a model is first used, the server keeps that model and session in memory for reuse until the server exits.
Copy file name to clipboardExpand all lines: app/server/README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# audio.cpp Server
2
2
3
-
`audiocpp_server` is a CUDA-only HTTP adapter over the framework runtime registry. It keeps one loaded model and one offline task session per active model id, so repeated HTTP requests reuse the same framework session and model-owned graph/cache state.
3
+
`audiocpp_server` is an HTTP adapter over the framework runtime registry. It keeps one loaded model and one offline task session per active model id, so repeated HTTP requests reuse the same framework session and model-owned graph/cache state.
Enable the backend you plan to run: `ENGINE_ENABLE_CUDA=ON` for CUDA, `ENGINE_ENABLE_VULKAN=ON` for Vulkan, or `ENGINE_ENABLE_METAL=ON` for Metal. CPU support is always available.
13
+
12
14
## Config
13
15
14
16
```bash
15
17
cat > server.json <<'JSON'
16
18
{
17
19
"host": "127.0.0.1",
18
20
"port": 8080,
21
+
"backend": "cuda",
19
22
"device": 0,
20
23
"threads": 1,
21
24
"lazy_load": true,
@@ -47,6 +50,8 @@ JSON
47
50
48
51
The server resolves model paths from this JSON exactly as written, so use paths that match your machine. Request-time audio paths are also user-provided paths.
49
52
53
+
Set top-level `"backend"` to `"cuda"`, `"cpu"`, `"vulkan"`, or `"metal"`. CUDA is the optimized path for audio.cpp; CPU, Vulkan, and Metal are intended for portability and testing when the binary is built with that backend, but performance and model coverage may be lower. The server prints this expectation-setting message when a non-CUDA backend is selected.
54
+
50
55
Set top-level `"lazy_load": true` to register all configured model ids at startup but defer each model's framework load and session creation until its first request. A model can override the default with `"lazy": true` or `"lazy": false`.
51
56
52
57
> [!WARNING]
@@ -58,6 +63,12 @@ Set top-level `"lazy_load": true` to register all configured model ids at startu
58
63
build/bin/audiocpp_server --config server.json
59
64
```
60
65
66
+
You can override the configured backend at startup:
0 commit comments