This commit is contained in:
2026-08-08 01:25:24 +02:00
parent 56675e1fdf
commit c1902d95dd
2 changed files with 32 additions and 32 deletions
+3 -3
View File
@@ -276,14 +276,14 @@ function gameOver() {
stats.show();
playSound(gameover)
speak("Game over")
speak("Game over", 'en-US')
}
function speak(text) {
function speak(text, lang='fr-FR') {
if (!window.speechSynthesis) return;
const utterance = new SpeechSynthesisUtterance(text);
utterance.lang = 'fr-FR';
utterance.lang = lang;
utterance.volume = sfxVolumeRange.value;
speechSynthesis.speak(utterance);
}