@squidcloud/client
    Preparing search index...

    Class AiWebVoiceCall

    A voice conversation with an agent from the browser: the microphone goes to the OpenAI realtime model over WebRTC, its voice comes back the same way, and Squid runs the agent behind it. Start one with AiVoiceClient.startWebCall.

    Index
    callId: string

    Id of the call at OpenAI.

    sessionId: string

    Id of the voice session in Squid; its transcript events carry it.

    • Runs once the call is over, whether the agent hung up, the connection dropped or stop was called.

      Parameters

      • listener: () => void

      Returns () => void

    • Listens to every event of the call; returns the function that stops listening.

      Parameters

      Returns () => void

    • Listens to the spoken turns, the caller's as transcribed and the agent's as spoken.

      Parameters

      Returns () => void

    • Silences or restores the microphone without ending the call.

      Parameters

      • muted: boolean

      Returns void

    • Ends the call from the browser's side.

      Returns void