MariaKaiser commited on
Commit
6b7aa18
·
verified ·
1 Parent(s): cbcccb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -321,15 +321,14 @@ async def concat_story_audio(story: StoryCreationDTO, base_output: str, final_pa
321
 
322
  # --- Add SFX for location if available ---
323
  if scene.location.path:
324
- continue
325
- # sfx_file = await download_file_from_url(scene.location.path)
326
- # if sfx_file:
327
- # sfx_file_wav = ensure_wav(sfx_file)
328
- # sfx_audio = AudioSegment.from_wav(sfx_file_wav)
329
- # scene_audio = scene_audio.overlay(sfx_audio)
330
- # # os.remove(sfx_file)
331
- # else:
332
- # print(f"SFX skipped for {scene.location.locationName}")
333
 
334
  # --- Add background music if available ---
335
  if scene.bgMusic and scene.bgMusic.musicPath:
 
321
 
322
  # --- Add SFX for location if available ---
323
  if scene.location.path:
324
+ sfx_file = await download_file_from_url(scene.location.path)
325
+ if sfx_file:
326
+ sfx_file_wav = ensure_wav(sfx_file)
327
+ sfx_audio = AudioSegment.from_wav(sfx_file_wav)
328
+ scene_audio = scene_audio.overlay(sfx_audio)
329
+ # os.remove(sfx_file)
330
+ else:
331
+ print(f"SFX skipped for {scene.location.locationName}")
 
332
 
333
  # --- Add background music if available ---
334
  if scene.bgMusic and scene.bgMusic.musicPath: