From 181527b16d31d5a2b8fc5b8a231a6609ad2557cf Mon Sep 17 00:00:00 2001 From: Geovanny Risco Date: Fri, 14 Jun 2024 16:34:49 +0200 Subject: [PATCH] save audio and vide in tmp folder --- laia/avatar.py | 2 +- laia/text2audio.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/laia/avatar.py b/laia/avatar.py index d7330d3..55537a4 100644 --- a/laia/avatar.py +++ b/laia/avatar.py @@ -25,7 +25,7 @@ def generate_video(audio_path): response.raise_for_status() # Save the response blob as a file - result_file = Path("result_video.mp4") + result_file = Path("/tmp/result_video.mp4") with open(result_file, "wb") as video_file: video_file.write(response.content) logger.info(f"File uploaded successfully. Video saved as '{result_file}'") diff --git a/laia/text2audio.py b/laia/text2audio.py index e5d3663..f22e09f 100644 --- a/laia/text2audio.py +++ b/laia/text2audio.py @@ -21,7 +21,7 @@ def generate_audio( voice=voice, model=model, ) - audio_path = Path(f"audio.mp3") + audio_path = Path(f"/tmp/audio.mp3") save(audio, str(audio_path)) return audio_path