cnph001 commited on
Commit
d06b00b
·
verified ·
1 Parent(s): a86bdd5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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