Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,13 +94,14 @@ def normalize_text(text):
|
|
| 94 |
text = text.replace("KH", "qa").replace("Z", "S")
|
| 95 |
text = text.replace("SH", "SHa'a").replace("DH", "Dha'a")
|
| 96 |
|
| 97 |
-
# ➤ Haddii jumladda ku dhammaato zamzam ama samsam, ku dar
|
| 98 |
if re.search(r'(?i)(zamzam|samsam)[\s\.\,\!\?]*$', text.strip()):
|
| 99 |
-
text += "
|
| 100 |
|
| 101 |
return text
|
| 102 |
|
| 103 |
|
|
|
|
| 104 |
def tts(text):
|
| 105 |
paragraphs = text.strip().split("\n")
|
| 106 |
audio_list = []
|
|
|
|
| 94 |
text = text.replace("KH", "qa").replace("Z", "S")
|
| 95 |
text = text.replace("SH", "SHa'a").replace("DH", "Dha'a")
|
| 96 |
|
| 97 |
+
# ➤ Haddii jumladda ku dhammaato zamzam ama samsam, ku dar " ah"
|
| 98 |
if re.search(r'(?i)(zamzam|samsam)[\s\.\,\!\?]*$', text.strip()):
|
| 99 |
+
text += " ah"
|
| 100 |
|
| 101 |
return text
|
| 102 |
|
| 103 |
|
| 104 |
+
|
| 105 |
def tts(text):
|
| 106 |
paragraphs = text.strip().split("\n")
|
| 107 |
audio_list = []
|