Hi, I’m using the curl command to call audio/speech service, but the mp3 generated can’t be played.
Tested the same call on ubuntu and mac os, both with the same result.
curl https://api.openai.com/v1/audio/speech \
-H "Authorization: Bearer xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "tts-1",
"input": "Hello, World!",
"voice": "alloy",
"response_format": "mp3"
}' \
--output hello-world.mp3
The hello-wold.mp3 file is 0bytes.
I did other tests and sometimes the mp3 have at least some bytes, but they are not working. I don’t have any hint why the file is always corrupted / not properly encoded.
Thank you in advance