Wiki source code of Speech Recognition
Last modified by dvd48 on 2020/06/14 20:24
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | (% style="text-align:center" %) | ||
2 | [[image:title-pic.png||width="452" class="img-rounded"]] | ||
3 | |||
4 | (% class="box infomessage" %) | ||
5 | ((( | ||
6 | Use the speech recognition of your phone to give the phone voice commands. Change the background color depending on which voice command you give. | ||
7 | ))) | ||
8 | |||
9 | (% class="box" %) | ||
10 | ((( | ||
11 | == What bricks do you need? == | ||
12 | |||
13 | First add different colored backgrounds to the background object by drawing them in Pocket Paint. Rename the backgrounds to the colors they have. | ||
14 | |||
15 | (% style="text-align:center" %) | ||
16 | [[image:2.png]] | ||
17 | ))) | ||
18 | |||
19 | (% class="row" %) | ||
20 | ((( | ||
21 | (% class="col-xs-12 col-sm-6" %) | ||
22 | ((( | ||
23 | (% class="box" %) | ||
24 | ((( | ||
25 | = Now add these scripts to the Hat object: = | ||
26 | |||
27 | **~1. Step** | ||
28 | |||
29 | Now add these scripts to the background: | ||
30 | |||
31 | When the background is tapped, you will be asked what background color you want. Your answer will be converted to text via internet and will be saved in a variable. Tap on “new” and create a variable called “bg”. | ||
32 | |||
33 | (% style="text-align:center" %) | ||
34 | [[image:1.png]] | ||
35 | ))) | ||
36 | ))) | ||
37 | |||
38 | (% class="col-xs-12 col-sm-6" %) | ||
39 | ((( | ||
40 | (% class="box" %) | ||
41 | ((( | ||
42 | **2. Step** | ||
43 | |||
44 | In the next steps you will have to link the answers to the colors. | ||
45 | |||
46 | Now add the following bricks to the script of the **background**. | ||
47 | For each color you have to check if the spoken answer corresponds to one of your colors. If a correct color is answered, set the corresponding background to the color. | ||
48 | |||
49 | (% style="text-align:center" %) | ||
50 | [[image:3.png]] | ||
51 | ))) | ||
52 | ))) | ||
53 | ))) | ||
54 | |||
55 | (% class="box" %) | ||
56 | ((( | ||
57 | = Remix Inspirations = | ||
58 | |||
59 | [[Quiz>>https://share.catrob.at/pocketcode/program/33756]] | ||
60 | |||
61 | [[Alexa, Siri, Cortana >>https://share.catrob.at/pocketcode/program/33753]] | ||
62 | ))) | ||
63 | |||
64 | (% class="box infomessage" %) | ||
65 | ((( | ||
66 | [[Download the program >>https://share.catrob.at/pocketcode/program/33729]] | ||
67 | ))) |