mr2along commited on
Commit
40cb73b
·
verified ·
1 Parent(s): 75a05dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -116,8 +116,8 @@ def compare_texts(reference_text, transcribed_text):
116
  html_output += f'<span style="color: red;">{word}</span> '
117
  # Create pronunciation audio for the incorrect word
118
  audio_file_path = create_pronunciation_audio(word)
119
- #incorrect_words_audios.append((word, audio_file_path))
120
- incorrect_words_audios.append( audio_file_path)
121
  except IndexError:
122
  html_output += f'<span style="color: red;">{word}</span> ' # Words in reference that were not transcribed
123
 
@@ -131,7 +131,7 @@ def compare_texts(reference_text, transcribed_text):
131
  html_output += f'<audio controls><source src="{audio}" type="audio/wav">Your browser does not support the audio tag.</audio>{suggestion_text}<br>'
132
 
133
 
134
- return [html_output, incorrect_words_audios]
135
 
136
  # Step 4: Text-to-Speech Function
137
  def text_to_speech(paragraph):
 
116
  html_output += f'<span style="color: red;">{word}</span> '
117
  # Create pronunciation audio for the incorrect word
118
  audio_file_path = create_pronunciation_audio(word)
119
+ incorrect_words_audios.append((word, audio_file_path))
120
+ incorrect_words.append( audio_file_path)
121
  except IndexError:
122
  html_output += f'<span style="color: red;">{word}</span> ' # Words in reference that were not transcribed
123
 
 
131
  html_output += f'<audio controls><source src="{audio}" type="audio/wav">Your browser does not support the audio tag.</audio>{suggestion_text}<br>'
132
 
133
 
134
+ return [html_output, incorrect_words]
135
 
136
  # Step 4: Text-to-Speech Function
137
  def text_to_speech(paragraph):