mic_test / test.py
chibop's picture
Upload folder using huggingface_hub
6644169 verified
raw
history blame contribute delete
552 Bytes
import gradio as gr
def get_audio(audio):
src = "https://onj.me/shorts/audio/02-Who%27s%20the%20bossa%21.mp3"
return f"<audio src='{src}' autoplay controls></audio>"
with gr.Blocks(title="Mic Test") as demo:
audio_element = gr.HTML()
play = gr.Button("Play Music")
play.click(get_audio, None, audio_element)
mic = gr.Microphone(editable=False, waveform_options={"show_controls":False})
mic.stop_recording(None, mic, None)
demo.launch()
#server_name="0.0.0.0", ssl_certfile="host.cert", ssl_keyfile="host.key", ssl_verify=False