Closed charryshi closed 10 months ago
In my case, the recorded audio is silent. That is to say, if I record for 5 seconds, I will get a player with 5 seconds of recorded audio. But when I play it, I will hear nothing.
I tested record/playback on another site (https://addpipe.com/simple-web-audio-recorder-demo/), and there it works.
Version: gradio-3.41.0 iOS Version:16.7 tested in safari and chrome, both not working.
using code from https://www.gradio.app/guides/real-time-speech-recognition
import gradio as gr from transformers import pipeline import numpy as np
transcriber = pipeline("automatic-speech-recognition", model="openai/whisper-base.en")
def transcribe(audio): sr, y = audio y = y.astype(np.float32) y /= np.max(np.abs(y))
return transcriber({"sampling_rate": sr, "raw": y})["text"]
demo = gr.Interface( transcribe, gr.Audio(source="microphone"), "text", )
demo.launch()
using the test code, click"record from micphone" and "stop recording", play it, will hear nothing
No response
Blocking usage of gradio
Ok,I solved this problem. Upgrade ffmpeg to version 5.1.3
Thanks for letting us know the solution @charryshi!
Describe the bug
In my case, the recorded audio is silent. That is to say, if I record for 5 seconds, I will get a player with 5 seconds of recorded audio. But when I play it, I will hear nothing.
I tested record/playback on another site (https://addpipe.com/simple-web-audio-recorder-demo/), and there it works.
Version: gradio-3.41.0 iOS Version:16.7 tested in safari and chrome, both not working.
using code from https://www.gradio.app/guides/real-time-speech-recognition
import gradio as gr from transformers import pipeline import numpy as np
transcriber = pipeline("automatic-speech-recognition", model="openai/whisper-base.en")
def transcribe(audio): sr, y = audio y = y.astype(np.float32) y /= np.max(np.abs(y))
demo = gr.Interface( transcribe, gr.Audio(source="microphone"), "text", )
demo.launch()
Have you searched existing issues? π
Reproduction
using the test code, click"record from micphone" and "stop recording", play it, will hear nothing
Screenshot
No response
Logs
No response
System Info
Severity
Blocking usage of gradio