diff service/announce/index.html @ 1471:90e1ef015f09

service that calls for TTS audio then serves it to chromecasts and to playAudio services Ignore-this: 4ede3d6eb6b35096f70fc35ffe5c7a07 darcs-hash:746f3dd879633e39aa96aeb581787664131e83b0
author drewp <drewp@bigasterisk.com>
date Sun, 22 Dec 2019 00:35:58 -0800
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/announce/index.html	Sun Dec 22 00:35:58 2019 -0800
@@ -0,0 +1,22 @@
+<!doctype html>
+<html>
+  <head>
+    <title></title>
+    <meta charset="utf-8" />
+  </head>
+  <body>
+    <style>
+     input { width: 50em; }
+    </style>
+    <input type="text" id="msg">
+    <button id="demo">speak</button>
+    <script>
+     document.querySelector('#msg').value = 'ding! <prosody rate="100%" pitch="+0%"> normal speech! </prosody>';
+     document.querySelector('#demo').addEventListener('click', () => {
+       fetch('announcement?text=' + encodeURIComponent(document.querySelector('#msg').value), {
+         method: 'POST',
+       });
+     });
+    </script>
+  </body>
+</html>