asr-test / app.py
shariar076's picture
Update app.py
5f661ec verified
raw
history blame
793 Bytes
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()