/// import { type BaseClass } from './BaseClass.js'; /** * An implementation to fetch audio related data. */ export interface Audio extends BaseClass { /** * The external URL to the audio file. Expects a WAV file. */ resourceUrl: string; /** * A place to store the buffer of the audio file. */ buffer?: Buffer; toBuffer(): Promise; toBase64(): Promise; toDisk(location: `${string}.wav`): Promise; } /** * Fetch a buffer of the audio file using the {@link Audio.resourceUrl}. * * The format of the audio file is WAV. * * @param this The class that implements this {@link Audio} interface. * @returns A buffer of the audio file. */ export declare function implToBuffer(this: Audio): Promise; /** * Convert the audio file to a base64 string. * Useful for when you want to send the audio file in a format restricted HTTP request. * * The format of the audio file is WAV. * * @param this The class that implements this {@link Audio} interface. * @returns A base64 string of the audio file. */ export declare function implToBase64(this: Audio): Promise; /** * Write the audio file locally to disk. * * The format of the audio file is WAV. * * @param this The class that implements this {@link Audio} interface. * @param location The location to write the audio file to. Relative to the current working file. */ export declare function implToDisk(this: Audio, location: `${string}.wav`): Promise;