/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 995e63ce114c
 */
import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import { TranscriptionSegmentChunk$inboundSchema, TranscriptionSegmentChunk$outboundSchema, } from "./transcriptionsegmentchunk.js";
import { UsageInfo$inboundSchema, UsageInfo$outboundSchema, } from "./usageinfo.js";
/** @internal */
export const TranscriptionStreamDone$inboundSchema = z.object({
    model: z.string(),
    text: z.string(),
    segments: z.array(TranscriptionSegmentChunk$inboundSchema).optional(),
    usage: UsageInfo$inboundSchema,
    type: z.literal("transcription.done"),
    language: z.nullable(z.string()),
}).catchall(z.any());
/** @internal */
export const TranscriptionStreamDone$outboundSchema = z.object({
    model: z.string(),
    text: z.string(),
    segments: z.array(TranscriptionSegmentChunk$outboundSchema).optional(),
    usage: UsageInfo$outboundSchema,
    type: z.literal("transcription.done"),
    language: z.nullable(z.string()),
}).catchall(z.any());
export function transcriptionStreamDoneToJSON(transcriptionStreamDone) {
    return JSON.stringify(TranscriptionStreamDone$outboundSchema.parse(transcriptionStreamDone));
}
export function transcriptionStreamDoneFromJSON(jsonString) {
    return safeParse(jsonString, (x) => TranscriptionStreamDone$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TranscriptionStreamDone' from JSON`);
}
//# sourceMappingURL=transcriptionstreamdone.js.map