import { type SWRConfiguration, type SWRResponse } from 'swr'; import { type AudioProps } from "../AudioPlayer"; import { type StreamAudioPlayerOptions } from "../hooks/useStreamAudioPlayer"; export interface TTSResponse extends SWRConfiguration, Pick { audio: AudioProps & { arrayBuffers: ArrayBuffer[]; }; canStart: boolean; isGlobalLoading: boolean; isLoading: boolean; start: () => void; stop: () => void; } export interface TTSOptions extends SWRConfiguration, StreamAudioPlayerOptions { onFinish?: SWRConfiguration['onSuccess']; onStart?: () => void; onStop?: () => void; } export declare const useTTS: (key: string, text: string, fetchTTS: (segmentText: string) => Promise, { onError, onSuccess, onFinish, onStart, onStop, onAudioEnd, ...restSWRConfig }?: TTSOptions) => TTSResponse;