HusseinBashir commited on
Commit
232b195
·
verified ·
1 Parent(s): 4557f3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -94,11 +94,13 @@ 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
- if re.search(r'(?i)(zamzam|samsam)[\s\.\,\!\?]*$', text.strip()):
 
98
  text += " " # 4 space
99
 
100
  return text
101
 
 
102
  def tts(text):
103
  paragraphs = text.strip().split("\n")
104
  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 faaruq (space)
98
+ if re.search(r'(?i)(zamzam|samsam)[\s\.\,\!\?]*$', text.strip()):
99
  text += " " # 4 space
100
 
101
  return text
102
 
103
+
104
  def tts(text):
105
  paragraphs = text.strip().split("\n")
106
  audio_list = []