fix(display_global): convertir nombre a Title Case antes del TTS
Los nombres en MAYÚSCULAS son deletreados por el motor de voz. Convertir a Title Case para que se lean como palabras normales. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
40b8b54aee
commit
ea956f2c6c
@@ -525,8 +525,9 @@ function anunciarTurno(codigo, destino, paciente) {
|
||||
playBeep();
|
||||
if (!sonidoActivo || !('speechSynthesis' in window)) return null;
|
||||
const letras = codigo.split('').join(' ');
|
||||
const nomVoz = paciente ? paciente.toLowerCase().replace(/\b\w/g, c => c.toUpperCase()) : null;
|
||||
let texto = `Turno ${letras}`;
|
||||
if (paciente) texto += `, ${paciente}`;
|
||||
if (nomVoz) texto += `, ${nomVoz}`;
|
||||
texto += `, pase a ${destino}`;
|
||||
const utt = new SpeechSynthesisUtterance(texto);
|
||||
utt.lang = 'es-CO';
|
||||
|
||||
Reference in New Issue
Block a user