Update voiceai-server.js

This commit is contained in:
2026-04-13 06:39:57 +00:00
parent ade2d5d8bc
commit a7b8297d48

View File

@@ -47,7 +47,7 @@ async function generateElevenLabsAudio(text, voiceId, cacheKey) {
try {
const response = await axios.post(
`https://api.elevenlabs.io/v1/text-to-speech/${voiceId}`,
{ text, model_id: 'eleven_multilingual_v2', voice_settings: { stability: 0.5, similarity_boost: 0.8 } },
{ text, model_id: 'eleven_flash_v2_5', voice_settings: { stability: 0.3, similarity_boost: 0.75, style: 0.5, use_speaker_boost: true }
{ headers: { 'xi-api-key': ELEVENLABS_KEY, 'Content-Type': 'application/json' }, responseType: 'arraybuffer' }
);
const filename = `/opt/voiceai/audio/${cacheKey}.mp3`;