Irpan commited on
Commit
c152595
·
1 Parent(s): da59a0f
Files changed (1) hide show
  1. util.py +2 -2
util.py CHANGED
@@ -123,8 +123,8 @@ def calculate_pronunciation_accuracy(reference_text, output_text, script_choice)
123
  comparison_md = "<h4>Pronunciation Feedback</h4>\n" # Small header
124
  comparison_md += "<div style='margin-top: 10px;'>\n" # Add some spacing
125
  for opcode, i1, i2, j1, j2 in matcher.get_opcodes():
126
- ref_segment = reference_ipa[i1:i2]
127
- out_segment = output_ipa[j1:j2]
128
 
129
  if opcode == 'equal': # Matching characters
130
  comparison_md += f'<span style="color: green; font-size: 20px;">{ref_segment}</span>'
 
123
  comparison_md = "<h4>Pronunciation Feedback</h4>\n" # Small header
124
  comparison_md += "<div style='margin-top: 10px;'>\n" # Add some spacing
125
  for opcode, i1, i2, j1, j2 in matcher.get_opcodes():
126
+ ref_segment = reference_text_clean[i1:i2]
127
+ out_segment = output_text_clean[j1:j2]
128
 
129
  if opcode == 'equal': # Matching characters
130
  comparison_md += f'<span style="color: green; font-size: 20px;">{ref_segment}</span>'