cnph001 commited on
Commit
8462870
·
verified ·
1 Parent(s): 9995337

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -121,6 +121,8 @@ async def paragraph_to_speech(text, voice, rate, pitch):
121
  # Step 2: Remove the found number from the string
122
  new_text = re.sub(r'(?<=\D)-?\d+', '', part, count=1).strip()
123
  processed_text = new_text[2:] #cut out the prefix like 1F, 3M etc
 
 
124
  rate_str = f"{current_rate:+d}%"
125
  #if part[2:4].isdigit():
126
  # processed_text = part[4:]
 
121
  # Step 2: Remove the found number from the string
122
  new_text = re.sub(r'(?<=\D)-?\d+', '', part, count=1).strip()
123
  processed_text = new_text[2:] #cut out the prefix like 1F, 3M etc
124
+ else:
125
+ processed_text = part[2:]
126
  rate_str = f"{current_rate:+d}%"
127
  #if part[2:4].isdigit():
128
  # processed_text = part[4:]