Does the API for translations actually translate?

I’ve got a simple spoken audio to text interface working, using Python and the async version of OpenAI official python library.

It works great for spoken English, but does not translate any non-English to English.

The OpenAI API documentation says it translates non-English to English and lists a large series of languages. I see people posting apps where they say they are calling the OpenAI API for their translations.

I’ve seen posts where people describe doing this using curl, and using a v1 url to whisper-1, but I cannot describe this anymore without this moderation system claiming I’m trying to hide a link in my post.

How is anyone achieving translation? I’ve tried using the optional prompt, tried the ‘language=“en”’ optional parameter. It always transcribes into the original language and does not translate to English. How to trigger the translation? Does anyone have this working through the OpenAI API and not Whisper running locally?

Any information would be very helpful. All information I can locate appears to say that this translation function simply does not work at all (for non-English to English.) Plus, the docs emphasize this is for converting to English only at this time, but not even that work?!

[edit] Found the answer: the temperature parameter needs to be given, apparently. I have it set to 0.9 and getting translations.

1 Like

transcript = openai.audio.transcriptions.create(model=“whisper-1”, file=audio_file)

translation = openai.audio.translations.create( model =“whisper-1”,
file= audio_file,
temperature = 0.90)

For english audio to english text, I use transcriptions.

For non-english to english, I use translation. The list of languages available is listed in the documentation for whisper. The system auto-detects the language and it is not necessary to set a variable.

2 Likes

Except it does not work, it always returns the original language.

1 Like

It’s that temperature parameter, if not sent the API does not translate, it only transcribes.

Many thanks!
I‘m at the very same point and spent half a day scratching my head.