added text-to-speech library

upd4.2
Jens Mönig 2018-03-03 23:38:19 +01:00
rodzic 05496685d5
commit fefdd932fe
2 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -13,6 +13,7 @@ multiline.xml Allow multi-line text input to a block In general, text inputs all
Eisenbergification.xml Provide getters and setters for all GUI-controlled global settings Eisenberg's Law: Anything that can be done from the GUI should be doable from the programming language, and vice versa.
bignumbers.xml Infinite precision integers, exact rationals, complex The full Scheme numeric tower. "USE BIGNUMS <True>" to enable.
crayons.xml Provide 100 selected colors to use instead of hue for better selection
speech_module.xml Text to speech output text using speech synthesis.
animation_module.xml Animation glide, grow and rotate using easing functions.
pixel_module.xml Pixels manipulate costumes pixel-wise.
audioComp_module.xml Audio Comp analyze, manipulate and generate sound samples.

Wyświetl plik

@ -0,0 +1,13 @@
<blocks app="Snap! 4.1, http://snap.berkeley.edu" version="1"><block-definition s="speak %&apos;text&apos; with %&apos;lang&apos; accent $nl and pitch %&apos;pitch&apos; rate %&apos;rate&apos;" type="command" category="sound"><header></header><code></code><translations>de:sprich _ mit _ Aussprache _ und Höhe _ Geschwindigkeit _&#xD;</translations><inputs><input type="%s">Hello, World!</input><input type="%txt">en-US<options>American=en-US
British=en-GB
French=fr
German=de
Italian=it
Korean=ko
Spanish=es</options></input><input type="%n">1</input><input type="%n">1</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>msg</l><l>accent</l><l>pitch</l><l>rate</l></list><l>var utter = new SpeechSynthesisUtterance(msg);&#xD;utter.lang = accent;&#xD;utter.pitch = pitch;&#xD;utter.rate = rate;&#xD;window.speechSynthesis.speak(utter);</l></block><list><block var="text"/><block var="lang"/><block var="pitch"/><block var="rate"/></list></block></script></block-definition><block-definition s="speak %&apos;text&apos; with %&apos;lang&apos; accent $nl and pitch %&apos;pitch&apos; rate %&apos;rate&apos; and wait" type="command" category="sound"><header></header><code></code><translations>de:sprich _ mit _ Aussprache _ und Höhe _ Geschwindigkeit _ und warte&#xD;</translations><inputs><input type="%s">Hello, World!</input><input type="%txt">en-US<options>American=en-US
British=en-GB
French=fr
German=de
Italian=it
Korean=ko
Spanish=es</options></input><input type="%n">1</input><input type="%n">1</input></inputs><script><block s="doDeclareVariables"><list><l>test</l></list></block><block s="doSetVar"><l>test</l><block s="evaluate"><block s="reportJSFunction"><list><l>msg</l><l>accent</l><l>pitch</l><l>rate</l></list><l>var utter = new SpeechSynthesisUtterance(msg),&#xD; isDone = false;&#xD;utter.lang = accent;&#xD;utter.pitch = pitch;&#xD;utter.rate = rate;&#xD;utter.onend = function () {isDone = true; };&#xD;window.speechSynthesis.speak(utter);&#xD;return function () {return isDone; };</l></block><list><block var="text"/><block var="lang"/><block var="pitch"/><block var="rate"/></list></block></block><block s="doWaitUntil"><block s="evaluate"><block var="test"/><list></list></block></block></script></block-definition></blocks>