Upload folder using huggingface_hub
Browse files
test.py
CHANGED
@@ -1,10 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
4 |
src = "https://onj.me/shorts/audio/02-Who%27s%20the%20bossa%21.mp3"
|
5 |
-
|
|
|
|
|
|
|
6 |
mic = gr.Microphone(editable=False, waveform_options={"show_controls":False})
|
7 |
-
mic.stop_recording(
|
8 |
|
9 |
demo.launch()
|
10 |
#server_name="0.0.0.0", ssl_certfile="host.cert", ssl_keyfile="host.key", ssl_verify=False
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def get_audio(audio):
|
4 |
src = "https://onj.me/shorts/audio/02-Who%27s%20the%20bossa%21.mp3"
|
5 |
+
return f"<audio src='{src}' autoplay controls></audio>"
|
6 |
+
|
7 |
+
with gr.Blocks(title="Mic Test") as demo:
|
8 |
+
audio_element = gr.HTML()
|
9 |
mic = gr.Microphone(editable=False, waveform_options={"show_controls":False})
|
10 |
+
mic.stop_recording(get_audio, mic, audio_element)
|
11 |
|
12 |
demo.launch()
|
13 |
#server_name="0.0.0.0", ssl_certfile="host.cert", ssl_keyfile="host.key", ssl_verify=False
|