import type OpenAI from "openai"; import { type OpenAISpeechInput } from "./speech"; export type OpenAISpeechChunk = Readonly<{ data: Uint8Array; sequence: number; }>; export type OpenAISpeechStreamCompletion = Readonly<{ raw: Response; audio: Blob; }>; /** Open one genuine binary response-body stream from the Speech API. */ export declare function openOpenAISpeechStream(client: OpenAI, options: OpenAISpeechInput, signal: AbortSignal, call: (operation: string, start: () => Promise) => Promise): Promise<{ events: AsyncGenerator, any, any>; map: ({ data, sequence }: OpenAISpeechChunk) => { type: "audio-delta"; data: Uint8Array; mediaType: string; sequence: number; }; completion: Promise>; }>; /** Decode the consumed native response into one exact completed audio payload. */ export declare function decodeOpenAISpeechStreamCompletion(native: OpenAISpeechStreamCompletion, options: OpenAISpeechInput): import("@use-crux/core/adapter").GenerateSpeechPayload;