import gradio as gr import os HF_API = os.getenv("HF_API") API_URL = os.getenv("API_URL") # path to Seamlessm4t API endpoint DESCRIPTION = """ # Seamlessm4t + Speaker Diarization + Voice Activity Detection Here we use seamlessm4t to generate captions for full audios. Audio can be of arbitrary length. """ DUPLICATE = """ To duplicate this repo, you have to give permission from three reopsitories and accept all user conditions: 1- https://huggingface.co/pyannote/voice-activity-detection 2- hf.co/pyannote/segmentation 3- hf.co/pyannote/speaker-diarization """ with gr.Blocks() as demo: gr.Markdown(DESCRIPTION) target_language = gr.Dropdown(choices=["French", "Spanish", "German"]) audio_source = gr.Radio(choices=["microphone", "file"]) mic_input = gr.Audio(source="microphone", visible=False) file_input = gr.Audio(source="upload", visible=False) output = gr.Textbox() gr.Markdown(DUPLICATE) demo.queue(max_size=50).launch()