Update voiceai-server.js
This commit is contained in:
@@ -47,7 +47,7 @@ async function generateElevenLabsAudio(text, voiceId, cacheKey) {
|
|||||||
try {
|
try {
|
||||||
const response = await axios.post(
|
const response = await axios.post(
|
||||||
`https://api.elevenlabs.io/v1/text-to-speech/${voiceId}`,
|
`https://api.elevenlabs.io/v1/text-to-speech/${voiceId}`,
|
||||||
{ text, model_id: 'eleven_turbo_v2', voice_settings: { stability: 0.5, similarity_boost: 0.8 } },
|
{ text, model_id: 'eleven_multilingual_v2', voice_settings: { stability: 0.5, similarity_boost: 0.8 } },
|
||||||
{ headers: { 'xi-api-key': ELEVENLABS_KEY, 'Content-Type': 'application/json' }, responseType: 'arraybuffer' }
|
{ headers: { 'xi-api-key': ELEVENLABS_KEY, 'Content-Type': 'application/json' }, responseType: 'arraybuffer' }
|
||||||
);
|
);
|
||||||
const filename = `/opt/voiceai/audio/${cacheKey}.mp3`;
|
const filename = `/opt/voiceai/audio/${cacheKey}.mp3`;
|
||||||
|
|||||||
Reference in New Issue
Block a user