Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.

interface ChatCompletionAudioParam {
    format:
        | "wav"
        | "mp3"
        | "flac"
        | "opus"
        | "pcm16";
    voice:
        | "alloy"
        | "ash"
        | "ballad"
        | "coral"
        | "echo"
        | "sage"
        | "shimmer"
        | "verse";
}

Properties

Properties

format:
    | "wav"
    | "mp3"
    | "flac"
    | "opus"
    | "pcm16"

Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.

voice:
    | "alloy"
    | "ash"
    | "ballad"
    | "coral"
    | "echo"
    | "sage"
    | "shimmer"
    | "verse"

The voice the model uses to respond. Supported voices are alloy, ash, ballad, coral, echo, sage, shimmer, and verse.