File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
dashscope/audio/qwen_tts_realtime Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,8 @@ def update_session(
177177 bit_rate : int = None ,
178178 language_type : str = None ,
179179 enable_tn : bool = None ,
180+ instructions : str = None ,
181+ optimize_instructions : str = None ,
180182 ** kwargs ,
181183 ) -> None :
182184 """
@@ -206,6 +208,10 @@ def update_session(
206208 bit_rate for tts, support 6~510,default is 128kbps. only work on format: opus/mp3 # noqa: E501 # pylint: disable=line-too-long
207209 enable_tn: bool
208210 enable text normalization for tts, default is None
211+ instructions: str
212+ instructions for tts, default is None
213+ optimize_instructions: str
214+ optimize_instructions for tts, default is None
209215 """
210216 self .config = {
211217 "voice" : voice ,
@@ -230,6 +236,10 @@ def update_session(
230236
231237 if language_type is not None :
232238 self .config ["language_type" ] = language_type
239+ if instructions is not None :
240+ self .config ['instructions' ] = instructions
241+ if optimize_instructions is not None :
242+ self .config ['optimize_instructions' ] = optimize_instructions
233243 self .config .update (kwargs )
234244 self .__send_str (
235245 json .dumps (
You can’t perform that action at this time.
0 commit comments