Update app.py
Browse files
app.py
CHANGED
@@ -35,11 +35,13 @@ async def paragraph_to_speech(text, voice, rate, pitch):
|
|
35 |
if re.match(r'SS\d+\.?\d*', part):
|
36 |
# At the top of your file:
|
37 |
#SILENCE_PATH = Path(__file__).parent.absolute() / "Silence.mp3"
|
|
|
|
|
38 |
# At the top of your file:
|
39 |
-
SILENCE_PATH = Path(__file__).parent.absolute() / "static" / "intro.mp3"
|
40 |
if SILENCE_PATH.exists():
|
41 |
audio_segments.append(str(SILENCE_PATH))
|
42 |
-
print(f"Silence
|
43 |
else:
|
44 |
print(f"Silence.mp3 file NOT FOUND")
|
45 |
elif part.strip():
|
|
|
35 |
if re.match(r'SS\d+\.?\d*', part):
|
36 |
# At the top of your file:
|
37 |
#SILENCE_PATH = Path(__file__).parent.absolute() / "Silence.mp3"
|
38 |
+
# At the top of your file (assuming you uploaded "Silence.mp3" to root)
|
39 |
+
SILENCE_PATH = Path(__file__).parent.absolute() / "Silence.mp3"
|
40 |
# At the top of your file:
|
41 |
+
#SILENCE_PATH = Path(__file__).parent.absolute() / "static" / "intro.mp3"
|
42 |
if SILENCE_PATH.exists():
|
43 |
audio_segments.append(str(SILENCE_PATH))
|
44 |
+
print(f"Silence.mp3 file found at {SILENCE_PATH} and is inserted")
|
45 |
else:
|
46 |
print(f"Silence.mp3 file NOT FOUND")
|
47 |
elif part.strip():
|