Irpan commited on
Commit
6c7e7fa
1 Parent(s): b50881a
Files changed (2) hide show
  1. app.py +2 -2
  2. asr.py +1 -1
app.py CHANGED
@@ -76,12 +76,12 @@ with gr.Blocks() as app:
76
  with gr.Group():
77
  with gr.Row():
78
  transcript_ugArab_box = gr.Textbox(
79
- label="User Transcript (Arabic Script)",
80
  placeholder="ASR transcription of user audio..."
81
  )
82
  with gr.Row():
83
  transcript_ugLatn_box = gr.Textbox(
84
- label="User Transcript (Latin Script)",
85
  placeholder="ASR transcription of user audio..."
86
  )
87
  # IPA
 
76
  with gr.Group():
77
  with gr.Row():
78
  transcript_ugArab_box = gr.Textbox(
79
+ label="User Pronunciation Transcript (Arabic Script)",
80
  placeholder="ASR transcription of user audio..."
81
  )
82
  with gr.Row():
83
  transcript_ugLatn_box = gr.Textbox(
84
+ label="User Pronunciation Transcript (Latin Script)",
85
  placeholder="ASR transcription of user audio..."
86
  )
87
  # IPA
asr.py CHANGED
@@ -33,7 +33,7 @@ def asr(audio_data, target_rate = 16000):
33
  sampling_rate = target_rate
34
 
35
  # Process audio through ASR model
36
- inputs = asr_processor(audio_input.squeeze(), sampling_rate=sampling_rate, return_tensors="pt", padding=True)
37
  inputs = {key: val.to(device) for key, val in inputs.items()}
38
  with torch.no_grad():
39
  logits = asr_model(**inputs).logits
 
33
  sampling_rate = target_rate
34
 
35
  # Process audio through ASR model
36
+ inputs = asr_processor(audio_input.squeeze(), sampling_rate=sampling_rate, return_tensors="pt")
37
  inputs = {key: val.to(device) for key, val in inputs.items()}
38
  with torch.no_grad():
39
  logits = asr_model(**inputs).logits