API endpoint /v1/audio/translations is transcribing to original language. It is not translating to English as expected. I am coding in Python. (I am writing a book on the API.)
Using the Python code below, I upload a Spanish language mp3 file and the text returned is in Spanish. It should be translated into English.
Thanks!
My code:
from openai import OpenAI
client = OpenAI(api_key=“asdf”)
with open(“NONENGLISH.mp3”, “rb”) as f:
result = client.audio.translations.create(
model="whisper-1",
file=f
)
print(result.text)