Spatial audio showcases

Three live demos on the marketing site let visitors hear positional mix features in under a minute — orbiting TTS, panned clip playback, and proximity-based room voice. All three share one Voice+Data showcase project and the spatial-showcase agent template. Visitors pick a mode with a DataChannel join message; the browser never sends clip URLs.

Use stereo headphones for every spatial demo — panning is equal-power stereo, not HRTF binaural.

Try the live demos

  • Orbiting voice — per-listener TTS circles your head (setTtsPose).
  • Spatial soundboard — drop clips in space with play({ volume, pose }).
  • Proximity room — mix groups, listener poses, and per-peer mute (setClientPose, setListenerMute).

What each demo exercises

DemoAgent APIsVisitor experience
OrbitsetTtsPose, speakTTS voice circles the listener; stage dot tracks speaker position.
Soundboardplay with volume, pose or placementPads trigger clips panned where they land on the stage.
ProximitycreateMixGroup, setClientPose, setListenerMuteAvatars move on a shared stage; voices get louder when closer.

Run it yourself

  1. Dashboard: Create project → Template → Spatial audio showcase (spatial-showcase).
  2. Set runner mode to Voice+Data and enable shared_child_per_session (required so mix-group members share one runner process). See Runner settings.
  3. Deploy to cloud and connect a browser client with a client API key.
  4. Send the first DataChannel message: { "type": "join", "demo": "orbit" | "soundboard" | "proximity" }. Optional assetOrigin tells the agent where to resolve showcase sound files (allowlisted origins only).

Template source: templates/spatial-showcase/

DataChannel protocol

The browser sends commands only — never HTTPS clip URLs. The agent resolves clipId to ${assetOrigin}/showcase/sounds/<file> after validating assetOrigin.

DirectiontypePurpose
Browser → agentjoindemo + optional assetOrigin
Browser → agentorbitaction: set | say — radius, period, text
Browser → agentpadclipId, x, z, optional volume (0–1)
Browser → agentmoveListener pose x, z, yawDeg
Browser → agentmute_peerpeerId, muted
Agent → browserorbit_poseSpeaker position for the stage canvas
Agent → browserroom_statePeer list with poses and mute flags
Agent → browsershowcase_ackCommand result; pad acks include playId

Two volume layers

  • Per-clip — soundboard pads send volume (0–1) on pad; the agent passes it to play({ volume }). This scales that clip in the server mix.
  • Browser master — each showcase page has an agent volume slider backed by a Web Audio GainNode on the inbound track (persisted in localStorage["vt-showcase-volume"]). It affects TTS, clips, and remote mics equally — it does not change per-pad mix levels server-side.

Sourcing showcase sounds

The live soundboard catalog uses short WAV clips served from your site under /showcase/sounds/. When building your own project, you can source effects from:

  • Kenney.nl asset packs (UI Audio, Interface, Impact, Sci-Fi) — check each pack license.
  • Freesound — filter for CC0 and record attribution in your project docs.
  • Procedural or in-house WAV files you generate and host on HTTPS (same pattern as the showcase procedural chimes).

Always host clips on HTTPS URLs your runner can fetch; keep files small, document license and author in your repo, and never pass raw URLs from an untrusted browser — send ids or paths your agent validates.

Related

← All documentation