add: ajout de la fonction d'instruction vocale
This commit is contained in:
12
client/js/guideVoice.js
Normal file
12
client/js/guideVoice.js
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user