fahadqazi commited on
Commit
5c3a771
·
1 Parent(s): 8866da3

added readme

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -162,7 +162,19 @@ def analyze_accent(url_or_file):
162
 
163
 
164
  with gr.Blocks() as demo:
165
- gr.Markdown("# English Accent Classifier")
 
 
 
 
 
 
 
 
 
 
 
 
166
 
167
  with gr.Tab("From URL"):
168
  url_input = gr.Textbox(label="Video URL (MP4)")
@@ -194,9 +206,10 @@ with gr.Blocks() as demo:
194
  )
195
 
196
 
 
197
  demo.css = """
198
  .output-box {
199
- min-height: 100px;
200
  overflow-y: auto;
201
  padding: 10px;
202
  }
 
162
 
163
 
164
  with gr.Blocks() as demo:
165
+
166
+ gr.Markdown("""
167
+ # English Accent Classifier!
168
+
169
+ ### How it works?
170
+ - Takes video URL or video file
171
+ - Converts it into audio
172
+ - Uses `Whisper-tiny` to detect which language is being spoken
173
+ - If the detected language is English, it uses SpeechBrain's Accent ID classifier to show the speaker's accent along with a confidence score.
174
+
175
+ **Q: What if my transformers version doesn't expose `return_language` for `whisper-tiny`?**
176
+ A: Then it will approximate the language by counting which language's tokens it is using the most.
177
+ """)
178
 
179
  with gr.Tab("From URL"):
180
  url_input = gr.Textbox(label="Video URL (MP4)")
 
206
  )
207
 
208
 
209
+
210
  demo.css = """
211
  .output-box {
212
+ min-height: 70px;
213
  overflow-y: auto;
214
  padding: 10px;
215
  }