UNPKG

@coze/realtime-api

Version:

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

26 lines (25 loc) 949 B
export declare enum RealtimeError { DEVICE_ACCESS_ERROR = "DEVICE_ACCESS_ERROR", STREAM_CREATION_ERROR = "STREAM_CREATION_ERROR", CONNECTION_ERROR = "CONNECTION_ERROR", DISCONNECTION_ERROR = "DISCONNECTION_ERROR", INTERRUPT_ERROR = "INTERRUPT_ERROR", EVENT_HANDLER_ERROR = "EVENT_HANDLER_ERROR", PERMISSION_DENIED = "PERMISSION_DENIED", NETWORK_ERROR = "NETWORK_ERROR", INVALID_STATE = "INVALID_STATE", CREATE_ROOM_ERROR = "CREATE_ROOM_ERROR", PARSE_MESSAGE_ERROR = "PARSE_MESSAGE_ERROR", HANDLER_MESSAGE_ERROR = "HANDLER_MESSAGE_ERROR" } export declare const ErrorMessages: Record<RealtimeError, string>; export declare class RealtimeAPIError extends Error { code: RealtimeError; error?: unknown; /** * @param code - Error code * @param message - Error message * @param error - Error object */ constructor(code: RealtimeError, message: string, error?: unknown); }