import gradio as gr with gr.Blocks(theme="base") as demo: gr.Markdown("

🔊 Transcribe Anything

") with gr.Tab("Input"): with gr.Row(): with gr.Column(): source = gr.Radio(label="Source type", choices=[("Audio", "audio"), ("Video", "video"), ("YouTube URL", "youtube")], value="Audio") @gr.render(inputs=source) def show_source(s): if s == "Audio": gr.Audio() elif s == "Video": gr.Video() elif s == "YouTube URL": t = gr.Textbox(placeholder="https://www.youtube.com/watch?v=44vi31hehw4") h = gr.HTML(label="Video preview") t.change(convert_to_embed_url, t, h) with gr.Column(): gr.Dropdown(label="Languages", choices=["(Autodetect)", "English"], value="(Autodetect)") gr.CheckboxGroup(label="Cleanup Transcript with LLM", choices=["Remove typos", "Separate into paragraphs"]) gr.Checkbox(label="Diarize Speakers (coming soon)", interactive=False) transcribe_btn = gr.Button("Transcribe!") with gr.Tab("Result"): pass with gr.Tab("Summarize"): pass with gr.Tab("Chat"): pass demo.launch()