@@ -28,6 +28,8 @@ def call(
2828 api_key : str = None ,
2929 workspace : str = None ,
3030 text : str = None ,
31+ voice : str = None ,
32+ language_type : str = None ,
3133 ** kwargs
3234 ) -> Union [MultiModalConversationResponse , Generator [
3335 MultiModalConversationResponse , None , None ]]:
@@ -57,6 +59,9 @@ def call(
5759 [1]: https://help.aliyun.com/zh/dashscope/developer-reference/api-key-settings. # noqa E501
5860 workspace (str): The dashscope workspace id.
5961 text (str): The text to generate.
62+ voice (str): The voice name of qwen tts, include 'Cherry'/'Ethan'/'Sunny'/'Dylan' and so on,
63+ you can get the total voice list : https://help.aliyun.com/zh/model-studio/qwen-tts.
64+ language_type (str): The synthesized language type, default is 'auto', useful for [qwen3-tts].
6065 **kwargs:
6166 stream(bool, `optional`): Enable server-sent events
6267 (ref: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) # noqa E501
@@ -70,8 +75,6 @@ def call(
7075 tokens with top_p probability mass. So 0.1 means only
7176 the tokens comprising the top 10% probability mass are
7277 considered[qwen-turbo,bailian-v1].
73- voice(string, `optional`): The voice name of qwen tts, include 'Cherry'/'Ethan'/'Sunny'/'Dylan' and so on,
74- you can get the total voice list : https://help.aliyun.com/zh/model-studio/qwen-tts.
7578 top_k(float, `optional`):
7679
7780
@@ -99,6 +102,10 @@ def call(
99102
100103 if text is not None and text :
101104 input .update ({'text' : text })
105+ if voice is not None and voice :
106+ input .update ({'voice' : voice })
107+ if language_type is not None and language_type :
108+ input .update ({'language_type' : language_type })
102109 if msg_copy is not None :
103110 input .update ({'messages' : msg_copy })
104111 response = super ().call (model = model ,
@@ -160,6 +167,8 @@ async def call(
160167 api_key : str = None ,
161168 workspace : str = None ,
162169 text : str = None ,
170+ voice : str = None ,
171+ language_type : str = None ,
163172 ** kwargs
164173 ) -> Union [MultiModalConversationResponse , Generator [
165174 MultiModalConversationResponse , None , None ]]:
@@ -189,6 +198,9 @@ async def call(
189198 [1]: https://help.aliyun.com/zh/dashscope/developer-reference/api-key-settings. # noqa E501
190199 workspace (str): The dashscope workspace id.
191200 text (str): The text to generate.
201+ voice (str): The voice name of qwen tts, include 'Cherry'/'Ethan'/'Sunny'/'Dylan' and so on,
202+ you can get the total voice list : https://help.aliyun.com/zh/model-studio/qwen-tts.
203+ language_type (str): The synthesized language type, default is 'auto', useful for [qwen3-tts].
192204 **kwargs:
193205 stream(bool, `optional`): Enable server-sent events
194206 (ref: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) # noqa E501
@@ -202,8 +214,6 @@ async def call(
202214 tokens with top_p probability mass. So 0.1 means only
203215 the tokens comprising the top 10% probability mass are
204216 considered[qwen-turbo,bailian-v1].
205- voice(string, `optional`): The voice name of qwen tts, include 'Cherry'/'Ethan'/'Sunny'/'Dylan' and so on,
206- you can get the total voice list : https://help.aliyun.com/zh/model-studio/qwen-tts.
207217 top_k(float, `optional`):
208218
209219 Raises:
@@ -230,6 +240,10 @@ async def call(
230240
231241 if text is not None and text :
232242 input .update ({'text' : text })
243+ if voice is not None and voice :
244+ input .update ({'voice' : voice })
245+ if language_type is not None and language_type :
246+ input .update ({'language_type' : language_type })
233247 if msg_copy is not None :
234248 input .update ({'messages' : msg_copy })
235249 response = await super ().call (model = model ,
0 commit comments