TTS Error: decimal_max_decimal_places_exceeded

,

After working successfully, with no changes since, I’ve started getting the following error message. I’ve trimmed the value 2 decimal places. Still same message. When I first started seeing it, I saw OpenAI alerted to increased TTS errors. They since said it was resolved, but I continue to receive the error. Is anyone else seeing this?

Model: gpt-4o-mini-tts
Endpoint: https://api.openai.com/v1/audio/speech
Rounded speed value: 0.95
API returned status: 400

Body: {
“error”: {
“message”: “Invalid ‘speed’: max decimal places exceeded. Expected a value with at most 16 decimal places, but got a value with 52 decimal places instead.”,
“type”: “invalid_request_error”,
“param”: “speed”,
“code”: “decimal_max_decimal_places_exceeded”
}
}

From every angle I can tell, I am sending a value of 0.95 so I cannot understand why OpenAI says I’m sending 52 decimal places.

Well, the parameter speed is not compatible with gpt-4o-tts-mini:
https://platform.openai.com/docs/api-reference/audio/createSpeech#audio-createspeech-speed

The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default. Does not work with gpt-4o-mini-tts.

You can leave it at 1.0 or omit the parameter (since default is 1.0 already), and use instructions to regulate the speed.

1 Like

Wow. Well that’s embarrassing.

Thank you, @aprendendo.next . I was certain I had not changed anything and yet, clearly the model was changed, I guess. It’s unfortunate the error returned is not more clear / accurate. Regardless, I appreciate your quick reply and help. Changing the speed to “1.0” was accepted, as per the documentation.

1 Like