/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 91222548de47
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { AudioEncoding$inboundSchema, AudioEncoding$outboundSchema, } from "./audioencoding.js";
/** @internal */
export const AudioFormat$inboundSchema = z
    .object({
    encoding: AudioEncoding$inboundSchema,
    sample_rate: z.int(),
}).transform((v) => {
    return remap$(v, {
        "sample_rate": "sampleRate",
    });
});
/** @internal */
export const AudioFormat$outboundSchema = z.object({
    encoding: AudioEncoding$outboundSchema,
    sampleRate: z.int(),
}).transform((v) => {
    return remap$(v, {
        sampleRate: "sample_rate",
    });
});
export function audioFormatToJSON(audioFormat) {
    return JSON.stringify(AudioFormat$outboundSchema.parse(audioFormat));
}
export function audioFormatFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AudioFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AudioFormat' from JSON`);
}
//# sourceMappingURL=audioformat.js.map