From d169d4b36ee884d9219ed31d461d7eb9eb472fe3 Mon Sep 17 00:00:00 2001 From: Alexander Metzger Date: Tue, 26 Sep 2023 22:11:48 -0700 Subject: [PATCH] use call_celery_task_outfile --- recipes/TextToSpeech.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/recipes/TextToSpeech.py b/recipes/TextToSpeech.py index 927abcdb1..9b5bdbc51 100644 --- a/recipes/TextToSpeech.py +++ b/recipes/TextToSpeech.py @@ -12,7 +12,7 @@ from daras_ai.image_input import upload_file_from_bytes, storage_blob_for from daras_ai_v2 import settings from daras_ai_v2.base import BasePage -from daras_ai_v2.gpu_server import GpuEndpoints, call_celery_task +from daras_ai_v2.gpu_server import GpuEndpoints, call_celery_task_outfile from daras_ai_v2.loom_video_widget import youtube_video from daras_ai_v2.text_to_speech_settings_widgets import ( UBERDUCK_VOICES, @@ -185,7 +185,7 @@ def run(self, state: dict): else: time.sleep(0.1) case TextToSpeechProviders.SEAMLESS: - data = call_celery_task( + data = call_celery_task_outfile( "seamless", pipeline=dict( model_id="seamlessM4T_large", @@ -196,11 +196,10 @@ def run(self, state: dict): tgt_lang=state["seamless_output_language"], src_lang=state["seamless_input_language"], ), + content_type="audio/wav", + filename="seamless_gen.wav", ) - audio_url = upload_file_from_bytes( - "seamless_gen.wav", data.get("audio") - ) - state["audio_url"] = audio_url + state["audio_url"] = data[0] case TextToSpeechProviders.GOOGLE_TTS: voice_name = ( state["google_voice_name"]