Closed yongjer closed 6 months ago
Hi @yongjer it sounds like no audio is being recorded in those cases. Are you sure that you're capturing audio? You could of course handle the None case but it may not resolve the underlying issue, if there is one.
def transcribe(audio):
if audio is None:
return None
sr, y = audio
y = y.astype(np.float16)
y /= np.max(np.abs(y))
return transcriber({"sampling_rate": sr, "raw": y})["text"]
Actually I tested this and can reproduce this issue here: https://huggingface.co/spaces/abidlabs/whisper. Not sure what's going on, will look into it
@abidlabs any update on this. Actually, this same code works on my local but not sure why not working on ec2 instance or google colab environment.
Duplicate issue here: https://github.com/gradio-app/gradio/issues/7841. Let me close this one in favor of that one, which has a simpler repro and more details
Describe the bug
sometimes it can do asr successfully, but sometimes the error occurs, not stable enough, now the solution is to submit multi times, if success, it shows
Due to a bug fix in https://github.com/huggingface/transformers/pull/28687 transcription using a multilingual Whisper will default to language detection followed by transcription instead of translation to English.This might be a breaking change for your use case. If you want to instead always translate your audio to English, make sure to pass `language='en'`.
in the terminal as belowHave you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
System Info
Severity
I can work around it