mr2along commited on
Commit
fab7002
·
verified ·
1 Parent(s): 3b3baf1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -95,9 +95,6 @@ def compare_texts(reference_text, transcribed_text):
95
  # Provide audio for incorrect words
96
  if incorrect_words_audios:
97
  html_output += "<br><strong>Pronunciation for Incorrect Words:</strong><br>"
98
- for audio_path in incorrect_words_audios:
99
- html_output += f'<audio controls><source src="{audio_path}" type="audio/mpeg">Your browser does not support the audio tag.</audio><br>'
100
-
101
  return [html_output, incorrect_words_audios]
102
 
103
  # Step 4: Text-to-Speech Function
@@ -137,7 +134,7 @@ interface = gr.Interface(
137
  tts_interface = gr.Interface(
138
  fn=text_to_speech,
139
  inputs=gr.Textbox(lines=5, label="Input Paragraph to Read Aloud"),
140
- outputs=gr.Audio(label="Text-to-Speech Output"),
141
  title="Text-to-Speech",
142
  description="This tool will read your input paragraph aloud."
143
  )
 
95
  # Provide audio for incorrect words
96
  if incorrect_words_audios:
97
  html_output += "<br><strong>Pronunciation for Incorrect Words:</strong><br>"
 
 
 
98
  return [html_output, incorrect_words_audios]
99
 
100
  # Step 4: Text-to-Speech Function
 
134
  tts_interface = gr.Interface(
135
  fn=text_to_speech,
136
  inputs=gr.Textbox(lines=5, label="Input Paragraph to Read Aloud"),
137
+ outputs=gr.Microphone(label="Text-to-Speech Output"),
138
  title="Text-to-Speech",
139
  description="This tool will read your input paragraph aloud."
140
  )