mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
feat: add script for t2s for Haikus
Refs: OPS-56
This commit is contained in:
parent
52313f8694
commit
c6fc95f69c
1 changed files with 12 additions and 0 deletions
|
|
@ -17,4 +17,16 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</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 %}
|
{% endblock %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue