import * as z from "zod/v4"; import { OpenEnum } from "../types/enums.js"; import { ProviderOptions, ProviderOptions$Outbound } from "./provideroptions.js"; import { STTInputAudio, STTInputAudio$Outbound } from "./sttinputaudio.js"; import { STTTimestampGranularity } from "./stttimestampgranularity.js"; import { TraceConfig, TraceConfig$Outbound } from "./traceconfig.js"; /** * Provider-specific passthrough configuration */ export type STTRequestProvider = { /** * 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; }; /** * Output format. "json" (default) returns { text, usage }. "verbose_json" additionally returns task, language, duration, and segment-level timestamps; only supported by OpenAI-compatible providers. */ export declare const STTRequestResponseFormat: { readonly Json: "json"; readonly VerboseJson: "verbose_json"; }; /** * Output format. "json" (default) returns { text, usage }. "verbose_json" additionally returns task, language, duration, and segment-level timestamps; only supported by OpenAI-compatible providers. */ export type STTRequestResponseFormat = OpenEnum; /** * Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio. */ export type STTRequest = { /** * Base64-encoded audio to transcribe */ inputAudio: STTInputAudio; /** * ISO-639-1 language code (e.g., "en", "ja"). Auto-detected if omitted. */ language?: string | undefined; /** * STT model identifier */ model: string; /** * Provider-specific passthrough configuration */ provider?: STTRequestProvider | undefined; /** * Output format. "json" (default) returns { text, usage }. "verbose_json" additionally returns task, language, duration, and segment-level timestamps; only supported by OpenAI-compatible providers. */ responseFormat?: STTRequestResponseFormat | 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; /** * Sampling temperature for transcription */ temperature?: number | undefined; /** * Timestamp detail levels to include when response_format is "verbose_json". "segment" returns segment-level timestamps; "word" additionally returns word-level timestamps in the words array. Ignored unless response_format is "verbose_json". */ timestampGranularities?: Array | 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; }; /** @internal */ export type STTRequestProvider$Outbound = { options?: ProviderOptions$Outbound | undefined; }; /** @internal */ export declare const STTRequestProvider$outboundSchema: z.ZodType; export declare function sttRequestProviderToJSON(sttRequestProvider: STTRequestProvider): string; /** @internal */ export declare const STTRequestResponseFormat$outboundSchema: z.ZodType; /** @internal */ export type STTRequest$Outbound = { input_audio: STTInputAudio$Outbound; language?: string | undefined; model: string; provider?: STTRequestProvider$Outbound | undefined; response_format?: string | undefined; session_id?: string | undefined; temperature?: number | undefined; timestamp_granularities?: Array | undefined; trace?: TraceConfig$Outbound | undefined; user?: string | undefined; }; /** @internal */ export declare const STTRequest$outboundSchema: z.ZodType; export declare function sttRequestToJSON(sttRequest: STTRequest): string; //# sourceMappingURL=sttrequest.d.ts.map