@d-id/client-sdk
Version:
d-id client sdk
22 lines (21 loc) • 914 B
TypeScript
import { CreateStreamOptions, PayloadType, StreamingManagerOptions } from '../../types/index';
export declare function createStreamingManager<T extends CreateStreamOptions>(agentId: string, agent: T, { debug, callbacks, auth, baseURL, warmup }: StreamingManagerOptions): Promise<{
/**
* Method to send request to server to get clip or talk depend on you payload
* @param payload
*/
speak(payload: PayloadType<T>): Promise<import('../../types/index').SendStreamPayloadResponse>;
/**
* Method to close RTC connection
*/
disconnect(): Promise<void>;
/**
* Session identifier information, should be returned in the body of all streaming requests
*/
sessionId: string;
/**
* Id of current RTC stream
*/
streamId: string;
}>;
export type StreamingManager<T extends CreateStreamOptions> = Awaited<ReturnType<typeof createStreamingManager<T>>>;