Skip to content

Commit 0a4af4d

Browse files
songguocolakevinlin09
authored andcommitted
feat(model/qwen-tts): add enbale_tn param
1 parent c4be5aa commit 0a4af4d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dashscope/audio/qwen_tts_realtime/qwen_tts_realtime.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def update_session(self,
165165
pitch_rate: float = None,
166166
bit_rate: int = None,
167167
language_type: str = None,
168+
enable_tn: bool = None,
168169
**kwargs) -> None:
169170
'''
170171
update session configuration, should be used before create response
@@ -191,6 +192,8 @@ def update_session(self,
191192
pitch_rate for tts, range [0.5~2.0] default is 1.0
192193
bit_rate: int
193194
bit_rate for tts, support 6~510,default is 128kbps. only work on format: opus/mp3
195+
enable_tn: bool
196+
enable text normalization for tts, default is None
194197
'''
195198
self.config = {
196199
'voice': voice,
@@ -210,6 +213,8 @@ def update_session(self,
210213
self.config['pitch_rate'] = pitch_rate
211214
if bit_rate is not None:
212215
self.config['bit_rate'] = bit_rate
216+
if enable_tn is not None:
217+
self.config['enable_tn'] = enable_tn
213218

214219
if language_type is not None:
215220
self.config['language_type'] = language_type

0 commit comments

Comments
 (0)