feat: add script for t2s for Haikus

Refs: OPS-56
This commit is contained in:
0xjrx 2025-03-17 14:55:14 +01:00
parent 52313f8694
commit c6fc95f69c
No known key found for this signature in database
GPG key ID: 61C53033867D0271

View file

@ -17,4 +17,16 @@
</a>
</div>
</div>
<script>
if ('speechSynthesis' in window){
//Speech supported
}
else{
//Speech not supported
alert("Sorry your browser does not support Speech synthesis");
}
var msg = new speechSynthesisUtterance();
msg.text = {context.haiku.lines};
window.speak(msg);
</script>
{% endblock %}