Public declaration syntax from forge-ts/packages/forge-media/src/speech.ts Original source SHA-256: c66d2fa660ef195bd89a1a2a079a39bfb9c7e6c769c37a749db18823645c9b44 Function bodies and constant values are omitted. This is not the complete implementation. Source line 15 export const AudioFormat /* type inferred in source */; Source line 23 export type AudioFormat = (typeof AudioFormat)[keyof typeof AudioFormat]; Source line 31 export function audioMimeType(format: AudioFormat): string; Source line 43 export interface SpeechOptions { /** Voice identifier (provider-specific). */ readonly voice?: string; /** Speech speed multiplier. 1.0 is normal speed. */ readonly speed?: number; /** Output audio format. Defaults to MP3. */ readonly format?: AudioFormat; } Source line 55 export interface SpeechResult { /** The raw audio data as a Uint8Array. */ readonly audio: Uint8Array; /** The MIME type of the generated audio. */ readonly mimeType: string; /** Duration of the audio in seconds, if known. */ readonly durationSeconds?: number; } Source line 81 export interface SpeechProvider { /** Returns the model identifier. */ modelId(): string; /** Returns the provider name. */ providerName(): string; /** * Synthesizes speech from text. * * @param text - The text to convert to speech. * @param options - Optional synthesis parameters. * @returns The generated speech result. * @throws {ForgeMediaError} If synthesis fails. */ speak(text: string, options?: SpeechOptions): Promise; } Source line 115 export async function speak( provider: SpeechProvider, text: string, options?: SpeechOptions ): Promise;