Update app.py
Browse files
app.py
CHANGED
@@ -38,12 +38,7 @@ async def paragraph_to_speech(text, voice, rate, pitch):
|
|
38 |
audio_segments.append(str(SILENCE_PATH))
|
39 |
print(f"Silence added at {SILENCE_PATH}")
|
40 |
else:
|
41 |
-
|
42 |
-
silent_audio = AudioSegment.silent(duration=1000) # 1 second
|
43 |
-
with tempfile.NamedTemporaryFile(delete=False, suffix=".mp3") as tmp_file:
|
44 |
-
silent_audio.export(tmp_file.name, format="mp3")
|
45 |
-
audio_segments.append(tmp_file.name)
|
46 |
-
print(f"Created silent segment at {tmp_file.name}")
|
47 |
elif part.strip():
|
48 |
processed_text = part
|
49 |
current_voice = voice
|
|
|
38 |
audio_segments.append(str(SILENCE_PATH))
|
39 |
print(f"Silence added at {SILENCE_PATH}")
|
40 |
else:
|
41 |
+
print(f"Silence.mp3 file NOT FOUND")
|
|
|
|
|
|
|
|
|
|
|
42 |
elif part.strip():
|
43 |
processed_text = part
|
44 |
current_voice = voice
|