Update app.py
Browse files
app.py
CHANGED
@@ -202,8 +202,8 @@ if uploaded_file:
|
|
202 |
# Translate the diagnosis to the target language
|
203 |
translator = Translator()
|
204 |
translated_text = translator.translate(diagnosis, dest=language).text
|
205 |
-
|
206 |
-
filtered_text = ''.join
|
207 |
# Now process the translated text for TTS
|
208 |
audio_bytes = text_to_speech(filtered_text, language)
|
209 |
if audio_bytes:
|
|
|
202 |
# Translate the diagnosis to the target language
|
203 |
translator = Translator()
|
204 |
translated_text = translator.translate(diagnosis, dest=language).text
|
205 |
+
# Filter out unwanted characters like '#' and '*'
|
206 |
+
filtered_text = ''.join[c for c in translated_text if c not in ['#', '*']]
|
207 |
# Now process the translated text for TTS
|
208 |
audio_bytes = text_to_speech(filtered_text, language)
|
209 |
if audio_bytes:
|