import { ChatScreenplay } from '../types/chat'; import { AudioPlayOptions, VoiceService, VoiceServiceOptions, VoiceServiceOptionsUpdate } from './VoiceService'; /** * Adapter implementation for using existing voice engines */ export declare class VoiceEngineAdapter implements VoiceService { private options; private audioPlayer; private requestQueue; private isProcessingQueue; private activeRequest?; private requestIdCounter; private cachedPiperPlusEngine?; /** * Constructor * @param options Voice service options */ constructor(options: VoiceServiceOptions); private bindOnCompleteCallback; /** * Speak the screenplay as audio * @param screenplay Screenplay (text and emotion) * @param options Audio playback options */ speak(screenplay: ChatScreenplay, options?: AudioPlayOptions): Promise; private createSpeechRequest; private processQueue; private mapEmotionToStyle; private fetchAudioForScreenplay; private getEngine; private playAudioBuffer; /** * Speak text as audio * @param text Text (with emotion tags) to speak * @param options Audio playback options */ speakText(text: string, options?: AudioPlayOptions): Promise; /** * Get whether currently playing */ isPlaying(): boolean; /** * Get current service settings */ getOptions(): VoiceServiceOptions; /** * Stop playback */ stop(): void; /** * Update service settings * @param options New settings options */ updateOptions(options: VoiceServiceOptionsUpdate | Partial): void; /** * Switch voice engine with complete options for the target engine * @param options New engine options */ switchEngine(options: VoiceServiceOptions): void; private validateUpdateOptions; private mergeOptionsForCurrentEngine; }