拼音识别.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
  2. <block type="ai_lcd_screeninit" id="C?v(YEe$x4G?o*-U1IXH" x="-41" y="-121">
  3. <field name="isScreen">False</field>
  4. <next>
  5. <block type="speech_recognition_phonetic_to_pinyin_set_param" id="beR@IXi^|e:8A*ZQ$Ab`">
  6. <mutation items="3"></mutation>
  7. <value name="PINYIN0">
  8. <shadow type="math_number" id="sSW{nt9}P2HD-OKV6;@@">
  9. <field name="NUM">0</field>
  10. </shadow>
  11. <block type="set_pinyin_dict_create_with_items_insert" id="B~[y+uuI/Q0vw_u|*p+N">
  12. <mutation items="2"></mutation>
  13. <field name="KEY0">lan</field>
  14. <field name="toneADD00">2</field>
  15. <field name="KEY1">se</field>
  16. <field name="toneADD11">4</field>
  17. </block>
  18. </value>
  19. <value name="PINYIN1">
  20. <block type="set_pinyin_dict_create_with_items_insert" id="Mv}V~t=chVlBm0EqARVg">
  21. <mutation items="2"></mutation>
  22. <field name="KEY0">hong</field>
  23. <field name="toneADD00">2</field>
  24. <field name="KEY1">se</field>
  25. <field name="toneADD11">4</field>
  26. </block>
  27. </value>
  28. <value name="PINYIN2">
  29. <block type="set_pinyin_dict_create_with_items_insert" id="aLW;6^iyFA3~ICZ5)jl1">
  30. <mutation items="4"></mutation>
  31. <field name="KEY0">ke</field>
  32. <field name="toneADD00">3</field>
  33. <field name="KEY1">ke</field>
  34. <field name="toneADD11">3</field>
  35. <field name="KEY2">le</field>
  36. <field name="toneADD22">4</field>
  37. <field name="KEY3">bo</field>
  38. <field name="toneADD33">2</field>
  39. </block>
  40. </value>
  41. <next>
  42. <block type="variables_set" id="WSmEYt/(HX?o,Y#gNvwj">
  43. <field name="VAR">result</field>
  44. <value name="VALUE">
  45. <shadow type="math_number" id=".DK!ahw4Ed1Lc*M^l0m3">
  46. <field name="NUM">0</field>
  47. </shadow>
  48. </value>
  49. <next>
  50. <block type="controls_repeat_forever" id="0S4PQ7RZrwVxZluTFo3`">
  51. <statement name="DO">
  52. <block type="ai_lcd_textcarvas" id="FowY2RJ$va-MK0)%o-JO">
  53. <value name="POSA">
  54. <block type="lcd_set_position" id="VL~x/q{h`o+yy5ia[Z71">
  55. <value name="POSX">
  56. <shadow type="math_number" id="4MvR_f+ZdN/|}%YBO38n">
  57. <field name="NUM">0</field>
  58. </shadow>
  59. </value>
  60. <value name="POSY">
  61. <shadow type="math_number" id="k*HP/WXNc-rbIULY{.O0">
  62. <field name="NUM">40</field>
  63. </shadow>
  64. </value>
  65. </block>
  66. </value>
  67. <value name="CONTENT">
  68. <shadow type="text" id="(UZa4B_$dDg@:mv9$HsW">
  69. <field name="TEXT">请对准麦克风说出指令</field>
  70. </shadow>
  71. </value>
  72. <value name="COLOR">
  73. <block type="lcd_set_color" id="~xda6KM=P2kbz=;m%Ur~">
  74. <field name="COLOR">#ffffff</field>
  75. </block>
  76. </value>
  77. <value name="Scale">
  78. <shadow type="math_number" id="f2b/:OgJ?9YV7I@q3RwI">
  79. <field name="NUM">1</field>
  80. </shadow>
  81. </value>
  82. <next>
  83. <block type="ai_lcd_showcarvas_set_display" id="2Sd7ec^Y_rHTMmKUwPQQ">
  84. <next>
  85. <block type="speech_recognition_phonetic_to_pinyin_start_recognition" id="[LP!G2AAi3Y}w(L!D`x:">
  86. <next>
  87. <block type="variables_set" id="@Q32)Jhyr04A#a*By}3`">
  88. <field name="VAR">result</field>
  89. <value name="VALUE">
  90. <shadow type="math_number" id="l,hx;u|etG$-Te+kh(fo">
  91. <field name="NUM">0</field>
  92. </shadow>
  93. <block type="text_join" id="N!Cro42O|y}y,=kcSi8L">
  94. <mutation items="1"></mutation>
  95. <value name="ADD0">
  96. <block type="speech_recognition_phonetic_to_pinyin_get_result" id="I_-egLU1p7Tc:FW2Og1M"></block>
  97. </value>
  98. </block>
  99. </value>
  100. <next>
  101. <block type="controls_if" id="w#0fR7m);2oA)a{DKW7h">
  102. <mutation elseif="2"></mutation>
  103. <value name="IF0">
  104. <block type="logic_compare" id="*u)PSU?]SIDmkc=pls[T">
  105. <field name="OP">EQ</field>
  106. <value name="A">
  107. <block type="variables_get" id="ief{i$NHmanu-y!q8VPv">
  108. <field name="VAR">result</field>
  109. </block>
  110. </value>
  111. <value name="B">
  112. <block type="set_pinyin_dict_create_with_items_insert" id="s!n|]$bR.APlANDcsV$b">
  113. <mutation items="2"></mutation>
  114. <field name="KEY0">lan</field>
  115. <field name="toneADD00">2</field>
  116. <field name="KEY1">se</field>
  117. <field name="toneADD11">4</field>
  118. </block>
  119. </value>
  120. </block>
  121. </value>
  122. <statement name="DO0">
  123. <block type="ai_lcd_clearcanvas" id="G6dP_S5Ac,*3WbL}Uo(?">
  124. <next>
  125. <block type="ai_lcd_draw_rectangle" id="y6ISPDuy?~9m-1i9cq#~">
  126. <field name="rect_type">fillrect</field>
  127. <value name="POSA">
  128. <block type="lcd_set_position" id="Th?A$4N{WTz/Ns-G+;PL">
  129. <value name="POSX">
  130. <shadow type="math_number" id="d_-@m1f/e0UKT$=:P,nu">
  131. <field name="NUM">0</field>
  132. </shadow>
  133. </value>
  134. <value name="POSY">
  135. <shadow type="math_number" id="HgmVjW3WbhTyS$0=l4,0">
  136. <field name="NUM">0</field>
  137. </shadow>
  138. </value>
  139. </block>
  140. </value>
  141. <value name="POSB">
  142. <block type="lcd_set_width_height" id="J3jNp|/]Mydt`xkG{X@,">
  143. <value name="WIDTH">
  144. <shadow type="math_number" id="Dt*X:9S18Dh.uaQqZVN2">
  145. <field name="NUM">320</field>
  146. </shadow>
  147. </value>
  148. <value name="HEIGHT">
  149. <shadow type="math_number" id="lkdvr1hVxii8VsMq%R%D">
  150. <field name="NUM">240</field>
  151. </shadow>
  152. </value>
  153. </block>
  154. </value>
  155. <value name="COLOR">
  156. <block type="lcd_set_color" id="3}o-{00O~lshqL:JtGto">
  157. <field name="COLOR">#33ccff</field>
  158. </block>
  159. </value>
  160. </block>
  161. </next>
  162. </block>
  163. </statement>
  164. <value name="IF1">
  165. <block type="logic_compare" id="F6!pRkJI|AoE{|AY`DuH">
  166. <field name="OP">EQ</field>
  167. <value name="A">
  168. <block type="variables_get" id=":MMUgcrV3T.3/N91}JkA">
  169. <field name="VAR">result</field>
  170. </block>
  171. </value>
  172. <value name="B">
  173. <block type="set_pinyin_dict_create_with_items_insert" id="K@s0Cv||q]Gfg~V$|!^:">
  174. <mutation items="2"></mutation>
  175. <field name="KEY0">hong</field>
  176. <field name="toneADD00">2</field>
  177. <field name="KEY1">se</field>
  178. <field name="toneADD11">4</field>
  179. </block>
  180. </value>
  181. </block>
  182. </value>
  183. <statement name="DO1">
  184. <block type="ai_lcd_clearcanvas" id="AalG0XjX9?6F~YL7zjsA">
  185. <next>
  186. <block type="ai_lcd_draw_rectangle" id="olyyZMT*(hV1^=z#A4Xu">
  187. <field name="rect_type">fillrect</field>
  188. <value name="POSA">
  189. <block type="lcd_set_position" id="L%P0v2PP5R]5@^|z3.0K">
  190. <value name="POSX">
  191. <shadow type="math_number" id="[8P.zIx?9+iP9IPdMCO!">
  192. <field name="NUM">0</field>
  193. </shadow>
  194. </value>
  195. <value name="POSY">
  196. <shadow type="math_number" id="=(b78fW%Fdk6z{bjY7Rl">
  197. <field name="NUM">0</field>
  198. </shadow>
  199. </value>
  200. </block>
  201. </value>
  202. <value name="POSB">
  203. <block type="lcd_set_width_height" id="]tsUwf28nu)Lkc=JER_W">
  204. <value name="WIDTH">
  205. <shadow type="math_number" id="=fL8^F!WY2i;bbqaBX#V">
  206. <field name="NUM">320</field>
  207. </shadow>
  208. </value>
  209. <value name="HEIGHT">
  210. <shadow type="math_number" id="@=g%1jIzNn0pZ#a**IQ^">
  211. <field name="NUM">240</field>
  212. </shadow>
  213. </value>
  214. </block>
  215. </value>
  216. <value name="COLOR">
  217. <block type="lcd_set_color" id="#iT)$MwWOL]5zRrv:Uy?">
  218. <field name="COLOR">#ff6666</field>
  219. </block>
  220. </value>
  221. </block>
  222. </next>
  223. </block>
  224. </statement>
  225. <value name="IF2">
  226. <block type="logic_compare" id="Fed*J5k-Cumfz5~W`rrs">
  227. <field name="OP">EQ</field>
  228. <value name="A">
  229. <block type="variables_get" id="yPs+x#;w(RSmdBXs/m|`">
  230. <field name="VAR">result</field>
  231. </block>
  232. </value>
  233. <value name="B">
  234. <block type="set_pinyin_dict_create_with_items_insert" id="r$MT:4B42QT@N`^,mVz$">
  235. <mutation items="4"></mutation>
  236. <field name="KEY0">ke</field>
  237. <field name="toneADD00">3</field>
  238. <field name="KEY1">ke</field>
  239. <field name="toneADD11">3</field>
  240. <field name="KEY2">le</field>
  241. <field name="toneADD22">4</field>
  242. <field name="KEY3">bo</field>
  243. <field name="toneADD33">2</field>
  244. </block>
  245. </value>
  246. </block>
  247. </value>
  248. <statement name="DO2">
  249. <block type="ai_lcd_clearcanvas" id="S+zF/yK_)R]I`rmmKJNQ">
  250. <next>
  251. <block type="ai_lcd_draw_rectangle" id="}%}nWsLQ?V+$]lC)T?m@">
  252. <field name="rect_type">fillrect</field>
  253. <value name="POSA">
  254. <block type="lcd_set_position" id="o|p/CyiJD9aW];A^g$xJ">
  255. <value name="POSX">
  256. <shadow type="math_number" id="Q?nA{Ndd:A$syIHJwJs;">
  257. <field name="NUM">0</field>
  258. </shadow>
  259. </value>
  260. <value name="POSY">
  261. <shadow type="math_number" id="cv``q0AiZROSFL2e;bz.">
  262. <field name="NUM">0</field>
  263. </shadow>
  264. </value>
  265. </block>
  266. </value>
  267. <value name="POSB">
  268. <block type="lcd_set_width_height" id="xLnPf7C)D+2ZT|?[S0=o">
  269. <value name="WIDTH">
  270. <shadow type="math_number" id="w/Z,2R;(8Uuw6Je8`X*V">
  271. <field name="NUM">320</field>
  272. </shadow>
  273. </value>
  274. <value name="HEIGHT">
  275. <shadow type="math_number" id="tr/TM!P|G}vOGjA/l|W=">
  276. <field name="NUM">240</field>
  277. </shadow>
  278. </value>
  279. </block>
  280. </value>
  281. <value name="COLOR">
  282. <block type="lcd_set_color" id="0G$xF6XDfI(u{CM^ci_u">
  283. <field name="COLOR">#000000</field>
  284. </block>
  285. </value>
  286. <next>
  287. <block type="ai_lcd_draw_image_on_canvas" id="=eL/hMFlcSLYsbaH~:|@">
  288. <value name="image_path">
  289. <block type="v831_img_text" id="1Pop$oraX*2Q-l6Rw4sq">
  290. <value name="save_path">
  291. <shadow type="text" id="1zzCH41$ft^YZ]QeRcm,">
  292. <field name="TEXT">/root/preset/img/cocorobo_text.jpg</field>
  293. </shadow>
  294. </value>
  295. </block>
  296. </value>
  297. <value name="scale_y">
  298. <block type="lcd_set_position" id="FP7d)GOTTkMF?=Ktsw]r">
  299. <value name="POSX">
  300. <shadow type="math_number" id="G;WqsGtoi3,C|t*x)X#V">
  301. <field name="NUM">80</field>
  302. </shadow>
  303. </value>
  304. <value name="POSY">
  305. <shadow type="math_number" id=";5@+Ft=8K$R1yaqArGbI">
  306. <field name="NUM">100</field>
  307. </shadow>
  308. </value>
  309. </block>
  310. </value>
  311. <value name="alpha">
  312. <shadow type="math_number" id="fY8UEH1qj0a{J[DLV8Y.">
  313. <field name="NUM">1</field>
  314. </shadow>
  315. </value>
  316. </block>
  317. </next>
  318. </block>
  319. </next>
  320. </block>
  321. </statement>
  322. <next>
  323. <block type="ai_lcd_showcarvas_set_display" id="HLzGPHV2^#sJ2veU.qwE"></block>
  324. </next>
  325. </block>
  326. </next>
  327. </block>
  328. </next>
  329. </block>
  330. </next>
  331. </block>
  332. </next>
  333. </block>
  334. </statement>
  335. </block>
  336. </next>
  337. </block>
  338. </next>
  339. </block>
  340. </next>
  341. </block>
  342. </xml>