add: ajout de la fonction d'instruction vocale

This commit is contained in:
2026-08-03 22:51:26 +02:00
parent 45ad31d0ae
commit d36c025cf2
2 changed files with 39 additions and 0 deletions

12
client/js/guideVoice.js Normal file
View File

@@ -0,0 +1,12 @@
/*
guideVoice.js
vocalise les instructions recue du serveur via la synthese vocal du navigateur
*/
export function speakInstruction(texte) {
speechSynthesis.cancel();
const enonce = new SpeechSynthesisUtterance(texte);
enonce.lang = "fr-FR";
speechSynthesis.speak(enonce);
}