Whisper Translation API documentation bug

The documentation doesn’t mention the Language property in the translation API request but it has an effect on the response.

1 Like

I tried setting the field to the language in the original audio (“es”, in my case) and it just comes back with an error saying that “en” is the only value allowed for “language”.

It is also failing to actually translate. It correctly transcribes the audio into Spanish, but does not translate into English (which is why I attempted to set the “language” in the first place).

@david11, it is official that translation is supported to English only.

Yeah, I saw that elsewhere. My issue was that it was not correctly translating Spanish into English (in my example audio), rather just transcribing the audio, leaving it in Spanish.

I hoped that providing the “language” field would help it understand the source recording language, but it seems like it will be used for the target language instead, which is not the case for audio/transcriptions.

It seems that the best way to hint for the language of origin is to put it in the prompt.

You are right, @david11. I think the problem you describe is a bug in the OpenAI API, since when I am using whisper model directly on my infrastructure, language parameter behaves as expected.