/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 425f140ce230
 */
import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import { RealtimeTranscriptionErrorDetail$inboundSchema, RealtimeTranscriptionErrorDetail$outboundSchema, } from "./realtimetranscriptionerrordetail.js";
/** @internal */
export const RealtimeTranscriptionError$inboundSchema = z.object({
    type: z.literal("error").default("error"),
    error: RealtimeTranscriptionErrorDetail$inboundSchema,
});
/** @internal */
export const RealtimeTranscriptionError$outboundSchema = z.object({
    type: z.literal("error").default("error"),
    error: RealtimeTranscriptionErrorDetail$outboundSchema,
});
export function realtimeTranscriptionErrorToJSON(realtimeTranscriptionError) {
    return JSON.stringify(RealtimeTranscriptionError$outboundSchema.parse(realtimeTranscriptionError));
}
export function realtimeTranscriptionErrorFromJSON(jsonString) {
    return safeParse(jsonString, (x) => RealtimeTranscriptionError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RealtimeTranscriptionError' from JSON`);
}
//# sourceMappingURL=realtimetranscriptionerror.js.map