feat: Puente Mayúscula-Minúscula + TTS SpeechSynthesis + E2E fixes

This commit is contained in:
renato97
2026-07-21 15:31:46 -03:00
commit fa8e0c58ce
120 changed files with 16013 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
"use client"
let utterance: SpeechSynthesisUtterance | null = null
export async function speak(
text: string,
_rate = 0.85,
): Promise<void> {
return new Promise((resolve) => {
stopSpeaking()
const u = new SpeechSynthesisUtterance(text)
u.lang = "es-AR"
u.rate = _rate
u.onend = () => resolve()
u.onerror = () => resolve()
utterance = u
speechSynthesis.speak(u)
})
}
export function stopSpeaking(): void {
if (utterance) {
speechSynthesis.cancel()
utterance = null
}
}