You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update README.md
* Spelling fixes
* Update hardware.md
* Adding IoT for beginners episode
* Adding intro video
* Fixing formatting of read more and self study sections.
* Adding instructions for installing the ReSpeaker
* Adding auth to language understanding
* Adding Wio terminal timer setting
* Update config.h
* Fixing links and images
* Increasing version numbers for SD card fix
* Adding SD card requirement
* speech and translations
* Adding more on translations
* All Wio Terminal now working except playing audio
Copy file name to clipboardexpand all lines: 2-farm/lessons/1-predict-plant-growth/code-publish-temperature/wio-terminal/temperature-sensor/platformio.ini
Copy file name to clipboardexpand all lines: 2-farm/lessons/1-predict-plant-growth/code-publish-temperature/wio-terminal/temperature-sensor/src/main.cpp
Copy file name to clipboardexpand all lines: 4-manufacturing/lessons/2-check-fruit-from-device/code-camera/wio-terminal/fruit-quality-detector/platformio.ini
Copy file name to clipboardexpand all lines: 4-manufacturing/lessons/2-check-fruit-from-device/code-classify/wio-terminal/fruit-quality-detector/platformio.ini
Copy file name to clipboardexpand all lines: 4-manufacturing/lessons/3-run-fruit-detector-edge/code-classify/wio-terminal/fruit-quality-detector/platformio.ini
Copy file name to clipboardexpand all lines: 6-consumer/README.md
+2
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ The latest iterations are now part of our smart devices. In kitchens in homes al
6
6
7
7
In these 4 lessons you'll learn how to build a smart timer, using AI to recognize your voice, understand what you are asking for, and reply with information about your timer. You'll also add support for multiple languages.
8
8
9
+
> ⚠️ Working with speech and microphone data uses a lot of memory, meaning it is easy to hit limits on microcontrollers. The project here works around these issues, but be aware the Wio Terminal labs are complex and may take more time that other labs in this curriculum.
10
+
9
11
> 💁 These lessons will use some cloud resources. If you don't complete all the lessons in this project, make sure you [clean up your project](../clean-up.md).
Copy file name to clipboardexpand all lines: 6-consumer/lessons/1-speech-recognition/wio-terminal-microphone.md
+14
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ To connect the ReSpeaker 2-Mics Pi Hat you will need 40 pin-to-pin (also referre
18
18
19
19
> 💁 If you are comfortable soldering, then you can use the [40 Pin Raspberry Pi Hat Adapter Board For Wio Terminal](https://www.seeedstudio.com/40-Pin-Raspberry-Pi-Hat-Adapter-Board-For-Wio-Terminal-p-4730.html) to connect the ReSpeaker.
20
20
21
+
You will also need an SD card to use to download and playback audio. The Wio Terminal only supports SD Cards up to 16GB in size, and these need to be formatted as FAT32 or exFAT.
22
+
21
23
### Task - connect the ReSpeaker Pi Hat
22
24
23
25
1. With the Wio Terminal powered off, connect the ReSpeaker 2-Mics Pi Hat to the Wio Terminal using the jumper leads and the GPIO sockets on the back of the Wio Terminal:
@@ -59,3 +61,15 @@ To connect the ReSpeaker 2-Mics Pi Hat you will need 40 pin-to-pin (also referre
59
61
* If you are using a speaker with a 3.5mm jack, or headphones, insert them into the 3.5mm jack socket.
60
62
61
63

64
+
65
+
### Task - set up the SD card
66
+
67
+
1. Connect the SD Card to your computer, using na external reader if you don't have an SD Card slot.
68
+
69
+
1. Format the SD Card using the appropriate tool on your computer, making sure to use a FAT32 or exFAT file system
70
+
71
+
1. Insert the SD card into the SD Card slot on the left-hand side of the Wio Terminal, just below the power button. Make sure the card is all the way in and clicks in - you may need a thin tool or another SD Card to help push it all the way in.
72
+
73
+

74
+
75
+
> 💁 To eject the SD Card, you need to push it in slightly and it will eject. You will need a thin tool to do this such as a flat-head screwdriver or another SD Card.
Copy file name to clipboardexpand all lines: 6-consumer/lessons/1-speech-recognition/wio-terminal-speech-to-text.md
+10-1
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,15 @@ The audio can be sent to the speech service using the REST API. To use the speec
180
180
181
181
This code builds the URL for the token issuer API using the location of the speech resource. It then creates an `HTTPClient` to make the web request, setting it up to use the WiFi client configured with the token endpoints certificate. It sets the API key as a header for the call. It then makes a POST request to get the certificate, retrying if it gets any errors. Finally the access token is returned.
182
182
183
+
1. To the `public` section, add a method to get the access token. This will be needed in later lessons to convert text to speech.
184
+
185
+
```cpp
186
+
String AccessToken()
187
+
{
188
+
return _access_token;
189
+
}
190
+
```
191
+
183
192
1. To the `public` section, add an `init` method that sets up the token client:
184
193
185
194
```cpp
@@ -497,7 +506,7 @@ The audio can be sent to the speech service using the REST API. To use the speec
497
506
Serial.println(text);
498
507
```
499
508
500
-
1. Build this code, upload it to your Wio Terminal and test it out through the serial monitor. Press the C button (the one on the left-hand side, closest to the power switch), and speak. 4 seconds of audio will be captured, then converted to text.
509
+
1. Build this code, upload it to your Wio Terminal and test it out through the serial monitor. Once you see `Ready` in the serial monitor, press the C button (the one on the left-hand side, closest to the power switch), and speak. 4 seconds of audio will be captured, then converted to text.
501
510
502
511
```output
503
512
--- Available filters and text transformations: colorize, debug, default, direct, hexlify, log2file, nocontrol, printable, send_on_enter, time
Copy file name to clipboardexpand all lines: 6-consumer/lessons/2-language-understanding/README.md
+34-6
Original file line number
Diff line number
Diff line change
@@ -274,7 +274,7 @@ Rather than calling LUIS from the IoT device, you can use serverless code with a
274
274
func new --name text-to-timer --template "HTTP trigger"
275
275
```
276
276
277
-
This will crate an HTTP trigger called `text-to-timer`.
277
+
This will create an HTTP trigger called `text-to-timer`.
278
278
279
279
1. Test the HTTP trigger by running the functions app. When it runs you will see the endpoint listed in the output:
280
280
@@ -493,9 +493,35 @@ Rather than calling LUIS from the IoT device, you can use serverless code with a
493
493
494
494
### Task - make your function available to your IoT device
495
495
496
-
1. For your IoT device to call your REST endpoint, it will need to know the URL. When you accessed it earlier, you used `localhost`, which is a shortcut to access REST endpoints on your local machine. To allow you IoT device to get access, you need to either:
496
+
1. For your IoT device to call your REST endpoint, it will need to know the URL. When you accessed it earlier, you used `localhost`, which is a shortcut to access REST endpoints on your local machine. To allow you IoT device to get access, you need to either publish to the cloud, or get your IP address to access it locally.
497
+
498
+
> ⚠️ If you are using a Wio Terminal, it is easier to run the function app locally, as there will be a dependency on libraries that mean you cannot deploy the function app in the same way as you have done before. Run the function app locally and access it via your computers IP address. If you do want to deploy to the cloud, information will be provided in a later lesson on the way to do this.
499
+
500
+
* Publish the Functions app - follow the instructions in earlier lessons to publish your functions app to the cloud. Once published, the URL will be `https://<APP_NAME>.azurewebsites.net/api/text-to-timer`, where `<APP_NAME>` will be the name of your functions app. Make sure to also publish your local settings.
501
+
502
+
When working withHTTP triggers, they are secured by default with a function app key. To get this key, run the following command:
503
+
504
+
```sh
505
+
az functionapp keys list--resource-group smart-timer \
506
+
--name <APP_NAME>
507
+
```
508
+
509
+
Copy the value of the `default` entry from the `functionKeys` section.
This key will need to be added as a query parameter to the URL, so the final URL will be `https://<APP_NAME>.azurewebsites.net/api/text-to-timer?code=<FUNCTION_KEY>`, where `<APP_NAME>` will be the name of your functions app, and`<FUNCTION_KEY>` will be your default function key.
522
+
523
+
> 💁 You can change the type of authorization of the HTTP trigger using `authlevel` setting in the `function.json`file. You can read more about this in the [configuration section of the Azure Functions HTTP trigger documentation on Microsoft docs](https://docs.microsoft.com/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=python&WT.mc_id=academic-17441-jabenn#configuration).
497
524
498
-
* Publish the Functions app - follow the instructions in earlier lessons to publish your functions app to the cloud. Once published, the URL will be `http://<APP_NAME>.azurewebsites.net/api/text-to-timer`, where `<APP_NAME>` will be the name of your functions app.
499
525
* Run the functions app locally, and access using the IP address - you can get the IP address of your computer on your local network, and use that to build the URL.
500
526
501
527
Find your IP address:
@@ -504,11 +530,13 @@ Rather than calling LUIS from the IoT device, you can use serverless code with a
504
530
* On macOS, follow the [how to find you IP address on a Mac guide](https://www.hellotech.com/guide/for/how-to-find-ip-address-on-mac)
505
531
* On linux, follow the section on finding your private IP address in the [how to find your IP address in Linux guide](https://opensource.com/article/18/5/how-find-ip-address-linux)
506
532
507
-
Once you have your IP address, you will able to access the function at `http://<IP_ADDRESS>:7071/api/text-to-timer`, where `<IP_ADDRESS>` will be your IP address, for example `http://192.168.1.10:7071/api/text-to-timer`.
533
+
Once you have your IP address, you will able to access the function at `http://<IP_ADDRESS>:7071/api/text-to-timer`, where `<IP_ADDRESS>` will be your IP address, for example `http://192.168.1.10:7071/api/text-to-timer`.
534
+
535
+
> 💁 Not that this uses port 7071, so after the IP address you will need to have `:7071`.
508
536
509
-
> 💁 This will only work if your IoT device is on the same network as your computer.
537
+
> 💁 This will only work if your IoT device is on the same network as your computer.
510
538
511
-
1. Test the endpoint by accessing it using your browser.
0 commit comments