export type DeleteApiAllmodelsV1CustomVoicesVoiceIdArgs = {voice_id: string}; export type DeleteApiAllmodelsV1CustomVoicesVoiceIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a custom cloned voice. This action cannot be undone. * * DELETE /allmodels/v1/custom-voices/{voice_id} */ export const deleteApiAllmodelsV1CustomVoicesVoiceId = async (args: DeleteApiAllmodelsV1CustomVoicesVoiceIdArgs, options?: DeleteApiAllmodelsV1CustomVoicesVoiceIdOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/allmodels/v1/custom-voices/${encodeURIComponent(String(args.voice_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };