fix: 豆包引擎补全pitch_ratio和volume_ratio参数
前端声调/音量滑块现在对豆包引擎也生效了 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,8 @@ def synthesize_doubao(text, speed=1.0, pitch=0, volume=1.0, emotion='neutral'):
|
||||
'voice_type': 'S_LK0j18H72',
|
||||
'encoding': 'mp3',
|
||||
'speed_ratio': speed,
|
||||
'pitch_ratio': max(0.1, min(3.0, 1.0 + pitch / 12)), # 前端-12~12映射到0.1~3.0
|
||||
'volume_ratio': max(0.1, min(3.0, volume)), # 前端0~10,API 0.1~3.0
|
||||
'bitrate': 128000,
|
||||
},
|
||||
'request': {
|
||||
|
||||
Reference in New Issue
Block a user