Rausda6 commited on
Commit
f2c838f
·
verified ·
1 Parent(s): a4e0dab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -290,7 +290,8 @@ Requirements:
290
  - Natural conversation style
291
  - The podcast should be long.
292
  - Do not use names for the speakers.
293
- - The podcast should be professional, in-depth, interesting, lively, and engaging, and hook the listener from the start.
 
294
  - The input text might be disorganized or unformatted, originating from sources like PDFs or text files. Ignore any formatting inconsistencies or irrelevant details; your task is to distill the essential points, identify key definitions, and highlight intriguing facts that would be suitable for discussion in a podcast.
295
  - The script must be in JSON format.
296
  - {language_instruction}
@@ -366,7 +367,7 @@ Example JSON structure:
366
  add_log(f"🔍 Traceback: {traceback.format_exc()}")
367
 
368
  # Return robust fallback
369
- return self.create_fallback_podcast(prompt or "General Discussion")
370
 
371
  async def tts_generate(self, text: str, speaker: int, speaker1: str, speaker2: str) -> str:
372
  """Improved TTS generation with better error handling - CRITICAL FIX #7"""
@@ -428,7 +429,7 @@ Example JSON structure:
428
 
429
  try:
430
  combined_audio = AudioSegment.empty()
431
- silence_padding = AudioSegment.silent(duration=800) # 800ms silence
432
 
433
  for i, audio_file in enumerate(audio_files):
434
  try:
 
290
  - Natural conversation style
291
  - The podcast should be long.
292
  - Do not use names for the speakers.
293
+ - The Podcast starts with : welcome to our todays podcast !
294
+ - The podcast should be professional, in-depth, interesting, lively, witty and engaging, and hook the listener from the start.
295
  - The input text might be disorganized or unformatted, originating from sources like PDFs or text files. Ignore any formatting inconsistencies or irrelevant details; your task is to distill the essential points, identify key definitions, and highlight intriguing facts that would be suitable for discussion in a podcast.
296
  - The script must be in JSON format.
297
  - {language_instruction}
 
367
  add_log(f"🔍 Traceback: {traceback.format_exc()}")
368
 
369
  # Return robust fallback
370
+ return self.create_fallback_podcast("Welcome to our podcas")
371
 
372
  async def tts_generate(self, text: str, speaker: int, speaker1: str, speaker2: str) -> str:
373
  """Improved TTS generation with better error handling - CRITICAL FIX #7"""
 
429
 
430
  try:
431
  combined_audio = AudioSegment.empty()
432
+ silence_padding = AudioSegment.silent(duration=400) # 800ms silence
433
 
434
  for i, audio_file in enumerate(audio_files):
435
  try: