-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whisper OpenAI - Microphone Audio Input #3479
Comments
Had the same issue today, fixed it just by appending ".wav" to the name of the temporary file generated by gradio .
|
That's perfect solution enth0, |
Traceback (most recent call last): how to solve this problem?Does the whisper-1 model need to be downloaded locally? |
Why the error message is: line 22, in transcript |
Describe the bug
Hey, I noticed this from a couple of days ago. The microphone input (as audio) is now throwing an error with the OpenAI Whisper model. What used to work fine now requires an additional step. What needs to be done now is to convert the input into a .wav format. Not sure wether it is a Gradio bug or OpenAI changing the API but I thought I'd share my findings
Is there an existing issue for this?
Reproduction
Original code that no longer works:
#Function that takes in the audio as an input and returns the transcript
def transcribe(audio):
global messages
...
ui = gr.Interface(
fn=transcribe,
inputs=gr.Audio(source="microphone", type="filepath", label = "What's on your mind?"),...
New function that works:
def transcribe_audio(audio_file):
# Load the audio file and convert it to .wav format
audio_segment = AudioSegment.from_file(audio_file).export("converted_audio.wav", format="wav")
Screenshot
No response
Logs
System Info
Used in Google Colab.
Severity
annoying
The text was updated successfully, but these errors were encountered: