File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -600,7 +600,6 @@ def music_generation(
600600 sample_rate : int = DEFAULT_SAMPLE_RATE ,
601601 bitrate : int = DEFAULT_BITRATE ,
602602 format : str = DEFAULT_FORMAT ,
603- channel : int = DEFAULT_CHANNEL ,
604603 output_directory : str = None
605604) -> TextContent :
606605 try :
@@ -618,10 +617,11 @@ def music_generation(
618617 "audio_setting" : {
619618 "sample_rate" : sample_rate ,
620619 "bitrate" : bitrate ,
621- "format" : format ,
622- "channel" : channel
623- }
620+ "format" : format
621+ },
624622 }
623+ if resource_mode == RESOURCE_MODE_URL :
624+ payload ["output_format" ] = "url"
625625
626626 # Call music generation API
627627 response_data = api_client .post ("/v1/music_generation" , json = payload )
@@ -633,7 +633,7 @@ def music_generation(
633633 if resource_mode == RESOURCE_MODE_URL :
634634 return TextContent (
635635 type = "text" ,
636- text = f"Success. Music audio : { audio_hex } "
636+ text = f"Success. Music url : { audio_hex } "
637637 )
638638
639639 output_path = build_output_path (output_directory , base_path )
You can’t perform that action at this time.
0 commit comments