@@ -38,6 +38,7 @@ def call(cls,
3838 negative_prompt : str = None ,
3939 template : str = None ,
4040 img_url : str = None ,
41+ audio_url : str = None ,
4142 api_key : str = None ,
4243 extra_input : Dict = None ,
4344 workspace : str = None ,
@@ -56,6 +57,7 @@ def call(cls,
5657 negative_prompt (str): The negative prompt is the opposite of the prompt meaning.
5758 template (str): LoRa input, such as gufeng, katong, etc.
5859 img_url (str): The input image url, Generate the URL of the image referenced by the video.
60+ audio_url (str): The input audio url
5961 api_key (str, optional): The api api_key. Defaults to None.
6062 workspace (str): The dashscope workspace id.
6163 extra_input (Dict): The extra input parameters.
@@ -76,6 +78,7 @@ def call(cls,
7678 return super ().call (model ,
7779 prompt ,
7880 img_url = img_url ,
81+ audio_url = audio_url ,
7982 api_key = api_key ,
8083 extend_prompt = extend_prompt ,
8184 negative_prompt = negative_prompt ,
@@ -94,6 +97,7 @@ def _get_input(cls,
9497 model : str ,
9598 prompt : Any = None ,
9699 img_url : str = None ,
100+ audio_url : str = None ,
97101 # """@deprecated, use prompt_extend in parameters """
98102 extend_prompt : bool = True ,
99103 negative_prompt : str = None ,
@@ -125,6 +129,13 @@ def _get_input(cls,
125129 has_upload = True
126130 inputs ['img_url' ] = res_img_url
127131
132+ if audio_url is not None and audio_url :
133+ is_upload , res_audio_url = check_and_upload_local (
134+ model , audio_url , api_key )
135+ if is_upload :
136+ has_upload = True
137+ inputs ['audio_url' ] = res_audio_url
138+
128139 if head_frame is not None and head_frame :
129140 is_upload , res_head_frame = check_and_upload_local (
130141 model , head_frame , api_key )
@@ -172,6 +183,7 @@ def async_call(cls,
172183 model : str ,
173184 prompt : Any = None ,
174185 img_url : str = None ,
186+ audio_url : str = None ,
175187 # """@deprecated, use prompt_extend in parameters """
176188 extend_prompt : bool = True ,
177189 negative_prompt : str = None ,
@@ -194,6 +206,7 @@ def async_call(cls,
194206 negative_prompt (str): The negative prompt is the opposite of the prompt meaning.
195207 template (str): LoRa input, such as gufeng, katong, etc.
196208 img_url (str): The input image url, Generate the URL of the image referenced by the video.
209+ audio_url (str): The input audio url.
197210 api_key (str, optional): The api api_key. Defaults to None.
198211 workspace (str): The dashscope workspace id.
199212 extra_input (Dict): The extra input parameters.
@@ -215,7 +228,7 @@ def async_call(cls,
215228 task_group , function = _get_task_group_and_task (__name__ )
216229
217230 inputs , kwargs , task = cls ._get_input (
218- model , prompt , img_url , extend_prompt , negative_prompt , template , api_key ,
231+ model , prompt , img_url , audio_url , extend_prompt , negative_prompt , template , api_key ,
219232 extra_input , task , function , head_frame , tail_frame ,
220233 first_frame_url , last_frame_url , ** kwargs )
221234
@@ -339,6 +352,7 @@ async def call(cls,
339352 model : str ,
340353 prompt : Any = None ,
341354 img_url : str = None ,
355+ audio_url : str = None ,
342356 # """@deprecated, use prompt_extend in parameters """
343357 extend_prompt : bool = True ,
344358 negative_prompt : str = None ,
@@ -361,6 +375,7 @@ async def call(cls,
361375 negative_prompt (str): The negative prompt is the opposite of the prompt meaning.
362376 template (str): LoRa input, such as gufeng, katong, etc.
363377 img_url (str): The input image url, Generate the URL of the image referenced by the video.
378+ audio_url (str): The input audio url.
364379 api_key (str, optional): The api api_key. Defaults to None.
365380 workspace (str): The dashscope workspace id.
366381 extra_input (Dict): The extra input parameters.
@@ -380,7 +395,7 @@ async def call(cls,
380395 """
381396 task_group , f = _get_task_group_and_task (__name__ )
382397 inputs , kwargs , task = VideoSynthesis ._get_input (
383- model , prompt , img_url , extend_prompt , negative_prompt , template , api_key ,
398+ model , prompt , img_url , audio_url , extend_prompt , negative_prompt , template , api_key ,
384399 extra_input , task , f , head_frame , tail_frame ,
385400 first_frame_url , last_frame_url , ** kwargs )
386401 response = await super ().call (model , inputs , task_group , task , f , api_key , workspace , ** kwargs )
@@ -391,6 +406,7 @@ async def async_call(cls,
391406 model : str ,
392407 prompt : Any = None ,
393408 img_url : str = None ,
409+ audio_url : str = None ,
394410 # """@deprecated, use prompt_extend in parameters """
395411 extend_prompt : bool = True ,
396412 negative_prompt : str = None ,
@@ -413,6 +429,7 @@ async def async_call(cls,
413429 negative_prompt (str): The negative prompt is the opposite of the prompt meaning.
414430 template (str): LoRa input, such as gufeng, katong, etc.
415431 img_url (str): The input image url, Generate the URL of the image referenced by the video.
432+ audio_url (str): The input audio url.
416433 api_key (str, optional): The api api_key. Defaults to None.
417434 workspace (str): The dashscope workspace id.
418435 extra_input (Dict): The extra input parameters.
@@ -434,7 +451,7 @@ async def async_call(cls,
434451 task_group , function = _get_task_group_and_task (__name__ )
435452
436453 inputs , kwargs , task = VideoSynthesis ._get_input (
437- model , prompt , img_url , extend_prompt , negative_prompt , template , api_key ,
454+ model , prompt , img_url , audio_url , extend_prompt , negative_prompt , template , api_key ,
438455 extra_input , task , function , head_frame , tail_frame ,
439456 first_frame_url , last_frame_url , ** kwargs )
440457
0 commit comments