Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -121,7 +121,6 @@ def compare_texts(reference_text, transcribed_text):
|
|
121 |
|
122 |
# Provide audio for incorrect words
|
123 |
if incorrect_words_audios:
|
124 |
-
filePath=upfilepath()
|
125 |
html_output += "<br><strong>Pronunciation for Incorrect Words:</strong><br>"
|
126 |
for word, audio in incorrect_words_audios:
|
127 |
suggestion = difflib.get_close_matches(word, reference_words, n=1)
|
@@ -145,6 +144,7 @@ def text_to_speech(paragraph):
|
|
145 |
# Gradio Interface Function
|
146 |
def gradio_function(paragraph, audio):
|
147 |
# Transcribe the audio
|
|
|
148 |
transcribed_text = transcribe_audio(audio)
|
149 |
|
150 |
# Compare the original paragraph with the transcribed text
|
|
|
121 |
|
122 |
# Provide audio for incorrect words
|
123 |
if incorrect_words_audios:
|
|
|
124 |
html_output += "<br><strong>Pronunciation for Incorrect Words:</strong><br>"
|
125 |
for word, audio in incorrect_words_audios:
|
126 |
suggestion = difflib.get_close_matches(word, reference_words, n=1)
|
|
|
144 |
# Gradio Interface Function
|
145 |
def gradio_function(paragraph, audio):
|
146 |
# Transcribe the audio
|
147 |
+
filePath=upfilepath()
|
148 |
transcribed_text = transcribe_audio(audio)
|
149 |
|
150 |
# Compare the original paragraph with the transcribed text
|