Upload folder using huggingface_hub
Browse files
test.py
CHANGED
|
@@ -7,7 +7,8 @@ def reverse_audio(audio):
|
|
| 7 |
|
| 8 |
with gr.Blocks(title="Mic Test") as demo:
|
| 9 |
src = "https://onj.me/shorts/audio/02-Who%27s%20the%20bossa%21.mp3"
|
| 10 |
-
|
|
|
|
| 11 |
mic = gr.Audio(
|
| 12 |
sources=["microphone"],
|
| 13 |
waveform_options=gr.WaveformOptions(
|
|
@@ -17,13 +18,12 @@ with gr.Blocks(title="Mic Test") as demo:
|
|
| 17 |
show_controls=False,
|
| 18 |
),
|
| 19 |
)
|
| 20 |
-
gr.HTML(f"<audio src='{src}' autoplay controls></audio>", visible=True)
|
| 21 |
|
| 22 |
mic.stop_recording(
|
| 23 |
fn=reverse_audio,
|
| 24 |
inputs=mic,
|
| 25 |
outputs=gr.Audio()
|
| 26 |
)
|
| 27 |
-
|
| 28 |
demo.launch()
|
| 29 |
|
|
|
|
| 7 |
|
| 8 |
with gr.Blocks(title="Mic Test") as demo:
|
| 9 |
src = "https://onj.me/shorts/audio/02-Who%27s%20the%20bossa%21.mp3"
|
| 10 |
+
gr.HTML(f"<audio src='{src}' autoplay controls></audio>", visible=True)
|
| 11 |
+
'''
|
| 12 |
mic = gr.Audio(
|
| 13 |
sources=["microphone"],
|
| 14 |
waveform_options=gr.WaveformOptions(
|
|
|
|
| 18 |
show_controls=False,
|
| 19 |
),
|
| 20 |
)
|
|
|
|
| 21 |
|
| 22 |
mic.stop_recording(
|
| 23 |
fn=reverse_audio,
|
| 24 |
inputs=mic,
|
| 25 |
outputs=gr.Audio()
|
| 26 |
)
|
| 27 |
+
'''
|
| 28 |
demo.launch()
|
| 29 |
|