feat: 字数限制2000 + MiniMax emotion参数 + 前端情绪全局选择模式
This commit is contained in:
@@ -3,7 +3,7 @@ import base64
|
||||
import requests
|
||||
from io import BytesIO
|
||||
|
||||
def synthesize_minimax(text, speed=1.0, pitch=0, volume=1.0):
|
||||
def synthesize_minimax(text, speed=1.0, pitch=0, volume=1.0, emotion='neutral'):
|
||||
"""调用MiniMax TTS API"""
|
||||
api_key = os.getenv('MINIMAX_API_KEY', '')
|
||||
if not api_key:
|
||||
@@ -27,6 +27,7 @@ def synthesize_minimax(text, speed=1.0, pitch=0, volume=1.0):
|
||||
'speed': speed,
|
||||
'vol': volume_int,
|
||||
'pitch': pitch,
|
||||
'emotion': emotion,
|
||||
},
|
||||
'audio_setting': {
|
||||
'audio_sample_rate': 32000,
|
||||
|
||||
Reference in New Issue
Block a user