Skip to content

Commit 2846879

Browse files
committed
feat(model/qwen3-tts-realtime):support instruct param
1 parent 9f529ec commit 2846879

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dashscope/audio/qwen_tts_realtime/qwen_tts_realtime.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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(

0 commit comments

Comments
 (0)