Abdurahman
commited on
Commit
·
16f2d30
1
Parent(s):
471da93
app
Browse files
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
|
55 |
-
|
|
|
|
|
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')
|