diff --git a/6-consumer/lessons/1-speech-recognition/code-speech-to-text/wio-terminal/smart-timer/src/speech_to_text.h b/6-consumer/lessons/1-speech-recognition/code-speech-to-text/wio-terminal/smart-timer/src/speech_to_text.h index a7ce075f..74b4b4fd 100644 --- a/6-consumer/lessons/1-speech-recognition/code-speech-to-text/wio-terminal/smart-timer/src/speech_to_text.h +++ b/6-consumer/lessons/1-speech-recognition/code-speech-to-text/wio-terminal/smart-timer/src/speech_to_text.h @@ -67,6 +67,11 @@ public: return text; } + String AccessToken() + { + return _access_token; + } + private: String getAccessToken() { diff --git a/6-consumer/lessons/1-speech-recognition/wio-terminal-audio.md b/6-consumer/lessons/1-speech-recognition/wio-terminal-audio.md index 302d67d9..8b3a45bb 100644 --- a/6-consumer/lessons/1-speech-recognition/wio-terminal-audio.md +++ b/6-consumer/lessons/1-speech-recognition/wio-terminal-audio.md @@ -24,8 +24,8 @@ Once each buffer has been captured, it can be written to the flash memory. Flash ```ini lib_deps = - seeed-studio/Seeed Arduino FS @ 2.0.3 - seeed-studio/Seeed Arduino SFUD @ 2.0.1 + seeed-studio/Seeed Arduino FS @ 2.1.1 + seeed-studio/Seeed Arduino SFUD @ 2.0.2 ``` 1. Open the `main.cpp` file and add the following include directive for the flash memory library to the top of the file: diff --git a/6-consumer/lessons/1-speech-recognition/wio-terminal-microphone.md b/6-consumer/lessons/1-speech-recognition/wio-terminal-microphone.md index 66e65dc8..8cd8c32d 100644 --- a/6-consumer/lessons/1-speech-recognition/wio-terminal-microphone.md +++ b/6-consumer/lessons/1-speech-recognition/wio-terminal-microphone.md @@ -18,6 +18,8 @@ To connect the ReSpeaker 2-Mics Pi Hat you will need 40 pin-to-pin (also referre > 💁 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. +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. + ### Task - connect the ReSpeaker Pi Hat 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 * If you are using a speaker with a 3.5mm jack, or headphones, insert them into the 3.5mm jack socket. ![A speaker connected to the ReSpeaker via the 3.5mm jack socket](../../../images/respeaker-35mm-speaker.png) + +### Task - set up the SD card + +1. Connect the SD Card to your computer, using na external reader if you don't have an SD Card slot. + +1. Format the SD Card using the appropriate tool on your computer, making sure to use a FAT32 or exFAT file system + +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. + + ![Inserting the SD card into the SD card slot below the power switch](../../../images/wio-sd-card.png) + + > 💁 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. diff --git a/6-consumer/lessons/1-speech-recognition/wio-terminal-speech-to-text.md b/6-consumer/lessons/1-speech-recognition/wio-terminal-speech-to-text.md index a1e2cddb..9010417e 100644 --- a/6-consumer/lessons/1-speech-recognition/wio-terminal-speech-to-text.md +++ b/6-consumer/lessons/1-speech-recognition/wio-terminal-speech-to-text.md @@ -180,6 +180,15 @@ The audio can be sent to the speech service using the REST API. To use the speec 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. +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. + + ```cpp + String AccessToken() + { + return _access_token; + } + ``` + 1. To the `public` section, add an `init` method that sets up the token client: ```cpp @@ -497,7 +506,7 @@ The audio can be sent to the speech service using the REST API. To use the speec Serial.println(text); ``` -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. +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. ```output --- Available filters and text transformations: colorize, debug, default, direct, hexlify, log2file, nocontrol, printable, send_on_enter, time diff --git a/6-consumer/lessons/2-language-understanding/README.md b/6-consumer/lessons/2-language-understanding/README.md index 96cad18d..92ca888a 100644 --- a/6-consumer/lessons/2-language-understanding/README.md +++ b/6-consumer/lessons/2-language-understanding/README.md @@ -274,7 +274,7 @@ Rather than calling LUIS from the IoT device, you can use serverless code with a func new --name text-to-timer --template "HTTP trigger" ``` - This will crate an HTTP trigger called `text-to-timer`. + This will create an HTTP trigger called `text-to-timer`. 1. Test the HTTP trigger by running the functions app. When it runs you will see the endpoint listed in the output: diff --git a/hardware.md b/hardware.md index 90fc4cc0..784c7858 100644 --- a/hardware.md +++ b/hardware.md @@ -46,7 +46,7 @@ These are specific to using the Wio terminal Arduino device, and are not relevan * [Breadboard Jumper Wires](https://www.seeedstudio.com/Breadboard-Jumper-Wire-Pack-241mm-200mm-160mm-117m-p-234.html) * Headphones or other speaker with a 3.5mm jack, or a JST speaker such as: * [Mono Enclosed Speaker - 2W 6 Ohm](https://www.seeedstudio.com/Mono-Enclosed-Speaker-2W-6-Ohm-p-2832.html) -* *Optional* - microSD Card 16GB or less for testing image capture, along with a connector to use the SD card with your computer if you don't have one built-in. **NOTE** - the Wio Terminal only supports SD cards up to 16GB, it does not support higher capacities. +* microSD Card 16GB or less, along with a connector to use the SD card with your computer if you don't have one built-in. **NOTE** - the Wio Terminal only supports SD cards up to 16GB, it does not support higher capacities. ## Raspberry Pi diff --git a/images/Diagrams.sketch b/images/Diagrams.sketch index 53c08897..6dfeb3b5 100644 Binary files a/images/Diagrams.sketch and b/images/Diagrams.sketch differ diff --git a/images/wio-sd-card.png b/images/wio-sd-card.png new file mode 100644 index 00000000..c69b0b30 Binary files /dev/null and b/images/wio-sd-card.png differ