This repository has been archived by the owner on Jul 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
speak and listen blocks 2.xml
1 lines (1 loc) · 3.62 KB
/
speak and listen blocks 2.xml
1
<blocks app="Snap! 4.0, http://snap.berkeley.edu" version="1"><block-definition s="Listen %'respond as heard' then finally %'handle response' but if nothing heard %'handle nothing said'" type="command" category="sensing"><header></header><code></code><inputs><input type="%cmdRing"></input><input type="%cmdRing"></input><input type="%cmdRing"></input></inputs><script><custom-block s="run eCraft2Learn command %txt with %mult%s"><l>start_microsoft_speech_recognition</l><list><block var="respond as heard"/><block var="handle response"/><block var="handle nothing said"/></list></custom-block></script></block-definition><block-definition s="Listen then %'handle response' but if error %'handle error'" type="command" category="sensing"><header></header><code></code><inputs><input type="%cmdRing"></input><input type="%cmdRing"></input></inputs><script><custom-block s="run eCraft2Learn command %txt with %mult%s"><l>start_speech_recognition</l><list><block var="handle response"/><block var="handle error"/></list></custom-block></script></block-definition><block-definition s="Stop speech recognition" type="command" category="sensing"><header></header><code></code><inputs></inputs><script><custom-block s="run eCraft2Learn command %txt with %mult%s"><l>stop_speech_recognition</l><list></list></custom-block></script></block-definition><block-definition s="speak %'message' then %'what to do when finished' with pitch %'pitch' with rate %'rate' with voice %'voice' with volume %'volume' in language %'language code'" type="command" category="sound"><header></header><code></code><inputs><input type="%s"></input><input type="%cmdRing"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%txt"></input></inputs><script><custom-block s="run eCraft2Learn command %txt with %mult%s"><l>speak</l><list><block var="message"/><block var="pitch"/><block var="rate"/><block var="voice"/><block var="volume"/><block var="language code"/><block var="what to do when finished"/></list></custom-block></script></block-definition><block-definition s="Get voice names" type="reporter" category="sound"><header></header><code></code><inputs></inputs><script><block s="doReport"><custom-block s="call eCraft2Learn reporter %txt with %mult%s"><l>get_voice_names</l><list></list></custom-block></block></script></block-definition><block-definition s="voice name of %'voice number'" type="reporter" category="sound"><header></header><code></code><inputs><input type="%n"></input></inputs><script><block s="doReport"><custom-block s="call eCraft2Learn reporter %txt with %mult%s"><l>get_voice_name</l><list><block var="voice number"/></list></custom-block></block></script></block-definition><block-definition s="Speak %'message' then %'to do when finished speaking'" type="command" category="sound"><header></header><code></code><inputs><input type="%txt"></input><input type="%cmdRing"></input></inputs><script><custom-block s="run eCraft2Learn command %txt with %mult%s"><l>speak</l><list><block var="message"/><l></l><l></l><l></l><l></l><l></l><block var="to do when finished speaking"/></list></custom-block></script></block-definition><block-definition s="Speak %'message'" type="command" category="sound"><header></header><code></code><inputs><input type="%txt"></input></inputs><script><custom-block s="run eCraft2Learn command %txt with %mult%s"><l>speak</l><list><block var="message"/><l></l><l></l><l></l><l></l><l></l><l></l></list></custom-block></script></block-definition></blocks>