import { SDKCore } from "../core.js"; import { RequestOptions } from "../lib/sdks.js"; import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; export declare enum SpeakStreamingAcceptEnum { audioMpeg = "audio/mpeg", audioWav = "audio/wav" } /** * Streaming text to speech * * @remarks * Convert text to speech with real-time streaming audio delivery. * * **Key Features:** * - Low-latency audio streaming - playback can start immediately as chunks arrive * - Automatic language detection * - Multiple format support: MP3 or PCM/WAV * - High-quality audio: 24kHz sample rate, 16-bit mono * * **Request Body:** * - `text`: Input text to convert to speech - required * - `language`: Language code (default: "auto") - "auto" for automatic detection, or ISO 639-1 codes: en, zh, hi, es, ar, bn, pt, ru, ja, pa, de, ko, fr, tr, it, th, pl, nl, id, vi, ur * - `format`: Audio format (default: "mp3") - "mp3" for compressed MPEG audio (96 kbps) or "pcm" for uncompressed WAV * - `model`: TTS model identifier (default: "auto") - "auto" selects the default provider; a registry-resolvable id dispatches to the matching provider (note: not all providers support `format: "mp3"`) * * **Response:** * - Streams audio chunks in real-time * - Returns `X-Language-Code` header with detected/used language * - Content-Type: `audio/mpeg` (MP3) or `audio/wav` (PCM) * - When `store` is `true`, returns the `X-Tts-Id` header with the id the history record will be stored under; persistence is best-effort and completes shortly after the stream ends * * **Use Cases:** * - Real-time applications requiring immediate audio playback * - Interactive voice responses * - Low-latency text-to-speech scenarios */ export declare function llmSpeechSpeakStreaming(client: SDKCore, request: operations.TextToSpeechStreamingRequest, options?: RequestOptions & { acceptHeaderOverride?: SpeakStreamingAcceptEnum; }): APIPromise>; //# sourceMappingURL=llmSpeechSpeakStreaming.d.ts.map