From 2a9c8abcd315b9a4a937a46d916d45a6df7a8c8c Mon Sep 17 00:00:00 2001 From: Jim Bennett Date: Mon, 14 Jun 2021 20:20:26 -0700 Subject: [PATCH] Language tweaks --- .../lessons/1-introduction-to-iot/README.md | 2 +- .../lessons/1-introduction-to-iot/pi.md | 2 +- .../1-introduction-to-iot/virtual-device.md | 16 ++++++++-------- .../1-introduction-to-iot/wio-terminal.md | 10 +++++----- .../lessons/2-deeper-dive/README.md | 8 ++++---- .../3-sensors-and-actuators/pi-actuator.md | 2 +- .../3-sensors-and-actuators/pi-sensor.md | 2 +- .../virtual-device-actuator.md | 4 ++-- .../virtual-device-sensor.md | 4 ++-- .../wio-terminal-actuator.md | 2 +- .../wio-terminal-sensor.md | 4 ++-- .../lessons/4-connect-internet/README.md | 18 +++++++++--------- .../single-board-computer-commands.md | 2 +- .../lessons/1-speech-recognition/README.md | 4 ++-- .../lessons/1-speech-recognition/pi-audio.md | 4 ++-- .../1-speech-recognition/pi-speech-to-text.md | 2 +- .../virtual-device-speech-to-text.md | 4 ++-- 17 files changed, 45 insertions(+), 45 deletions(-) diff --git a/1-getting-started/lessons/1-introduction-to-iot/README.md b/1-getting-started/lessons/1-introduction-to-iot/README.md index 06901940..44335cb8 100644 --- a/1-getting-started/lessons/1-introduction-to-iot/README.md +++ b/1-getting-started/lessons/1-introduction-to-iot/README.md @@ -44,7 +44,7 @@ The **T** in IoT stands for **Things** - devices that interact with the physical Devices for production or commercial use, such as consumer fitness trackers, or industrial machine controllers, are usually custom-made. They use custom circuit boards, maybe even custom processors, designed to meet the needs of a particular task, whether that's being small enough to fit on a wrist, or rugged enough to work in a high temperature, high stress or high vibration factory environment. -As a developer either learning about IoT or creating a device prototype, you'll need to start with a developer kit. These are general-purpose IoT devices designed for developers to use, often with features that you wouldn't see on a production device, such as a set of external pins to connect sensors or actuators to, hardware to support debugging, or additional resources that would add unnecessary cost when doing a large manufacturing run. +As a developer either learning about IoT or creating a device prototype, you'll need to start with a developer kit. These are general-purpose IoT devices designed for developers to use, often with features that you wouldn't have on a production device, such as a set of external pins to connect sensors or actuators to, hardware to support debugging, or additional resources that would add unnecessary cost when doing a large manufacturing run. These developer kits usually fall into two categories - microcontrollers and single-board computers. These will be introduced here, and we'll go into more detail in the next lesson. diff --git a/1-getting-started/lessons/1-introduction-to-iot/pi.md b/1-getting-started/lessons/1-introduction-to-iot/pi.md index 08242b54..eaf4101e 100644 --- a/1-getting-started/lessons/1-introduction-to-iot/pi.md +++ b/1-getting-started/lessons/1-introduction-to-iot/pi.md @@ -235,7 +235,7 @@ Create the Hello World app. > 💁 You need to explicitly call `python3` to run this code just in case you have Python 2 installed in addition to Python 3 (the latest version). If you have Python2 installed then calling `python` will use Python 2 instead of Python 3 - You should see the following output: + The following output will appear in the terminal: ```output pi@raspberrypi:~/nightlight $ python3 app.py diff --git a/1-getting-started/lessons/1-introduction-to-iot/virtual-device.md b/1-getting-started/lessons/1-introduction-to-iot/virtual-device.md index 1c457f01..dbda7c91 100644 --- a/1-getting-started/lessons/1-introduction-to-iot/virtual-device.md +++ b/1-getting-started/lessons/1-introduction-to-iot/virtual-device.md @@ -67,13 +67,13 @@ Configure a Python virtual environment and install the pip packages for CounterF source ./.venv/bin/activate ``` -1. Once the virtual environment has been activated, the default `python` command will run the version of Python that was used to create the virtual environment. Run the following to see this: +1. Once the virtual environment has been activated, the default `python` command will run the version of Python that was used to create the virtual environment. Run the following to get the version: ```sh python --version ``` - You should see the following: + The output should contain the following: ```output (.venv) ➜ nightlight python --version @@ -122,7 +122,7 @@ Create a Python application to print `"Hello World"` to the console. > 💁 If your terminal returns `command not found` on macOS it means VS Code has not been added to your PATH. You can add VS Code to your PATH by following the instructions in the [Launching from the command line section of the VS Code documentation](https://code.visualstudio.com/docs/setup/mac?WT.mc_id=academic-17441-jabenn#_launching-from-the-command-line) and run the command afterwards. VS Code is installed to your PATH by default on Windows and Linux. -1. When VS Code launches, it will activate the Python virtual environment. You will see this in the bottom status bar: +1. When VS Code launches, it will activate the Python virtual environment. The selected virtual environment will appear in the bottom status bar: ![VS Code showing the selected virtual environment](../../../images/vscode-virtual-env.png) @@ -136,9 +136,9 @@ Create a Python application to print `"Hello World"` to the console. (.venv) ➜ nightlight ``` - If you don't see `.venv` as a prefix on the prompt, the virtual environment is not active in the terminal. + If you don't have `.venv` as a prefix on the prompt, the virtual environment is not active in the terminal. -1. Launch a new VS Code Terminal by selecting *Terminal -> New Terminal, or pressing `` CTRL+` ``. The new terminal will load the virtual environment, and you will see the call to activate this in the terminal, as well as having the name of the virtual environment (`.venv`) in the prompt: +1. Launch a new VS Code Terminal by selecting *Terminal -> New Terminal, or pressing `` CTRL+` ``. The new terminal will load the virtual environment, and the the call to activate this will appear in the terminal. The prompt will also have the name of the virtual environment (`.venv`): ```output ➜ nightlight source .venv/bin/activate @@ -159,7 +159,7 @@ Create a Python application to print `"Hello World"` to the console. python app.py ``` - You should see the following output: + The following will be in the output: ```output (.venv) ➜ nightlight python app.py @@ -184,7 +184,7 @@ As a second 'Hello World' step, you will run the CounterFit app and connect your ![The Counter Fit app running in a browser](../../../images/counterfit-first-run.png) - You will see it marked as *Disconnected*, with the LED in the top-right corner turned off. + It will be marked as *Disconnected*, with the LED in the top-right corner turned off. 1. Add the following code to the top of `app.py`: @@ -201,7 +201,7 @@ As a second 'Hello World' step, you will run the CounterFit app and connect your ![VS Code Create a new integrated terminal button](../../../images/vscode-new-terminal.png) -1. In this new terminal, run the `app.py` file as before. You will see the status of CounterFit change to **Connected** and the LED light up. +1. In this new terminal, run the `app.py` file as before. The status of CounterFit will change to **Connected** and the LED will light up. ![Counter Fit showing as connected](../../../images/counterfit-connected.png) diff --git a/1-getting-started/lessons/1-introduction-to-iot/wio-terminal.md b/1-getting-started/lessons/1-introduction-to-iot/wio-terminal.md index 7cfa5325..cd45180d 100644 --- a/1-getting-started/lessons/1-introduction-to-iot/wio-terminal.md +++ b/1-getting-started/lessons/1-introduction-to-iot/wio-terminal.md @@ -40,7 +40,7 @@ Create the PlatformIO project. 1. Launch VS Code -1. You should see the PlatformIO icon on the side menu bar: +1. The PlatformIO icon will be on the side menu bar: ![The Platform IO menu option](../../../images/vscode-platformio-menu.png) @@ -83,7 +83,7 @@ The VS Code explorer will show a number of files and folders created by the Plat #### Files -* `main.cpp` - this file in the `src` folder contains the entry point for your application. If you open the file, you will see the following: +* `main.cpp` - this file in the `src` folder contains the entry point for your application. Open this file, and it will contain the following code: ```cpp #include @@ -101,7 +101,7 @@ The VS Code explorer will show a number of files and folders created by the Plat * `.gitignore` - this file lists the files and directories to be ignored when adding your code to git source code control, such as uploading to a repository on GitHub. -* `platformio.ini` - this file contains configuration for your device and app. If you open this file, you will see the following: +* `platformio.ini` - this file contains configuration for your device and app. Open this file, and it will contain the following code: ```ini [env:seeed_wio_terminal] @@ -166,7 +166,7 @@ Write the Hello World app. 1. The code will be compiled and uploaded to the Wio Terminal - > 💁 If you are using macOS you will see a notification about a *DISK NOT EJECTED PROPERLY*. This is because the Wio Terminal gets mounted as a drive as part of the flashing process, and it is disconnected when the compiled code is written to the device. You can ignore this notification. + > 💁 If you are using macOS, a notification about a *DISK NOT EJECTED PROPERLY* will appear. This is because the Wio Terminal gets mounted as a drive as part of the flashing process, and it is disconnected when the compiled code is written to the device. You can ignore this notification. ⚠️ If you get errors about the upload port being unavailable, first make sure you have the Wio Terminal connected to your computer, and switched on using the switch on the left hand side of the screen. The green light on the bottom should be on. If you still get the error, pull the on/off switch down twice in quick succession to force the Wio Terminal into bootloader mode and try the upload again. @@ -191,7 +191,7 @@ PlatformIO has a Serial Monitor that can monitor data sent over the USB cable fr Hello World ``` - You will see `Hello World` appear every 5 seconds. + `Hello World` will print to the serial monitor every 5 seconds. > 💁 You can find this code in the [code/wio-terminal](code/wio-terminal) folder. diff --git a/1-getting-started/lessons/2-deeper-dive/README.md b/1-getting-started/lessons/2-deeper-dive/README.md index 9d269cd1..35e86daf 100644 --- a/1-getting-started/lessons/2-deeper-dive/README.md +++ b/1-getting-started/lessons/2-deeper-dive/README.md @@ -100,7 +100,7 @@ The faster the clock cycle, the more instructions that can be processed each sec Microcontrollers have much lower clock speeds than desktop or laptop computers, or even most smartphones. The Wio Terminal for example has a CPU that runs at 120MHz or 120,000,000 cycles per second. -✅ An average PC or Mac has a CPU with multiple cores running at multiple GigaHertz, meaning the clock ticks billions of times a second. Research the clock speed of your computer and see how many times faster it is than the Wio terminal. +✅ An average PC or Mac has a CPU with multiple cores running at multiple GigaHertz, meaning the clock ticks billions of times a second. Research the clock speed of your computer and compare how many times faster it is than the Wio terminal. Each clock cycle draws power and generates heat. The faster the ticks, the more power consumed and more heat generated. PC's have heat sinks and fans to remove heat, without which they would overheat and shut down within seconds. Microcontrollers often have neither as they run much cooler and therefore much slower. PC's run off mains power or large batteries for a few hours, microcontrollers can run for days, months, or even years off small batteries. Microcontrollers can also have cores that run at different speeds, switching to slower low power cores when the demand on the CPU is low to reduce power consumption. @@ -112,7 +112,7 @@ Each clock cycle draws power and generates heat. The faster the ticks, the more Investigate the Wio Terminal. -If you are using a Wio Terminal for these lessons, see if you can find the CPU. Find the *Hardware Overview* section of the [Wio Terminal product page](https://www.seeedstudio.com/Wio-Terminal-p-4509.html) for a picture of the internals, and see if you can see the CPU through the clear plastic window on the back. +If you are using a Wio Terminal for these lessons, try to find the CPU. Find the *Hardware Overview* section of the [Wio Terminal product page](https://www.seeedstudio.com/Wio-Terminal-p-4509.html) for a picture of the internals, and try to find the CPU through the clear plastic window on the back. ### Memory @@ -150,7 +150,7 @@ Microcontrollers need input and output (I/O) connections to read data from senso Investigate the Wio Terminal. -If you are using a Wio Terminal for these lessons, find the GPIO pins. Find the *Pinout diagram* section of the [Wio Terminal product page](https://www.seeedstudio.com/Wio-Terminal-p-4509.html) to see which pins are which. The Wio Terminal comes with a sticker you can mount on the back with pin numbers, so add this now if you haven't already. +If you are using a Wio Terminal for these lessons, find the GPIO pins. Find the *Pinout diagram* section of the [Wio Terminal product page](https://www.seeedstudio.com/Wio-Terminal-p-4509.html) to learn which pins are which. The Wio Terminal comes with a sticker you can mount on the back with pin numbers, so add this now if you haven't already. ### Physical size @@ -198,7 +198,7 @@ There is a large ecosystem of third-party Arduino libraries that allow you to ad Investigate the Wio Terminal. -If you are using a Wio Terminal for these lessons, re-read the code you wrote in the last lesson. Find the `setup` and `loop` function. Monitor the serial output to see the loop function being called repeatedly. Try adding code to the `setup` function to write to the serial port and see this code is only called once each time you reboot. Try rebooting your device with the power switch on the side to see this called each time the device reboots. +If you are using a Wio Terminal for these lessons, re-read the code you wrote in the last lesson. Find the `setup` and `loop` function. Monitor the serial output for the loop function being called repeatedly. Try adding code to the `setup` function to write to the serial port and observe that this code is only called once each time you reboot. Try rebooting your device with the power switch on the side to show this is called each time the device reboots. ## Deeper dive into single-board computers diff --git a/1-getting-started/lessons/3-sensors-and-actuators/pi-actuator.md b/1-getting-started/lessons/3-sensors-and-actuators/pi-actuator.md index b6a082e6..ea68cfb6 100644 --- a/1-getting-started/lessons/3-sensors-and-actuators/pi-actuator.md +++ b/1-getting-started/lessons/3-sensors-and-actuators/pi-actuator.md @@ -93,7 +93,7 @@ Program the nightlight. python3 app.py ``` - You should see light values being output to the console. + Light values will be output to the console. ```output pi@raspberrypi:~/nightlight $ python3 app.py diff --git a/1-getting-started/lessons/3-sensors-and-actuators/pi-sensor.md b/1-getting-started/lessons/3-sensors-and-actuators/pi-sensor.md index 7c968115..189e747f 100644 --- a/1-getting-started/lessons/3-sensors-and-actuators/pi-sensor.md +++ b/1-getting-started/lessons/3-sensors-and-actuators/pi-sensor.md @@ -89,7 +89,7 @@ Program the device. python3 app.py ``` - You should see sunlight values being output to the console. Cover and uncover the sunlight sensor to see the values change: + Sunlight values will be output to the console. Cover and uncover the sunlight sensor, and the values will change: ```output pi@raspberrypi:~/nightlight $ python3 app.py diff --git a/1-getting-started/lessons/3-sensors-and-actuators/virtual-device-actuator.md b/1-getting-started/lessons/3-sensors-and-actuators/virtual-device-actuator.md index 74895af1..d782fb62 100644 --- a/1-getting-started/lessons/3-sensors-and-actuators/virtual-device-actuator.md +++ b/1-getting-started/lessons/3-sensors-and-actuators/virtual-device-actuator.md @@ -91,7 +91,7 @@ Program the nightlight. python3 app.py ``` - You should see light values being output to the console. + Light values will be output to the console. ```output (.venv) ➜ GroveTest python3 app.py @@ -101,7 +101,7 @@ Program the nightlight. Light level: 253 ``` -1. Change the *Value* or the *Random* settings to vary the light level above and below 300. You will see the LED turn on and off. +1. Change the *Value* or the *Random* settings to vary the light level above and below 300. The LED will turn on and off. ![The LED in the CounterFit app turning on and off as the light level changes](../../../images/virtual-device-running-assignment-1-1.gif) diff --git a/1-getting-started/lessons/3-sensors-and-actuators/virtual-device-sensor.md b/1-getting-started/lessons/3-sensors-and-actuators/virtual-device-sensor.md index e6d961de..930c4e9d 100644 --- a/1-getting-started/lessons/3-sensors-and-actuators/virtual-device-sensor.md +++ b/1-getting-started/lessons/3-sensors-and-actuators/virtual-device-sensor.md @@ -87,7 +87,7 @@ Program the device. python3 app.py ``` - You should see light values being output to the console. Initially this value will be 0. + Light values will be output to the console. Initially this value will be 0. 1. From the CounterFit app, change the value of the light sensor that will be read by the app. You can do this in one of two ways: @@ -95,7 +95,7 @@ Program the device. * Check the *Random* checkbox, and enter a *Min* and *Max* value, then select the **Set** button. Every time the sensor reads a value, it will read a random number between *Min* and *Max*. - You should see the values you set appearing in the console. Change the *Value* or the *Random* settings to see the value change. + The values you set will be output to in the console. Change the *Value* or the *Random* settings to make the value change. ```output (.venv) ➜ GroveTest python3 app.py diff --git a/1-getting-started/lessons/3-sensors-and-actuators/wio-terminal-actuator.md b/1-getting-started/lessons/3-sensors-and-actuators/wio-terminal-actuator.md index 9175874f..c0dd79a1 100644 --- a/1-getting-started/lessons/3-sensors-and-actuators/wio-terminal-actuator.md +++ b/1-getting-started/lessons/3-sensors-and-actuators/wio-terminal-actuator.md @@ -83,7 +83,7 @@ Program the nightlight. 1. Reconnect the Wio Terminal to your computer, and upload the new code as you did before. -1. Connect the Serial Monitor. You should see light values being output to the terminal. +1. Connect the Serial Monitor. Light values will be output to the terminal. ```output > Executing task: platformio device monitor < diff --git a/1-getting-started/lessons/3-sensors-and-actuators/wio-terminal-sensor.md b/1-getting-started/lessons/3-sensors-and-actuators/wio-terminal-sensor.md index e89cbefc..73fa96ea 100644 --- a/1-getting-started/lessons/3-sensors-and-actuators/wio-terminal-sensor.md +++ b/1-getting-started/lessons/3-sensors-and-actuators/wio-terminal-sensor.md @@ -40,7 +40,7 @@ Program the device. Serial.println(light); ``` - This code reads an analog value from the `WIO_LIGHT` pin. This reads a value from 0-1,023 from the on-board light sensor. This value is then sent to the serial port so you can see it in the Serial Monitor when this code is running. `Serial.print` writes the text without a new line on the end, so each line will start with `Light value:` and end with the actual light value. + This code reads an analog value from the `WIO_LIGHT` pin. This reads a value from 0-1,023 from the on-board light sensor. This value is then sent to the serial port so you can read it in the Serial Monitor when this code is running. `Serial.print` writes the text without a new line on the end, so each line will start with `Light value:` and end with the actual light value. 1. Add a small delay of one second (1,000ms) at the end of the `loop` as the light levels don't need to be checked continuously. A delay reduces the power consumption of the device. @@ -50,7 +50,7 @@ Program the device. 1. Reconnect the Wio Terminal to your computer, and upload the new code as you did before. -1. Connect the Serial Monitor. You should see light values being output to the terminal. Cover and uncover the light sensor on the back of the Wio Terminal to see the values change. +1. Connect the Serial Monitor.Light values will be output to the terminal. Cover and uncover the light sensor on the back of the Wio Terminal, and the values will change. ```output > Executing task: platformio device monitor < diff --git a/1-getting-started/lessons/4-connect-internet/README.md b/1-getting-started/lessons/4-connect-internet/README.md index 49ae2dbe..72451c87 100644 --- a/1-getting-started/lessons/4-connect-internet/README.md +++ b/1-getting-started/lessons/4-connect-internet/README.md @@ -88,7 +88,7 @@ Messages can be sent with a quality of service (QoS), which determines the guara Although the name is Message Queueing (initials in MQTT), it doesn't actually support message queues. This means that if a client disconnects, then reconnects it won't receive messages sent during the disconnection, except for those messages that it had already started to process using the QoS process. Messages can have a retained flag set on them. If this is set, the MQTT broker will store the last message sent on a topic with this flag, and send this to any clients who later subscribe to the topic. This way, the clients will always get the latest message. -MQTT also supports a keep alive function that checks to see if the connection is still alive during long gaps between messages. +MQTT also supports a keep alive function that checks if the connection is still alive during long gaps between messages. > 🦟 [Mosquitto from the Eclipse Foundation](https://mosquitto.org) has a free MQTT broker you can run yourself to experiment with MQTT, along with a public MQTT broker you can use to test your code, hosted at [test.mosquitto.org](https://test.mosquitto.org). @@ -198,13 +198,13 @@ Configure a Python virtual environment and install the MQTT pip packages. source ./.venv/bin/activate ``` -1. Once the virtual environment has been activated, the default `python` command will run the version of Python that was used to create the virtual environment. Run the following to see this: +1. Once the virtual environment has been activated, the default `python` command will run the version of Python that was used to create the virtual environment. Run the following to get this version: ```sh python --version ``` - You should see the following: + The output will be similar to the following: ```output (.venv) ➜ nightlight-server python --version @@ -249,7 +249,7 @@ Write the server code. code . ``` -1. When VS Code launches, it will activate the Python virtual environment. You will see this in the bottom status bar: +1. When VS Code launches, it will activate the Python virtual environment. This will be reported in the bottom status bar: ![VS Code showing the selected virtual environment](../../../images/vscode-virtual-env.png) @@ -257,7 +257,7 @@ Write the server code. ![VS Code Kill the active terminal instance button](../../../images/vscode-kill-terminal.png) -1. Launch a new VS Code Terminal by selecting *Terminal -> New Terminal, or pressing `` CTRL+` ``. The new terminal will load the virtual environment, and you will see the call to activate this in the terminal, as well as having the name of the virtual environment (`.venv`) in the prompt: +1. Launch a new VS Code Terminal by selecting *Terminal -> New Terminal, or pressing `` CTRL+` ``. The new terminal will load the virtual environment, with the call to activate this appearing in the terminal. The name of the virtual environment (`.venv`) will also be in the prompt: ```output ➜ nightlight source .venv/bin/activate @@ -311,15 +311,15 @@ Write the server code. The app will start listening to messages from the IoT device. -1. Make sure your device is running and sending telemetry messages. Adjust the light levels detected by your physical or virtual device. You will see messages being received in the terminal. +1. Make sure your device is running and sending telemetry messages. Adjust the light levels detected by your physical or virtual device. Messages being received will be printed to the terminal. ```output (.venv) ➜ nightlight-server python app.py Message received: {'light': 0} Message received: {'light': 400} ``` - - The app.py file in the nightlight virtual environment has to be running for the app.py file in the nightlight-server virtual environment to recieve the messages being sent. + + The app.py file in the nightlight virtual environment has to be running for the app.py file in the nightlight-server virtual environment to receive the messages being sent. > 💁 You can find this code in the [code-server/server](code-server/server) folder. @@ -382,7 +382,7 @@ The next step for our Internet controlled nightlight is for the server code to s 1. Run the code as before -1. Adjust the light levels detected by your physical or virtual device. You will see messages being received and commands being sent in the terminal: +1. Adjust the light levels detected by your physical or virtual device. Messages being received and commands being sent will be written to the terminal: ```output (.venv) ➜ nightlight-server python app.py diff --git a/1-getting-started/lessons/4-connect-internet/single-board-computer-commands.md b/1-getting-started/lessons/4-connect-internet/single-board-computer-commands.md index ae6a975a..84464cb6 100644 --- a/1-getting-started/lessons/4-connect-internet/single-board-computer-commands.md +++ b/1-getting-started/lessons/4-connect-internet/single-board-computer-commands.md @@ -46,7 +46,7 @@ Subscribe to commands. 1. Run the code in the same way as you ran the code from the previous part of the assignment. If you are using a virtual IoT device, then make sure the CounterFit app is running and the light sensor and LED have been created on the correct pins. -1. Adjust the light levels detected by your physical or virtual device. You will see messages being received and commands being sent in the terminal. You will also see the LED is being turned on and off depending on the light level. +1. Adjust the light levels detected by your physical or virtual device. Messages being received and commands being sent will be written to the terminal. The LED will also be turned on and off depending on the light level. > 💁 You can find this code in the [code-commands/virtual-device](code-commands/virtual-device) folder or the [code-commands/pi](code-commands/pi) folder. diff --git a/6-consumer/lessons/1-speech-recognition/README.md b/6-consumer/lessons/1-speech-recognition/README.md index c94c02c8..a7e66bff 100644 --- a/6-consumer/lessons/1-speech-recognition/README.md +++ b/6-consumer/lessons/1-speech-recognition/README.md @@ -113,7 +113,7 @@ Speech to text, or speech recognition, involves using AI to convert words in an ### Speech recognition models -To convert speech to text, samples from the audio signal are grouped together and fed into a machine learning model based around a Recurrent Neural network (RNN). This is a type of machine learning model that can use previous data to make a decision about incoming data. For example, the RNN could detect one block of audio samples as the sound 'Hel', and when it receives another that it thinks is the sound 'lo', it can combine this with the previous sound, see that 'Hello' is a valid word and select that as the outcome. +To convert speech to text, samples from the audio signal are grouped together and fed into a machine learning model based around a Recurrent Neural network (RNN). This is a type of machine learning model that can use previous data to make a decision about incoming data. For example, the RNN could detect one block of audio samples as the sound 'Hel', and when it receives another that it thinks is the sound 'lo', it can combine this with the previous sound, find that 'Hello' is a valid word and select that as the outcome. ML models always accept data of the same size every time. The image classifier you built in an earlier lesson resizes images to a fixed size and processes them. The same with speech models, they have to process fixed sized audio chunks. The speech models need to be able to combine the outputs of multiple predictions to get the answer, to allow it to distinguish between 'Hi' and 'Highway', or 'flock' and 'floccinaucinihilipilification'. @@ -204,7 +204,7 @@ To use the results of the speech to text conversion, you need to send it to the ## 🚀 Challenge -Speech recognition has been around for a long time, and is continuously improving. Research the current capabilities and see how these have evolved over time, including how accurate machine transcriptions are compared to human. +Speech recognition has been around for a long time, and is continuously improving. Research the current capabilities and compare how these have evolved over time, including how accurate machine transcriptions are compared to human. What do you think the future holds for speech recognition? diff --git a/6-consumer/lessons/1-speech-recognition/pi-audio.md b/6-consumer/lessons/1-speech-recognition/pi-audio.md index 7e8f4163..a51c0dcc 100644 --- a/6-consumer/lessons/1-speech-recognition/pi-audio.md +++ b/6-consumer/lessons/1-speech-recognition/pi-audio.md @@ -190,7 +190,7 @@ You can capture audio from the microphone using Python code. 1. Run the code. Press the button and speak into the microphone. Release the button when you are done, and you will hear the recording. - You may see some ALSA errors when the PyAudio instance is created. This is due to configuration on the Pi for audio devices you don't have. You can ignore these errors. + You may get some ALSA errors when the PyAudio instance is created. This is due to configuration on the Pi for audio devices you don't have. You can ignore these errors. ```output pi@raspberrypi:~/smart-timer $ python3 app.py @@ -200,7 +200,7 @@ You can capture audio from the microphone using Python code. ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ``` - If you see the following error: + If you get the following error: ```output OSError: [Errno -9997] Invalid sample rate diff --git a/6-consumer/lessons/1-speech-recognition/pi-speech-to-text.md b/6-consumer/lessons/1-speech-recognition/pi-speech-to-text.md index ee4bb242..f5be1fce 100644 --- a/6-consumer/lessons/1-speech-recognition/pi-speech-to-text.md +++ b/6-consumer/lessons/1-speech-recognition/pi-speech-to-text.md @@ -91,7 +91,7 @@ The audio can be sent to the speech service using the REST API. To use the speec print(text) ``` -1. Run the code. Press the button and speak into the microphone. Release the button when you are done, and you will see the audio converted to text in the output. +1. Run the code. Press the button and speak into the microphone. Release the button when you are done, and the audio will be converted to text and printed to the console. ```output pi@raspberrypi:~/smart-timer $ python3 app.py diff --git a/6-consumer/lessons/1-speech-recognition/virtual-device-speech-to-text.md b/6-consumer/lessons/1-speech-recognition/virtual-device-speech-to-text.md index 5e982344..79618b59 100644 --- a/6-consumer/lessons/1-speech-recognition/virtual-device-speech-to-text.md +++ b/6-consumer/lessons/1-speech-recognition/virtual-device-speech-to-text.md @@ -16,7 +16,7 @@ On Windows, Linux, and macOS, the speech services Python SDK can be used to list pip install azure-cognitiveservices-speech ``` - > ⚠️ If you see the following error: + > ⚠️ If you get the following error: > > ```output > ERROR: Could not find a version that satisfies the requirement azure-cognitiveservices-speech (from versions: none) @@ -80,7 +80,7 @@ On Windows, Linux, and macOS, the speech services Python SDK can be used to list time.sleep(1) ``` -1. Run this app. Speak into your microphone and you will see the audio converted to text in the console. +1. Run this app. Speak into your microphone and the audio converted to text will be output to the console. ```output (.venv) ➜ smart-timer python3 app.py