import { EventEmitter } from "node:events"; import * as ws from "ws"; import { TTS, TTSEvents } from "../../../interfaces/tts/tts.js"; import { Mutex } from "../../../commons/mutex.js"; import { UUID } from "node:crypto"; import { Message } from "../../../interfaces/message/message.js"; export interface ElevenlabsTTSOptions { voiceId?: string; apiKey: string; headers?: Record; url?: string; queryParameters?: Record; timeout?: number; queueSizeLimit?: number; } export declare class ElevenlabsTTS extends EventEmitter implements TTS { protected internal: EventEmitter; protected mutex: Mutex; protected url: string; protected headers?: Record; protected webSocket: ws.WebSocket; protected activeMessages: Map; protected timeout?: number; constructor({ apiKey, url, voiceId, headers, queryParameters, timeout, queueSizeLimit }: ElevenlabsTTSOptions); post(message: Message): void; abort: (uuid: UUID) => void; dispose: () => void; protected onWebSocketMessage: (data: Buffer) => void; protected onWebSocketClose: (code: number, reason: Buffer) => void; protected onWebSocketOpen: () => void; protected onWebSocketError: (err: Error) => void; protected closeWebSocketConnection: () => void; protected createWebSocketConnection: () => ws.WebSocket; }