Spaces:
Sleeping
Sleeping
File size: 844 Bytes
c0cf0be |
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 26 27 |
import gradio as gr
import librosa
from asr import transcribe_auto, ASR_EXAMPLES, ASR_NOTE # Modify transcribe_auto to auto-detect language
# Speech-to-Text Interface without language selection
mms_transcribe = gr.Interface(
fn=transcribe_auto, # Function that automatically detects language
inputs=gr.Audio(),
outputs="text",
examples=ASR_EXAMPLES,
title="Speech-to-Text",
description="Automatically transcribes audio in either English or Swahili.",
article=ASR_NOTE,
allow_flagging="never",
)
# Main Gradio App
with gr.Blocks() as demo:
gr.Markdown("<p align='center' style='font-size: 20px;'>MMS Speech-to-Text</p>")
gr.HTML("<center>Automatically convert speech to text in English or Swahili.</center>")
mms_transcribe.render()
if __name__ == "__main__":
demo.queue()
demo.launch()
|