import { EventEmitter } from "node:events"; import { type BailianRegion } from "./bailian-endpoints.js"; type SocketOptions = { headers?: Record; }; type ProviderSocket = EventEmitter & { readyState: number; send: (data: string | Buffer) => void; close: (code?: number, reason?: string) => void; }; type BailianTtsSocketFactory = (url: string, options: SocketOptions) => ProviderSocket; export interface BailianTtsConfig { apiKey: string; region: BailianRegion; model: string; voice: string; sampleRate: number; } export interface BailianTtsClient { on(event: "started" | "finished", handler: () => void): this; on(event: "audio", handler: (chunk: Buffer) => void): this; on(event: "error", handler: (error: Error) => void): this; on(event: "closed", handler: (code?: number, reason?: string) => void): this; speak(text: string): void; close(): void; } interface BailianTtsClientOptions { socketFactory?: BailianTtsSocketFactory; taskIdFactory?: () => string; } export declare function createBailianTtsClient(config: BailianTtsConfig, options?: BailianTtsClientOptions): BailianTtsClient; export {}; //# sourceMappingURL=bailian-tts.d.ts.map