Abdurahman commited on
Commit
16f2d30
·
1 Parent(s): 471da93
Files changed (1) hide show
  1. asr.py +4 -3
asr.py CHANGED
@@ -49,10 +49,11 @@ def check_pronunciation(input_text, script, user_audio):
49
  ug_latn_to_arab = UgMultiScriptConverter('ULS', 'UAS')
50
  transcript_ugArab_box = ug_latn_to_arab(transcript_ugLatn_box)
51
 
52
- # Get IPA and Pronunciation Feedback
53
  if script == 'Uyghur Latin':
54
- input_text = ug_latn_to_arab(input_text) # make sure input text is arabic script to IPA conversion
55
- machine_pronunciation, user_pronunciation, pronunciation_match, pronunciation_score = util.calculate_pronunciation_accuracy(
 
 
56
  reference_text = input_text,
57
  output_text = transcript_ugArab_box,
58
  language_code='uig-Arab')
 
49
  ug_latn_to_arab = UgMultiScriptConverter('ULS', 'UAS')
50
  transcript_ugArab_box = ug_latn_to_arab(transcript_ugLatn_box)
51
 
 
52
  if script == 'Uyghur Latin':
53
+ input_text = ug_latn_to_arab(input_text) # make sure input text is arabic script for IPA conversion
54
+
55
+ # Get IPA and Pronunciation Feedback
56
+ machine_pronunciation, user_pronunciation, pronunciation_match, pronunciation_score = util.calculate_pronunciation_accuracy(
57
  reference_text = input_text,
58
  output_text = transcript_ugArab_box,
59
  language_code='uig-Arab')