Revert default voice fallback back to Adam voice ID pNInz6obpgDQGcFmaJgB
This commit is contained in:
@@ -43,10 +43,10 @@ class GeminiService
|
||||
*/
|
||||
public static function getElevenLabsVoiceId(?string $configuredVoiceId = null): string
|
||||
{
|
||||
$voiceIdSource = !empty($configuredVoiceId) ? $configuredVoiceId : (getenv('ELEVENLABS_VOICE_ID') ?: 'ErXwobaYiN019PkySvjV');
|
||||
$voiceIdSource = !empty($configuredVoiceId) ? $configuredVoiceId : (getenv('ELEVENLABS_VOICE_ID') ?: 'pNInz6obpgDQGcFmaJgB');
|
||||
$voiceIds = array_filter(array_map('trim', explode(',', $voiceIdSource)));
|
||||
if (empty($voiceIds)) {
|
||||
return 'ErXwobaYiN019PkySvjV';
|
||||
return 'pNInz6obpgDQGcFmaJgB';
|
||||
}
|
||||
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 : 'ErXwobaYiN019PkySvjV'; // Default to Antoni
|
||||
$voiceId = !empty($elVoiceId) ? $elVoiceId : 'pNInz6obpgDQGcFmaJgB'; // Default to Adam
|
||||
$audioData = self::generateAudioResponseWithElevenLabs($elApiKey, $userMessage, $voiceId);
|
||||
if ($audioData) {
|
||||
return $audioData;
|
||||
|
||||
Reference in New Issue
Block a user