Closed simonw closed 2 hours ago
Here's a weird detail:
If you omit the filename, the OpenAI API returns a 400
If you leave off the .mp3
extension (I tried just audio_file.name = "audio"
) you get a 400.
But... it turns out you can send .wav
data or .mp3
data with the same audio.mp3
filename and both work just fine.
This works now:
curl -s 'https://static.simonwillison.net/static/2024/russian-pelican-in-spanish.mp3' \
| llm whisper-api -
I need you to pretend to be a California brown pelican with a very thick Russian accent, but you talk to me exclusively in Spanish. How's your day today? And you, amigo, how was your day?
(Note it auto-translated from Spanish to English even though I didn't ask it to.)
I need to read it into memory first so I can calculate the correct length for the upload.