Spaces:
Sleeping
Sleeping
Update tools.py
Browse files
tools.py
CHANGED
@@ -124,6 +124,10 @@ def apply_zoom_in_effect(clip, zoom_factor=1.2):
|
|
124 |
|
125 |
@tool
|
126 |
def create_video_from_images_and_audio(images_dir, speeches_dir, zoom_factor=1.2):
|
|
|
|
|
|
|
|
|
127 |
client = Groq(api_key='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')
|
128 |
images_paths = sorted(os.listdir(images_dir))
|
129 |
audio_paths = sorted(os.listdir(speeches_dir))
|
@@ -265,6 +269,8 @@ def speech_generator(script):
|
|
265 |
"""
|
266 |
Generates speech files for the given script using gTTS.
|
267 |
Saves them to a temporary directory and returns the path.
|
|
|
|
|
268 |
"""
|
269 |
speeches_dir = tempfile.mkdtemp()
|
270 |
|
|
|
124 |
|
125 |
@tool
|
126 |
def create_video_from_images_and_audio(images_dir, speeches_dir, zoom_factor=1.2):
|
127 |
+
"""Creates video using images and audios.
|
128 |
+
Args:
|
129 |
+
images_dir: path to images folder
|
130 |
+
speeches_dir: path to speeches folder"""
|
131 |
client = Groq(api_key='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')
|
132 |
images_paths = sorted(os.listdir(images_dir))
|
133 |
audio_paths = sorted(os.listdir(speeches_dir))
|
|
|
269 |
"""
|
270 |
Generates speech files for the given script using gTTS.
|
271 |
Saves them to a temporary directory and returns the path.
|
272 |
+
Args:
|
273 |
+
script: a complete script containing narrations and image descriptions.
|
274 |
"""
|
275 |
speeches_dir = tempfile.mkdtemp()
|
276 |
|