Mercurial > code > home > repos > homeauto
comparison 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 |
comparison
equal
deleted
inserted
replaced
1470:94abe0983594 | 1471:90e1ef015f09 |
---|---|
1 <!doctype html> | |
2 <html> | |
3 <head> | |
4 <title></title> | |
5 <meta charset="utf-8" /> | |
6 </head> | |
7 <body> | |
8 <style> | |
9 input { width: 50em; } | |
10 </style> | |
11 <input type="text" id="msg"> | |
12 <button id="demo">speak</button> | |
13 <script> | |
14 document.querySelector('#msg').value = 'ding! <prosody rate="100%" pitch="+0%"> normal speech! </prosody>'; | |
15 document.querySelector('#demo').addEventListener('click', () => { | |
16 fetch('announcement?text=' + encodeURIComponent(document.querySelector('#msg').value), { | |
17 method: 'POST', | |
18 }); | |
19 }); | |
20 </script> | |
21 </body> | |
22 </html> |