Update app.py
Browse files
app.py
CHANGED
@@ -56,8 +56,8 @@ async def paragraph_to_speech(text, voice, rate, pitch):
|
|
56 |
audio_segments = []
|
57 |
silence_durations = []
|
58 |
parts = re.split(r'(SS\d+\.?\d*)', text)
|
59 |
-
silence_duration = float(part[2:]) * 1000 # Convert to milliseconds
|
60 |
for part in parts:
|
|
|
61 |
if re.match(r'SS\d+\.?\d*', part):
|
62 |
# At the top of your file:
|
63 |
#SILENCE_PATH = Path(__file__).parent.absolute() / "Silence.mp3"
|
|
|
56 |
audio_segments = []
|
57 |
silence_durations = []
|
58 |
parts = re.split(r'(SS\d+\.?\d*)', text)
|
|
|
59 |
for part in parts:
|
60 |
+
silence_duration = float(part[2:]) * 1000 # Convert to milliseconds
|
61 |
if re.match(r'SS\d+\.?\d*', part):
|
62 |
# At the top of your file:
|
63 |
#SILENCE_PATH = Path(__file__).parent.absolute() / "Silence.mp3"
|