From 1941a61e8287d596775b1a8b84113d8f4d6c2d03 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Fri, 22 May 2026 23:12:48 +0300 Subject: [PATCH] Fix: Change default ElevenLabs fallback voice to standard pre-made voice Antoni (ErXwobaYiN019PkySvjV) to support free accounts --- backend/app/Services/GeminiService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/Services/GeminiService.php b/backend/app/Services/GeminiService.php index 381a93d..e819625 100644 --- a/backend/app/Services/GeminiService.php +++ b/backend/app/Services/GeminiService.php @@ -43,10 +43,10 @@ class GeminiService */ public static function getElevenLabsVoiceId(?string $configuredVoiceId = null): string { - $voiceIdSource = !empty($configuredVoiceId) ? $configuredVoiceId : (getenv('ELEVENLABS_VOICE_ID') ?: 'pNInz6obpgDQGcFmaJgB'); + $voiceIdSource = !empty($configuredVoiceId) ? $configuredVoiceId : (getenv('ELEVENLABS_VOICE_ID') ?: 'ErXwobaYiN019PkySvjV'); $voiceIds = array_filter(array_map('trim', explode(',', $voiceIdSource))); if (empty($voiceIds)) { - return 'pNInz6obpgDQGcFmaJgB'; + return 'ErXwobaYiN019PkySvjV'; } return $voiceIds[array_rand($voiceIds)]; } @@ -420,7 +420,7 @@ class GeminiService ): ?array { // Use ElevenLabs if the API Key is provided if (!empty($elApiKey)) { - $voiceId = !empty($elVoiceId) ? $elVoiceId : 'pNInz6obpgDQGcFmaJgB'; // Default to Adam + $voiceId = !empty($elVoiceId) ? $elVoiceId : 'ErXwobaYiN019PkySvjV'; // Default to Antoni $audioData = self::generateAudioResponseWithElevenLabs($elApiKey, $userMessage, $voiceId); if ($audioData) { return $audioData;