From 45efb4237fb6a98ddab0bb0034b53a1ea393da82 Mon Sep 17 00:00:00 2001 From: Nat Lasseter Date: Thu, 16 Jun 2022 19:34:46 +0100 Subject: Actually this is annoying and would require boring work to make it say things correctly. --- planed.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/planed.html b/planed.html index 177ee2a..955d0fa 100644 --- a/planed.html +++ b/planed.html @@ -37,6 +37,7 @@ div.msg { const div = document.getElementById("log"); let ws = new WebSocket("ws://plane.4574.co.uk:80"); let loglen = 0; + /* let voices = []; speechSynthesis.onvoiceschanged = function() { voices = speechSynthesis.getVoices().filter( @@ -45,6 +46,7 @@ div.msg { } ); }; + */ ws.onmessage = function(ev) { loglen += 1; @@ -52,10 +54,12 @@ div.msg { if (loglen > logmax) document.getElementById("msg" + (loglen - logmax)).remove(); + /* let utter = new SpeechSynthesisUtterance(ev.data); utter.voice = voices[Math.floor(Math.random() * voices.length)]; utter.rate = 1.3; speechSynthesis.speak(utter); + */ }; function rantime() { -- cgit v1.2.1