Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,7 @@ async def paragraph_to_speech(text, voice, rate, pitch):
|
|
63 |
match = re.search(r'-?\d+', part)
|
64 |
pitch = match.group() #Set pitch to set value as noted in the tag
|
65 |
# Remove only the first integer found
|
66 |
-
part = re.sub(r'-?\d+', '',
|
67 |
|
68 |
if re.match(r'SS\d+\.?\d*', part): #Check if there is Silence tag
|
69 |
# At the top of your file:
|
|
|
63 |
match = re.search(r'-?\d+', part)
|
64 |
pitch = match.group() #Set pitch to set value as noted in the tag
|
65 |
# Remove only the first integer found
|
66 |
+
part = re.sub(r'-?\d+', '', part, count=1).strip() #cut out the pitch int from text part
|
67 |
|
68 |
if re.match(r'SS\d+\.?\d*', part): #Check if there is Silence tag
|
69 |
# At the top of your file:
|