Initial commit: 军事科技AI配音系统 v1.0
- Flask backend with MiniMax and CosyVoice TTS engines - Frontend UI with emotion tags, speed/pitch/volume controls - Nginx reverse proxy configuration - Dual engine support (MiniMax speech-2.8-hd, CosyVoice v3.5-flash)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
def synthesize_minimax(text):
|
||||
url = "https://api.minimaxi.com/v1/t2a_v2"
|
||||
headers = {"Authorization": f"Bearer {MINIMAX_API_KEY}", "Content-Type": "application/json"}
|
||||
payload = {
|
||||
"model": "speech-02-turbo",
|
||||
"text": text,
|
||||
"voice_setting": {"voice_id": MINIMAX_VOICE_ID}
|
||||
}
|
||||
resp = requests.post(url, headers=headers, json=payload)
|
||||
return jsonify({"success": True, "model": "minimax", "text": text, "response": resp.json()})
|
||||
Reference in New Issue
Block a user