export type CreateApiMinimax08853fV1T2aSpeech28HdArgs = {body: {text: string, voice_setting?: Record | undefined, audio_setting?: Record | undefined, language_boost?: string | undefined, pronunciation_dict?: Record | undefined, voice_modify?: Record | undefined, subtitle_enable?: boolean | undefined}}; export type CreateApiMinimax08853fV1T2aSpeech28HdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * High-fidelity speech synthesis. Model fixed to speech-2.8-hd. Returns a downloadable audio URL (valid 24h) in data.audio; stream fixed to false. * * POST /minimax-08853f/v1/t2a/speech-2.8-hd */ export const createApiMinimax08853fV1T2aSpeech28Hd = async (args: CreateApiMinimax08853fV1T2aSpeech28HdArgs, options?: CreateApiMinimax08853fV1T2aSpeech28HdOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/minimax-08853f/v1/t2a/speech-2.8-hd${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };