Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ async def paragraph_to_speech(text, voice, rate, pitch):
|
|
61 |
for part in parts:
|
62 |
if (re.search(r'-?\d+', part)): #if there are any digit following the voice tag, eg 1F20 or 1F-20
|
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 |
|
|
|
61 |
for part in parts:
|
62 |
if (re.search(r'-?\d+', part)): #if there are any digit following the voice tag, eg 1F20 or 1F-20
|
63 |
match = re.search(r'-?\d+', part)
|
64 |
+
pitch = int(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 |
|