import * as z from "zod/v4"; import { OpenEnum } from "../types/enums.js"; import { ProviderOptions, ProviderOptions$Outbound } from "./provideroptions.js"; import { SpeechInputReference, SpeechInputReference$Outbound } from "./speechinputreference.js"; import { TraceConfig, TraceConfig$Outbound } from "./traceconfig.js"; /** * Provider-specific passthrough configuration */ export type SpeechRequestProvider = { /** * Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. */ options?: ProviderOptions | undefined; }; /** * Audio output format */ export declare const SpeechRequestResponseFormat: { readonly Mp3: "mp3"; readonly Pcm: "pcm"; }; /** * Audio output format */ export type SpeechRequestResponseFormat = OpenEnum; /** * Text-to-speech request input */ export type SpeechRequest = { /** * Text to synthesize */ input: string; /** * Reference content for stateless voice cloning or voice design. Audio mode: one to three `input_audio` parts, each optionally paired with a `text` part carrying its transcript (a single clip accepts its transcript before or after it; with multiple clips each transcript immediately follows its clip); only routed to endpoints that support voice cloning (and multiple references when more than one part is sent). Image mode: exactly one `image_url` part; only routed to endpoints that support image references. The two modes cannot be mixed. An empty array is treated as no reference. */ inputReferences?: Array | undefined; /** * TTS model identifier */ model: string; /** * Provider-specific passthrough configuration */ provider?: SpeechRequestProvider | undefined; /** * Audio output format */ responseFormat?: SpeechRequestResponseFormat | undefined; /** * A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. */ sessionId?: string | undefined; /** * Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers. */ speed?: number | undefined; /** * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. */ trace?: TraceConfig | undefined; /** * A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. */ user?: string | undefined; /** * Voice identifier (provider-specific). */ voice?: string | undefined; }; /** @internal */ export type SpeechRequestProvider$Outbound = { options?: ProviderOptions$Outbound | undefined; }; /** @internal */ export declare const SpeechRequestProvider$outboundSchema: z.ZodType; export declare function speechRequestProviderToJSON(speechRequestProvider: SpeechRequestProvider): string; /** @internal */ export declare const SpeechRequestResponseFormat$outboundSchema: z.ZodType; /** @internal */ export type SpeechRequest$Outbound = { input: string; input_references?: Array | undefined; model: string; provider?: SpeechRequestProvider$Outbound | undefined; response_format: string; session_id?: string | undefined; speed?: number | undefined; trace?: TraceConfig$Outbound | undefined; user?: string | undefined; voice?: string | undefined; }; /** @internal */ export declare const SpeechRequest$outboundSchema: z.ZodType; export declare function speechRequestToJSON(speechRequest: SpeechRequest): string; //# sourceMappingURL=speechrequest.d.ts.map