mic_test / test.py
chibop's picture
Upload folder using huggingface_hub
227d904 verified
raw
history blame
488 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()
mic = gr.Microphone(editable=False, waveform_options={"show_controls":False})
mic.stop_recording(get_audio, mic, audio_element)
demo.launch()
#server_name="0.0.0.0", ssl_certfile="host.cert", ssl_keyfile="host.key", ssl_verify=False