Skip to content
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

Audio component not recording from microphone #5301

Closed
1 task done
KushRJ opened this issue Aug 23, 2023 · 6 comments
Closed
1 task done

Audio component not recording from microphone #5301

KushRJ opened this issue Aug 23, 2023 · 6 comments
Labels
🎵 Audio Related to Audio component bug Something isn't working

Comments

@KushRJ
Copy link

KushRJ commented Aug 23, 2023

Describe the bug

I am using the audio component in this format:
inputs=gr.Audio(source="microphone", type="filepath", label="Record Audio"),

But I am unable to record any file via my microphone, as the 'Stop Recording' button doesn't work after I start recording.

Versions:
gradio==3.40.0
gradio_client==0.4.0
Python 3.10.6

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

Please fix this ASAP as I am unable to record audio input

Screenshot

How do I fix this?

Logs

No Logs

System Info

Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 3.40.0
gradio_client version: 0.4.0

------------------------------------------------
gradio dependencies in your environment:

aiofiles: 23.1.0
aiohttp: 3.8.4
altair: 5.0.1
fastapi: 0.100.1
ffmpy: 0.3.1
gradio-client: 0.4.0
httpx: 0.13.3
huggingface-hub: 0.16.4
importlib-resources: 6.0.0
jinja2: 3.1.2
markdown-it-py: 2.2.0
markupsafe: 2.1.3
matplotlib: 3.7.2
mdit-py-plugins: 0.3.3
numpy: 1.24.3
orjson: 3.9.2
packaging: 22.0
pandas: 2.0.3
pillow: 9.5.0
pydantic: 1.10.11
pydub: 0.25.1
python-multipart: 0.0.6
pyyaml: 6.0.1
requests: 2.31.0
semantic-version: 2.10.0
typing-extensions: 4.7.1
uvicorn: 0.15.0
websockets: 10.4
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.


gradio_client dependencies in your environment:

fsspec: 2023.6.0
httpx: 0.13.3
huggingface-hub: 0.16.4
packaging: 22.0
requests: 2.31.0
typing-extensions: 4.7.1
websockets: 10.4

Severity

Blocking usage of gradio

@KushRJ KushRJ added the bug Something isn't working label Aug 23, 2023
@hysts
Copy link
Collaborator

hysts commented Aug 23, 2023

@KushRJ
I couldn't reproduce this. (FYI, the latest gradio is 3.40.1, but both 3.40.0 and 3.40.1 worked fine for me.)
Can you check if you can record audio in this Space?

@KushRJ
Copy link
Author

KushRJ commented Aug 23, 2023

@hysts My code:

`demo = gr.Interface(fn=transcribe,
inputs=gr.Audio(source="microphone", type="filepath", label="Record Audio"),
outputs=gr.Textbox(label="Transcription"))

demo.queue().launch(share=True, server_port = 5008, server_name='0.0.0.0')`

Screen.Recording.2023-08-23.at.2.46.31.PM.mov

Screen recording of the app where its visible that microphone is not recording attached (I have used the Audio component in the same way it is used in the huggingface space attached by you).

@hysts
Copy link
Collaborator

hysts commented Aug 23, 2023

Hmm, it works fine for me.

00.mp4

Maybe it has something to do with your browser or OS.

@KushRJ
Copy link
Author

KushRJ commented Aug 23, 2023

@hysts I am using Brave Browser and a Linux system. Is there any explicit environment variable I need to set for Gradio to use the microphone (the tab doesn't ask for permission to use the microphone, so I thought it has access to the same by default.)

@abidlabs abidlabs added the 🎵 Audio Related to Audio component label Aug 23, 2023
@abidlabs abidlabs added this to the Component Cleanup milestone Aug 23, 2023
@abidlabs
Copy link
Member

@KushRJ could it be this issue? #2551

@abidlabs
Copy link
Member

Will close for lack of followup -- and instead add #2551 to the milestone and tracking issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 Audio Related to Audio component bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants