fix: whisper_url takes priority over ai_provider for audio transcription

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-05 20:19:28 -05:00
co-authored by Claude Sonnet 4.6
parent 816c6d27c8
commit 79eda71c5a
+5
View File
@@ -60,6 +60,11 @@ class MediaTranscriber
$media = self::downloadMedia($mediaId);
if ($media === null) return null;
// Servidor Whisper propio tiene prioridad sobre el proveedor IA
if (trim($cfg['whisper_url'] ?? '') !== '') {
return self::whisper($media['bytes'], $media['mime'], $cfg);
}
return match ($provider) {
'openai' => self::whisper($media['bytes'], $media['mime'], $cfg),
'gemini' => self::geminiAudio($media['bytes'], $media['mime'], $cfg),