Skip to main content

UseVoiceResult

@gravity-rail/react


@gravity-rail/react / UseVoiceResult

Interface: UseVoiceResult

Properties​

error​

error: Error | undefined


isActive​

isActive: boolean


isMuted​

isMuted: boolean

True while the caller's microphone is muted. The session stays up and the agent keeps talking; only the outbound frames stop.


setMuted()​

setMuted: (muted) => void

Mute/unmute the microphone without ending the session.

Parameters​

muted​

boolean

Returns​

void


start()​

start: () => Promise<void>

Returns​

Promise<void>


status​

status: VoiceStatus


stop()​

stop: () => void

Returns​

void


toggleMute()​

toggleMute: () => void

Convenience for a toolbar toggle.

Returns​

void


transcript​

transcript: VoiceTranscriptEntry[]

Live transcript for the current session, oldest first. Cleared when a new session starts.