Deploy: 2026-05-23 01:28:41
This commit is contained in:
@@ -425,9 +425,20 @@ class GeminiService
|
||||
if ($audioData) {
|
||||
return $audioData;
|
||||
}
|
||||
error_log("[TTS Service] ElevenLabs failed, falling back to Gemini TTS.");
|
||||
error_log("[TTS Service] ElevenLabs failed, falling back to Google Translate TTS.");
|
||||
}
|
||||
|
||||
// Fallback to Google Translate TTS (free and reliable)
|
||||
$googleTtsAudio = \App\Services\TTSService::textToSpeechArabic($userMessage);
|
||||
if ($googleTtsAudio) {
|
||||
return [
|
||||
'audio' => $googleTtsAudio,
|
||||
'mimeType' => 'audio/mp3'
|
||||
];
|
||||
}
|
||||
|
||||
error_log("[TTS Service] Google Translate TTS failed, falling back to Gemini TTS models.");
|
||||
|
||||
// Gemini Fallback Logic:
|
||||
$models = [
|
||||
'gemini-3.1-flash-tts-preview',
|
||||
|
||||
Reference in New Issue
Block a user