i am trying to use audio in the openai compatible api:
however i get:
openai.BadRequestError: Error code: 400 - [{‘error’: {‘code’: 400, ‘message’: ‘Invalid audio format “m4a” for audio generation. Valid formats are: [wav, mp3]’, ‘status’: ‘INVALID_ARGUMENT’}}]
although this says more format are supported:
Supported audio formats
Gemini supports the following audio format MIME types:
- WAV -
audio/wav - MP3 -
audio/mp3 - AIFF -
audio/aiff - AAC -
audio/aac - OGG Vorbis -
audio/ogg - FLAC -
audio/flac
and this (Audio understanding (speech only) | Generative AI on Vertex AI | Google Cloud Documentation) says even more format are supported:
| Audio MIME type | Gemini 2.0 Flash | Gemini 2.0 Flash-Lite |
|---|---|---|
| AAC - audio/aac | ||
| FLAC - audio/flac | ||
| MP3 - audio/mp3 | ||
| MPA - audio/m4a | ||
| MPEG - audio/mpeg | ||
| MPGA - audio/mpga | ||
| MP4 - audio/mp4 | ||
| OPUS - audio/opus | ||
| PCM - audio/pcm | ||
| WAV - audio/wav | ||
| WEBM - audio/webm |
sorry for the quick typing. time constrained. but thanks in advance!