Update app.py
Browse files
app.py
CHANGED
@@ -369,7 +369,7 @@ def generate_video():
|
|
369 |
try:
|
370 |
if request.method == 'POST':
|
371 |
# source_image = request.files['source_image']
|
372 |
-
image_path = '/home/user/app/images/
|
373 |
source_image = Image.open(image_path)
|
374 |
text_prompt = request.form['text_prompt']
|
375 |
|
@@ -426,7 +426,7 @@ def generate_video():
|
|
426 |
print('Entering Audio creation using elevenlabs')
|
427 |
set_api_key("92e149985ea2732b4359c74346c3daee")
|
428 |
|
429 |
-
audio = generate(text = text_prompt, voice = "
|
430 |
with tempfile.NamedTemporaryFile(suffix=".mp3", prefix="text_to_speech_",dir=TEMP_DIR.name, delete=False) as temp_file:
|
431 |
for chunk in audio:
|
432 |
temp_file.write(chunk)
|
|
|
369 |
try:
|
370 |
if request.method == 'POST':
|
371 |
# source_image = request.files['source_image']
|
372 |
+
image_path = '/home/user/app/images/new_avatar.png'
|
373 |
source_image = Image.open(image_path)
|
374 |
text_prompt = request.form['text_prompt']
|
375 |
|
|
|
426 |
print('Entering Audio creation using elevenlabs')
|
427 |
set_api_key("92e149985ea2732b4359c74346c3daee")
|
428 |
|
429 |
+
audio = generate(text = text_prompt, voice = "George", model = "eleven_multilingual_v2",stream=True, latency=4)
|
430 |
with tempfile.NamedTemporaryFile(suffix=".mp3", prefix="text_to_speech_",dir=TEMP_DIR.name, delete=False) as temp_file:
|
431 |
for chunk in audio:
|
432 |
temp_file.write(chunk)
|