import { implToBase64, implToBuffer, implToDisk } from '../../implementation/Audio.js'; import { type Client, type Audio } from '../../index.js'; import { Spectrogram } from './Spectrogram/Spectrogram.js'; import { type TtsResultSchema } from './ttsResult.schema.js'; /** * The complete data for a TTS result. This contains extras like the spectrogram and other metadata like * what worker generated the file, is a debug request, etc. */ export declare class TtsResult implements Audio { /** * @param client The main client. * @param data The raw TTS result data from the FakeYou API. */ constructor(client: Client, data: TtsResultSchema); readonly client: Client; readonly resourceUrl: string; /** * Raw spectrogram data, it is not an image. */ readonly spectrogramUrl: string; /** * The URL to the page of this result in the browser. */ readonly webUrl: string; readonly ttsResultToken: string; readonly rawInferenceText: string; readonly ttsModelToken: string; readonly ttsModelTitle: string; readonly maybePretrainedVocoderUsed: string | null; readonly maybeCreatorUserToken: string | null; readonly maybeCreatorUsername: string | null; readonly maybeCreatorDisplayName: string | null; readonly maybeCreatorGravatarHash: string | null; readonly maybeModelCreatorUserToken: string | null; readonly maybeModelCreatorUsername: string | null; readonly maybeModelCreatorDisplayName: string | null; readonly maybeModelCreatorGravatarHash: string | null; readonly publicBucketWavAudioPath: string; readonly publicBucketSpectrogramPath: string; readonly creatorSetVisibility: string; readonly generatedByWorker: string; readonly isDebugRequest: boolean; readonly fileSizeBytes: number; readonly durationMillis: number; readonly createdAt: Date; readonly updatedAt: Date; /** * Fetch the audio file as a buffer. */ toBuffer: typeof implToBuffer; /** * Convert the audio file to a base64 string. */ toBase64: typeof implToBase64; /** * Write the audio file to disk. */ toDisk: typeof implToDisk; fetchSpectrogram(): Promise; }