Futuresony commited on
Commit
780636a
·
verified ·
1 Parent(s): 40c9fce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -1,23 +1,20 @@
1
  import gradio as gr
2
- import librosa
3
- from asr import transcribe_auto, ASR_EXAMPLES, ASR_NOTE # Modify transcribe_auto to auto-detect language
4
 
5
- # Speech-to-Text Interface without language selection
6
  mms_transcribe = gr.Interface(
7
- fn=transcribe_auto, # Function that automatically detects language
8
  inputs=gr.Audio(),
9
  outputs="text",
10
- examples=ASR_EXAMPLES,
11
- title="Speech-to-Text",
12
- description="Automatically transcribes audio in either English or Swahili.",
13
- article=ASR_NOTE,
14
  allow_flagging="never",
15
  )
16
 
17
  # Main Gradio App
18
  with gr.Blocks() as demo:
19
  gr.Markdown("<p align='center' style='font-size: 20px;'>MMS Speech-to-Text</p>")
20
- gr.HTML("<center>Automatically convert speech to text in English or Swahili.</center>")
21
 
22
  mms_transcribe.render()
23
 
 
1
  import gradio as gr
2
+ from asr import transcribe_auto # Import the updated function
 
3
 
4
+ # Speech-to-Text Interface
5
  mms_transcribe = gr.Interface(
6
+ fn=transcribe_auto,
7
  inputs=gr.Audio(),
8
  outputs="text",
9
+ title="Multilingual Speech-to-Text",
10
+ description="Automatically detects and transcribes English or Swahili speech.",
 
 
11
  allow_flagging="never",
12
  )
13
 
14
  # Main Gradio App
15
  with gr.Blocks() as demo:
16
  gr.Markdown("<p align='center' style='font-size: 20px;'>MMS Speech-to-Text</p>")
17
+ gr.HTML("<center>Upload or record audio. The model will automatically detect the language (English or Swahili) and transcribe.</center>")
18
 
19
  mms_transcribe.render()
20