async-openai icon indicating copy to clipboard operation
async-openai copied to clipboard

Fix: serde rename of G711ULAW AudioFormat in Realtime Types

Open iskng opened this issue 8 months ago • 0 comments

OpenAI session error: Invalid value: 'g711-ulaw'. Supported values are: 'pcm16', 'g711_ulaw', and 'g711_alaw'.

Spec input_audio_format string

Optional The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw. For pcm16, input audio must be 16-bit PCM at a 24kHz sample rate, single channel (mono), and little-endian byte order.

#[derive(Debug, Serialize, Deserialize, Clone)] pub enum AudioFormat { #[serde(rename = "pcm16")] PCM16, #[serde(rename = "g711-ulaw")] G711ULAW, #[serde(rename = "g711-alaw")] G711ALAW, }

iskng avatar Mar 13 '25 06:03 iskng