Drew commited on
Commit
8d44ee8
1 Parent(s): 37a643a
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -476,7 +476,10 @@ def gen_tts_and_save_to_path(text, filename):
476
  text=text,
477
  model="eleven_turbo_v2"
478
  )
 
479
  full_path = "audio/" + filename + ".mp3"
 
 
480
  save(audio, full_path)
481
  return full_path
482
 
 
476
  text=text,
477
  model="eleven_turbo_v2"
478
  )
479
+
480
  full_path = "audio/" + filename + ".mp3"
481
+ os.makedirs(os.path.dirname(full_path), exist_ok=True)
482
+
483
  save(audio, full_path)
484
  return full_path
485