HF whisper api bug
#227
by
dziz - opened
Although the default API setting is Transcribing, I receive a Translation (into different random languages!?!). Why?
final request = http.Request('POST', url); //router.huggingface.co/hf-inference/models/openai/whisper-large-v3
request.headers['Authorization'] = 'Bearer $_hfToken';
request.headers['Content-Type'] = 'audio/m4a';
request.bodyBytes = audioBytes;
I even 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 there return an error "unexpected keyword argument 'task' " , yes it's not in the HF api's parameters (but it's strange that there are no standard ones of the whisper API).
So... How can I fix this issue? I need to receive Transcribe not Translate to random language.