D-ID Client SDK - v3.0.0-0
    Preparing search index...

    Interface SpeakResponse

    What speak() resolves with: the video the agent is about to stream.

    The fields come from the Talks (V2) and Clips (V3) API, which generates a discrete video while answering the request. Where no such video exists the call still resolves, with the same stub — status 'success', duration 0 and an empty videoId: on Expressive (V4) agents, whose speech is streamed over the data channel rather than rendered as a separate video, and in a text-only chat mode (ChatMode.TextOnly, ChatMode.Playground or ChatMode.Maintenance), which produces no video at all.

    interface SpeakResponse {
        duration: number;
        sessionId?: string;
        status: string;
        videoId: string;
    }
    Index
    duration: number

    Duration of the generated video as reported by the Agents API for Talks (V2) and Clips (V3) agents. 0 when the call produced no discrete video — on Expressive (V4) agents, and in a text-only chat mode.

    sessionId?: string

    Id of the session this call was made on; the SDK sends it back on later streaming requests.

    status: string

    What the server said about the request. Not a fixed set — the Agents API declares it as an open string — so treat an unrecognized value as accepted; a rejected request comes back as an HttpError. 'success' on the stub the SDK returns where no video is produced.

    videoId: string

    Id of the generated video.

    Use it to correlate this call with the video the agent then plays, which onVideoStateChange reports the start and end of, and which interrupt() cancels. Empty when the call produced no discrete video — on Expressive (V4) agents, and in a text-only chat mode.