Native audio.cpp home workers
Native audio.cpp home workers
These profiles run the home push daemon (brioso-worker serve) with
BRIOSO_WORKER_MODEL=audiocpp. The M5 uses one resident audio.cpp server for
the beta and production worker processes. The NVIDIA profile remains a
single worker with the native CLI.
Use the exact profile templates as the starting point:
- NVIDIA RTX 4070 / CUDA:
apps/worker/.env.audiocpp-nvidia.example - Apple Silicon / Metal:
apps/worker/.env.audiocpp-apple-silicon.example
Copy one to the machine’s untracked apps/worker/.env, then set the shared
secret, worker id, telemetry endpoint, and absolute binary/model paths. Do not
set AUDIOCPP_BACKEND alone: BRIOSO_WORKER_MODEL=audiocpp is the model
selector; AUDIOCPP_BACKEND=cuda|metal only selects its accelerator.
Install and model preparation
Pin audio.cpp to v0.7.3. On Linux/CUDA, build that tagged source with CUDA
enabled and set AUDIOCPP_BIN to the audiocpp_cli path. On Apple Silicon,
use the v0.7.3 Metal audiocpp_server binary.
For the NVIDIA profile, download the F16 Medium GGUF to a normal local file
and record its path in AUDIOCPP_MODEL_PATH:
uv tool run --from huggingface_hub hf download \
audio-cpp/audio.cpp-gguf \
Stable-Audio-3-Medium-GGUF/stable-audio-3-medium-f16.gguf \
--local-dir /srv/brioso/models
The M5 server uses the q8_0 Medium variant
(stable-audio-3-medium-q8_0.gguf, ~3.4 GB) at the path in its PM2 JSON
config. Download the q8_0 sibling with the same command and copy it there.
NVIDIA can also use Q8 by updating AUDIOCPP_MODEL_PATH.
audio.cpp v0.7.3 uses a file extension to determine tensor format, so an HF
cache symlink resolves to a blob without .gguf and fails. The copied file
above is therefore a deployment requirement, not just a cache optimization.
NVIDIA RTX 4070 (CUDA)
- Copy the NVIDIA template to
apps/worker/.env; keep
BRIOSO_WORKER_MODEL=audiocppandAUDIOCPP_BACKEND=cuda. - Build audio.cpp at v0.7.3 with CUDA, set an absolute
AUDIOCPP_BIN, and
pre-download the F16 Medium GGUF to the absoluteAUDIOCPP_MODEL_PATH. - Run
brioso doctor; it must pass the binary, model, CUDA, credentials, and
backend checks. - Generate one F16 Medium WAV directly, then run
brioso start,pm2 save,
andpm2 startup. - Complete an existing API-backed
runner="home"job and verify it reaches
paidafter upload.
Apple Silicon (Metal)
- Install the Metal v0.7.3
audiocpp_serverand copy the Medium Q8 GGUF to
the path indeploy/pm2/m5-audiocpp-server.json. - Create separate private env files at
~/.config/brioso/m5/beta.envand
production.env. Give each its own backend URL, worker secret, and
HOME_WAKE_TOKEN. SetBRIOSO_WAKE_REQUIRE_TOKEN=1in both files. The
addon examples usepush.tokenEnv: WORKER_SHARED_SECRET, which is already
available to the backend. Set each daemon’s HOME_WAKE_TOKEN to its existing
environment specific WORKER_SHARED_SECRET; never commit either value.
AUDIOCPP_SERVER_URL explicitly selects the resident transport. Without it,
the worker uses the existing CLI. Useapps/worker/.env.audiocpp-m5.example
for the shared model URL and admission lock settings. - Start
deploy/pm2/ecosystem.m5-home.config.cjs. Its model server listens
on127.0.0.1:7309; the workers listen on127.0.0.1:7312and:7311.
The supervised SSH reverse tunnel exposes them to the VPS on its own
loopback ports17312and17311. Retain this SSH transport.
The workers share one file lock and reject extra work before acknowledging
it. - From the VPS, check
http://127.0.0.1:17312/healthfor beta and
http://127.0.0.1:17311/healthfor production. Confirm the runtime IDs.
Missing, wrong, and opposite environment bearers must receive401.
Correctly authenticated empty JSON POSTs to/jobsmust return422
without starting inference. Usepush.tokenEnv: WORKER_SHARED_SECRETfor
the addon examples. - Confirm
/v1/modelssaysstable-audio-3-mediumis loaded and both
workers are idle before restarting the beta worker for a revision test.
Leave the production worker, model, tunnel, and Tailscale policies unchanged. - The default gateway files preserve existing routing. Separate
config/gpu-gateway.m5-beta.example.yamland
config/gpu-gateway.m5-prod.example.yamlfiles describe optional activation.
Review and apply individual runtime and chain changes only when activating
the addon. Do not import over the live registry. - Generate one beta song through
brioso_generate_song, poll
brioso_get_generation, and check the download. Production’s/mcp
remains disabled; worker health alone does not prove production inference.
Checks and recovery
For migration from SSH to the dedicated Mac Cloudflare Tunnel, follow the
tunnel rollout and rollback. Retain SSH until
production completes its own HTTPS acceptance checks.
brioso engine prints audio.cpp/cuda or audio.cpp/metal; brioso config
shows the selected BRIOSO_WORKER_MODEL and backend. brioso doctor requires
absolute, existing binary and model paths for audio.cpp profiles.
Deploy through the existing guarded workflow when separately authorized.
Capture the active release and runtime configuration before activation.
On failure, restore the captured beta artifact and worker configuration.
Keep strict bearer authentication, the SSH tunnel, and fallback chains.
A completed song on Modal is a failed M5 verification. Correlate the job slug,
call ID, home-m5-beta runner, worker completion, terminal paid record,
and decoded application download. Revoke any temporary MCP credential.
For a bad rollout, run brioso stop, correct the profile or restore
BRIOSO_WORKER_MODEL=sa3, run brioso doctor, then brioso start. Inspect
brioso logs --lines 100 before rejoining the pool. Do not delete a claimed
job or alter its runner while diagnosing; normal lease expiry/fallback remains
the recovery mechanism.