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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
13386f5b49
commit
24b7713c29
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user