Handbook
Welcome to the sonic-runtime handbook. This is the complete guide to building, publishing, and operating the native audio sidecar.
What’s inside
Section titled “What’s inside”- Getting Started — Build, publish, and run the binary
- Architecture — Engine components, OpenAL, and the command loop
- Protocol — ndjson-stdio-v1 wire format, commands, and events
- Security — Threat model and asset verification
- Beginners Guide — Step-by-step introduction for newcomers
What sonic-runtime is
Section titled “What sonic-runtime is”sonic-runtime is the native audio engine that sonic-core delegates to. It handles the work that TypeScript cannot do efficiently: low-latency audio playback via OpenAL Soft, per-playback device routing, and Kokoro ONNX TTS synthesis.
sonic-core spawns sonic-runtime as a child process and communicates over ndjson-stdio-v1 — newline-delimited JSON on stdin/stdout.
What sonic-runtime is not
Section titled “What sonic-runtime is not”- Not a standalone application — it requires a parent process to send commands
- Not a UI or media player
- Not a session manager or product layer
- No user state, leases, or business logic (those live in sonic-core)