Voice
import { createVoiceClient } from '@mindstudio-ai/interface/voice';The client side of a voice conversation. createVoiceClient is the entry point; startSession prompts for the microphone, connects over the platform's realtime transport, and returns a live session object. Agent audio plays itself through a hidden element, so the app never touches an audio tag.
The session is the UI contract. Subscribe to its events for agent state, live captions on both sides, and tool activity: every finished tool call carries its return value, so the screen can show what the agent just did in step with the speech. Drive the session with mute, text injection, and end. Two controls handle the harder patterns. A client tool runs an action in the browser and returns its result to the agent. refreshIdentity upgrades an anonymous call to a signed-in user without dropping the line. Past calls read back as records with transcripts.