Files
military-tech-voice3.0/backend/app/routes/tts_minimax.py
T
simonkoson d6edc69c65 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)
2026-06-30 21:00:20 +08:00

11 lines
468 B
Python

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()})