File size: 793 Bytes
55b7f86
e2052ea
 
 
 
 
 
55b7f86
e2052ea
 
 
 
 
 
 
 
 
 
5f661ec
e2052ea
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import gradio as gr
# import os
# os.environ.get("HF_REPO_ID")
# Define the function that will process the audio input
def process_audio(audio):
    # Here you can add your audio processing code
    return f"Received audio file: {audio}"

# Create a list of example audio files
examples = [
    ["https://huggingface.co/MedAiHealth/BanglaASR-MedAI/resolve/main/wav/sample_1.wav"],
    ["https://huggingface.co/MedAiHealth/BanglaASR-MedAI/resolve/main/wav/sample_2.wav"],
    ["https://huggingface.co/MedAiHealth/BanglaASR-MedAI/resolve/main/wav/sample_3.wav"]
]

# Create the Gradio interface
interface = gr.Interface(
    fn=process_audio,
    inputs=gr.Audio(sources="microphone", type="filepath"),
    outputs=gr.Textbox(),
    examples=examples
)

# Launch the interface
interface.launch()