Reference
?

VoiceSession

Type
The live voice conversation, as one object: its state and its controls.

What startSession returns: the whole conversation as one object. Its properties describe the session (id, room, live state, mute), and its methods drive and observe it, each documented on its own entry: on to subscribe, mute/unmute, sendText, registerClientTool, refreshIdentity, and end.

VoiceSession.ts
interface VoiceSession {
  sessionId: string
  room: string
  state: VoiceSessionState
  isMuted: boolean
  on(event, callback): () => void
  mute(): Promise<void>
  unmute(): Promise<void>
  sendText(text): Promise<void>
  registerClientTool(name, handler): () => void
  refreshIdentity(): Promise<void>
  end(): Promise<void>
}
Fields
sessionId
string
The platform session id, matching the call record in history.
room
string
The media room name.
state
VoiceSessionState
The current lifecycle state.
isMuted
boolean
Whether the microphone is currently muted.
What startSession returns
const session: VoiceSession = await voice.startSession();
session.state;   // 0 → 1 → …
session.on('toolCall', (e) => showActivity(e.method));