kopia lustrzana https://github.com/backface/turtlestitch
added text-to-speech library
rodzic
05496685d5
commit
fefdd932fe
|
@ -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.
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<blocks app="Snap! 4.1, http://snap.berkeley.edu" version="1"><block-definition s="speak %'text' with %'lang' accent $nl and pitch %'pitch' rate %'rate'" type="command" category="sound"><header></header><code></code><translations>de:sprich _ mit _ Aussprache _ und Höhe _ Geschwindigkeit _
</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);
utter.lang = accent;
utter.pitch = pitch;
utter.rate = rate;
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 %'text' with %'lang' accent $nl and pitch %'pitch' rate %'rate' and wait" type="command" category="sound"><header></header><code></code><translations>de:sprich _ mit _ Aussprache _ und Höhe _ Geschwindigkeit _ und warte
</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),
 isDone = false;
utter.lang = accent;
utter.pitch = pitch;
utter.rate = rate;
utter.onend = function () {isDone = true; };
window.speechSynthesis.speak(utter);
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>
|
Ładowanie…
Reference in New Issue