From 24b7713c29af392f20d0bf3fdf69799051234229 Mon Sep 17 00:00:00 2001 From: Lizandro Date: Tue, 14 Jul 2026 19:41:58 +0000 Subject: [PATCH] fix: force Spanish in Whisper + clearer voice processing message - Add language=es to Whisper query params so audio is always transcribed in Spanish regardless of accent or background noise - Show "Procesando..." after echoing the transcript so user knows the AI is interpreting the intent Co-Authored-By: Claude Sonnet 4.6 --- app/Services/TelegramBotService.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Services/TelegramBotService.php b/app/Services/TelegramBotService.php index 9255c65..6bd6468 100644 --- a/app/Services/TelegramBotService.php +++ b/app/Services/TelegramBotService.php @@ -242,7 +242,7 @@ class TelegramBotService return; } - $this->send($chatId, "🎙️ Escuché: _\"{$resultado['texto']}\"_"); + $this->send($chatId, "🎙️ Escuché: _\"{$resultado['texto']}\"_\nProcesando..."); $this->handleText($chatId, $resultado['texto'], $nombre); } catch (\Throwable $e) { @@ -262,8 +262,9 @@ class TelegramBotService } try { - // response_format como query param (algunos servidores no lo leen del form) - $url = rtrim($whisperUrl, '?') . (str_contains($whisperUrl, '?') ? '&' : '?') . 'response_format=json'; + // response_format y language como query params + $sep = str_contains($whisperUrl, '?') ? '&' : '?'; + $url = rtrim($whisperUrl, '?') . $sep . 'response_format=json&language=es'; $response = Http::timeout(60) ->withBasicAuth('whisper', $whisperToken)