# Hearty’s Booth: device-only mode

Run `python3 -m http.server 7870 --bind 127.0.0.1 --directory device-studio` from the studio project and open `http://127.0.0.1:7870`. No Python ML packages, owner Mac worker, GCP renderer, API key or subscription is needed. On a phone, open the HTTPS device page and install with Add to Home Screen.

Rendering runs in a dedicated browser Web Worker using the device CPU and ONNX Runtime WebAssembly. Internet downloads the static app and public model weights, not rendered audio. Initial app hosting remains necessary for first access; the service worker caches the app shell and Transformers.js caches model files. Download the engine completely before attempting offline generation. Cached files only mode forbids network fetches for missing engine files and reports a local error instead. Browser cache eviction or private browsing can remove model files and the local library. Export tracks for backups.

The pinned `Xenova/musicgen-small` engine (revision `6a8096dabfff72909ef5eae41461408e29ae20fd`) generates 2–30-second, 32 kHz mono instrumental clips. Its license is CC BY-NC 4.0: this model mode is for personal, noncommercial use. It requires roughly 650 MB of download and substantially more RAM during inference. Phones with insufficient memory or unsupported browsers fail locally without cloud fallback. Keep the app open during rendering; mobile operating systems can suspend it. Wi-Fi bandwidth does not replace RAM or compute.

MusicGen does not provide the existing ACE engine's lyric singing, full-song generation, voice conversion, reference-conditioned continuation, inpainting or four-stem separation. These are not advertised as supported browser features. Artist recipes describe musical direction; exact identity cloning and proprietary Treblo/Melodia parity are not claimed. Instrumental prompting can still produce occasional voice-like artifacts.

The local editor supports import, waveform zoom/pan/pinch, sample-precision time selection, nearest joint zero-crossing snapping (or minimum-amplitude compromise on stereo), playback/looping, cropping, deletion, silence, reverse, gain, normalization, fades, undo and locally resampled audio replacement with edge fades. Imported stereo remains stereo; mono generation is not relabeled stereo. Clips and edit versions auto-save to IndexedDB on that user's device. WAV and MP3 export locally; OGG Opus is available only on browsers exposing an OGG MediaRecorder encoder. No files upload and no cloud codec fallback exists.

Runtime dependencies are self-hosted official npm distributions: Transformers.js 3.8.1, its exact ONNX Runtime Web dependency 1.22.0-dev.20250409-89f8206ba4, and lamejs 1.2.1. Registry integrity and file hashes are recorded in `vendor/runtime-provenance.json`. Model weights are fetched from Hugging Face using the pinned revision, without sending prompts/audio. No third-party analytics.

Verification: one real browser instrumental render produced 1.94 seconds of 32 kHz mono audio in 45.22 seconds. Local WAV/MP3 decode, crop, zero-cross selection, undo, IndexedDB storage and 390-pixel layout passed. The deployed HTTPS engine loaded successfully and reached ready again with Cached files only enabled. A later cached-only render result was not captured after the test tab disappeared. Physical phone generation and operation with the entire network disconnected remain unverified.
