whisper-large-v3-turbo Hugging Face API bug

#85
by dziz - opened

Please, someone help!

Although the default whisper API setting is Transcribing, I receive a Translation (into different random languages!?!). Both whisper-large-v3 and whisper-large-v3-turbo. Why?

final request = http.Request('POST', url); //router.huggingface.co/hf-inference/models/openai/whisper-large-v3-turbo
request.headers['Authorization'] = 'Bearer $_hfToken';
request.headers['Content-Type'] = 'audio/m4a';
request.bodyBytes = audioBytes;

I tried to add additional headers:

request.headers['Accept-Language'] = 'en,en-US';
request.headers['language'] = 'en';
request.headers['task'] = 'transcribe';

but it didn't help.

I also tried through json payload like:
{
'inputs': base64Audio,
'parameters': {
'task': 'transcribe',
'language': 'en',
},
}

but returned an error "unexpected keyword argument 'task' "... yes 'task' is not in the public HF api's parameters but it's strange that there are no standard ones of the Whisper API.

How can I fix this issue? I need to receive Transcribe (not Translate to random language) as stated as the default behavior in API.

Sign up or log in to comment