UNPKG

@coze/realtime-api

Version:

A powerful real-time communication SDK for voice interactions with Coze AI bots | 扣子官方实时通信 SDK,用于与 Coze AI bots 进行语音交互

13 lines (12 loc) 529 B
export type EventCallback = (eventName: string, event: unknown) => void; export declare class RealtimeEventHandler { private eventHandlers; protected _debug: boolean; constructor(debug?: boolean); clearEventHandlers(): void; on(eventName: string, callback: EventCallback): EventCallback; off(eventName: string, callback: EventCallback): void; private _dispatchToHandlers; dispatch(eventName: string, event: unknown, consoleLog?: boolean): void; _log(message: string, event?: unknown): void; }