/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: d8d1c4bcdd5b
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const TranscriptionSegmentChunk$inboundSchema = z.object({
    type: z.literal("transcription_segment").default("transcription_segment"),
    text: z.string(),
    start: z.number(),
    end: z.number(),
    score: z.nullable(z.number()).optional(),
    speaker_id: z.nullable(z.string()).optional(),
}).catchall(z.any()).transform((v) => {
    return remap$(v, {
        "speaker_id": "speakerId",
    });
});
/** @internal */
export const TranscriptionSegmentChunk$outboundSchema = z.object({
    type: z.literal("transcription_segment").default("transcription_segment"),
    text: z.string(),
    start: z.number(),
    end: z.number(),
    score: z.nullable(z.number()).optional(),
    speakerId: z.nullable(z.string()).optional(),
}).catchall(z.any()).transform((v) => {
    return {
        ...remap$(v, {
            speakerId: "speaker_id",
        }),
    };
});
export function transcriptionSegmentChunkToJSON(transcriptionSegmentChunk) {
    return JSON.stringify(TranscriptionSegmentChunk$outboundSchema.parse(transcriptionSegmentChunk));
}
export function transcriptionSegmentChunkFromJSON(jsonString) {
    return safeParse(jsonString, (x) => TranscriptionSegmentChunk$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TranscriptionSegmentChunk' from JSON`);
}
//# sourceMappingURL=transcriptionsegmentchunk.js.map