diff --git a/af-ZA/images/8-background-annotated.png b/af-ZA/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/af-ZA/images/8-background-annotated.png and b/af-ZA/images/8-background-annotated.png differ diff --git a/af-ZA/images/8-background.png b/af-ZA/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/af-ZA/images/8-background.png and b/af-ZA/images/8-background.png differ diff --git a/af-ZA/images/8-left.png b/af-ZA/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/af-ZA/images/8-left.png and b/af-ZA/images/8-left.png differ diff --git a/af-ZA/images/8-right-annotated.png b/af-ZA/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/af-ZA/images/8-right-annotated.png and b/af-ZA/images/8-right-annotated.png differ diff --git a/af-ZA/images/8-right.png b/af-ZA/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/af-ZA/images/8-right.png and b/af-ZA/images/8-right.png differ diff --git a/af-ZA/images/add-example-annotated.png b/af-ZA/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/af-ZA/images/add-example-annotated.png and b/af-ZA/images/add-example-annotated.png differ diff --git a/af-ZA/images/alien-language.png b/af-ZA/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/af-ZA/images/alien-language.png differ diff --git a/af-ZA/images/allow-microphone.png b/af-ZA/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/af-ZA/images/allow-microphone.png differ diff --git a/af-ZA/images/background-noise-annotated.png b/af-ZA/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/af-ZA/images/background-noise-annotated.png and b/af-ZA/images/background-noise-annotated.png differ diff --git a/af-ZA/images/background-noise.png b/af-ZA/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/af-ZA/images/background-noise.png and b/af-ZA/images/background-noise.png differ diff --git a/af-ZA/images/click-train.png b/af-ZA/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/af-ZA/images/click-train.png and b/af-ZA/images/click-train.png differ diff --git a/af-ZA/images/control-alien-blocks.png b/af-ZA/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/af-ZA/images/control-alien-blocks.png differ diff --git a/af-ZA/images/create-project.png b/af-ZA/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/af-ZA/images/create-project.png differ diff --git a/af-ZA/images/create.png b/af-ZA/images/create.png index 16d02d79..2283d747 100644 Binary files a/af-ZA/images/create.png and b/af-ZA/images/create.png differ diff --git a/af-ZA/images/extensions-annotated.png b/af-ZA/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/af-ZA/images/extensions-annotated.png and b/af-ZA/images/extensions-annotated.png differ diff --git a/af-ZA/images/learn-test-annotated.png b/af-ZA/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/af-ZA/images/learn-test-annotated.png and b/af-ZA/images/learn-test-annotated.png differ diff --git a/af-ZA/images/left-empty-annotated.png b/af-ZA/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/af-ZA/images/left-empty-annotated.png and b/af-ZA/images/left-empty-annotated.png differ diff --git a/af-ZA/images/make-annotated.png b/af-ZA/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/af-ZA/images/make-annotated.png and b/af-ZA/images/make-annotated.png differ diff --git a/af-ZA/images/new-blocks.png b/af-ZA/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/af-ZA/images/new-blocks.png differ diff --git a/af-ZA/images/project-train.png b/af-ZA/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/af-ZA/images/project-train.png differ diff --git a/af-ZA/images/projects-list.png b/af-ZA/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/af-ZA/images/projects-list.png differ diff --git a/af-ZA/images/record-button.png b/af-ZA/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/af-ZA/images/record-button.png differ diff --git a/af-ZA/images/save-example-annotated.png b/af-ZA/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/af-ZA/images/save-example-annotated.png and b/af-ZA/images/save-example-annotated.png differ diff --git a/af-ZA/images/start-listening-annotated.png b/af-ZA/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/af-ZA/images/start-listening-annotated.png and b/af-ZA/images/start-listening-annotated.png differ diff --git a/af-ZA/images/test-your-model.png b/af-ZA/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/af-ZA/images/test-your-model.png differ diff --git a/af-ZA/images/train-annotated.png b/af-ZA/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/af-ZA/images/train-annotated.png and b/af-ZA/images/train-annotated.png differ diff --git a/af-ZA/images/train-new-model.png b/af-ZA/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/af-ZA/images/train-new-model.png differ diff --git a/af-ZA/images/whatyouwillmake.gif b/af-ZA/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/af-ZA/images/whatyouwillmake.gif differ diff --git a/af-ZA/meta.yml b/af-ZA/meta.yml index 5e7aa1ea..d319a52e 100644 --- a/af-ZA/meta.yml +++ b/af-ZA/meta.yml @@ -8,22 +8,26 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - title: What next? + title: What can you do now? + completion: + - external diff --git a/af-ZA/resources/NEW Alien 1.mp4 b/af-ZA/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/af-ZA/resources/NEW Alien 1.mp4 differ diff --git a/af-ZA/resources/NEW Alien 1.srt b/af-ZA/resources/NEW Alien 1.srt new file mode 100644 index 00000000..d7f69ddd --- /dev/null +++ b/af-ZA/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ML4K and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/af-ZA/resources/NEW Alien 2.mp4 b/af-ZA/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/af-ZA/resources/NEW Alien 2.mp4 differ diff --git a/af-ZA/resources/NEW Alien 2.srt b/af-ZA/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/af-ZA/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/af-ZA/resources/NEW Alien 3.mp4 b/af-ZA/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/af-ZA/resources/NEW Alien 3.mp4 differ diff --git a/af-ZA/resources/NEW Alien 3.srt b/af-ZA/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/af-ZA/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/af-ZA/resources/NEW Alien 4.mp4 b/af-ZA/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/af-ZA/resources/NEW Alien 4.mp4 differ diff --git a/af-ZA/resources/NEW Alien 4.srt b/af-ZA/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/af-ZA/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/af-ZA/resources/readme.txt b/af-ZA/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/af-ZA/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/af-ZA/step_1.md b/af-ZA/step_1.md index c490131c..aa0540f2 100644 --- a/af-ZA/step_1.md +++ b/af-ZA/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/af-ZA/step_2.md b/af-ZA/step_2.md index 5954228f..21547d7a 100644 --- a/af-ZA/step_2.md +++ b/af-ZA/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/af-ZA/step_3.md b/af-ZA/step_3.md index 1421a334..bf9eb8ee 100644 --- a/af-ZA/step_3.md +++ b/af-ZA/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/af-ZA/step_4.md b/af-ZA/step_4.md index 1460a58b..785b11b0 100644 --- a/af-ZA/step_4.md +++ b/af-ZA/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/af-ZA/step_5.md b/af-ZA/step_5.md index ad5d0c1f..c361be8e 100644 --- a/af-ZA/step_5.md +++ b/af-ZA/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/af-ZA/step_6.md b/af-ZA/step_6.md index 0fe36309..6ca94946 100644 --- a/af-ZA/step_6.md +++ b/af-ZA/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/af-ZA/step_7.md b/af-ZA/step_7.md index 043d77a9..d4b22e96 100644 --- a/af-ZA/step_7.md +++ b/af-ZA/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/ar-SA/images/8-background-annotated.png b/ar-SA/images/8-background-annotated.png index b80a56a6..693fd32c 100644 Binary files a/ar-SA/images/8-background-annotated.png and b/ar-SA/images/8-background-annotated.png differ diff --git a/ar-SA/images/8-background.png b/ar-SA/images/8-background.png index 096d3169..70445dd8 100644 Binary files a/ar-SA/images/8-background.png and b/ar-SA/images/8-background.png differ diff --git a/ar-SA/images/8-left.png b/ar-SA/images/8-left.png index c8ccf98c..5a4a21a3 100644 Binary files a/ar-SA/images/8-left.png and b/ar-SA/images/8-left.png differ diff --git a/ar-SA/images/8-right-annotated.png b/ar-SA/images/8-right-annotated.png index daef8333..3b44cd58 100644 Binary files a/ar-SA/images/8-right-annotated.png and b/ar-SA/images/8-right-annotated.png differ diff --git a/ar-SA/images/8-right.png b/ar-SA/images/8-right.png index 10cda4e0..c41876a1 100644 Binary files a/ar-SA/images/8-right.png and b/ar-SA/images/8-right.png differ diff --git a/ar-SA/images/S-to-T-blocks-test.png b/ar-SA/images/S-to-T-blocks-test.png index 9584d082..69bb934b 100644 Binary files a/ar-SA/images/S-to-T-blocks-test.png and b/ar-SA/images/S-to-T-blocks-test.png differ diff --git a/ar-SA/images/S-to-T-blocks.png b/ar-SA/images/S-to-T-blocks.png index 3abaa355..02ea2cdf 100644 Binary files a/ar-SA/images/S-to-T-blocks.png and b/ar-SA/images/S-to-T-blocks.png differ diff --git a/ar-SA/images/add-example-annotated.png b/ar-SA/images/add-example-annotated.png index 81291957..b3c25c52 100644 Binary files a/ar-SA/images/add-example-annotated.png and b/ar-SA/images/add-example-annotated.png differ diff --git a/ar-SA/images/add-example.png b/ar-SA/images/add-example.png index 0fa70ce6..99878298 100644 Binary files a/ar-SA/images/add-example.png and b/ar-SA/images/add-example.png differ diff --git a/ar-SA/images/add-new-blocks.png b/ar-SA/images/add-new-blocks.png index a00e4d4c..419811cc 100644 Binary files a/ar-SA/images/add-new-blocks.png and b/ar-SA/images/add-new-blocks.png differ diff --git a/ar-SA/images/alien-language.png b/ar-SA/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/ar-SA/images/alien-language.png differ diff --git a/ar-SA/images/allow-microphone.png b/ar-SA/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/ar-SA/images/allow-microphone.png differ diff --git a/ar-SA/images/background-noise-annotated.png b/ar-SA/images/background-noise-annotated.png index ad50c670..f17a7626 100644 Binary files a/ar-SA/images/background-noise-annotated.png and b/ar-SA/images/background-noise-annotated.png differ diff --git a/ar-SA/images/background-noise.png b/ar-SA/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/ar-SA/images/background-noise.png and b/ar-SA/images/background-noise.png differ diff --git a/ar-SA/images/click-train.png b/ar-SA/images/click-train.png index 78243ae3..069cd321 100644 Binary files a/ar-SA/images/click-train.png and b/ar-SA/images/click-train.png differ diff --git a/ar-SA/images/control-alien-blocks.png b/ar-SA/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/ar-SA/images/control-alien-blocks.png differ diff --git a/ar-SA/images/create-project.png b/ar-SA/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/ar-SA/images/create-project.png differ diff --git a/ar-SA/images/create.png b/ar-SA/images/create.png index 16d02d79..0d91c272 100644 Binary files a/ar-SA/images/create.png and b/ar-SA/images/create.png differ diff --git a/ar-SA/images/extensions-annotated.png b/ar-SA/images/extensions-annotated.png index 14c15c8c..17a2e470 100644 Binary files a/ar-SA/images/extensions-annotated.png and b/ar-SA/images/extensions-annotated.png differ diff --git a/ar-SA/images/extensions.png b/ar-SA/images/extensions.png index 8882fb15..a2b0b9f1 100644 Binary files a/ar-SA/images/extensions.png and b/ar-SA/images/extensions.png differ diff --git a/ar-SA/images/learn-test-annotated.png b/ar-SA/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/ar-SA/images/learn-test-annotated.png and b/ar-SA/images/learn-test-annotated.png differ diff --git a/ar-SA/images/learn-test.png b/ar-SA/images/learn-test.png index f337b368..dcc16cdc 100644 Binary files a/ar-SA/images/learn-test.png and b/ar-SA/images/learn-test.png differ diff --git a/ar-SA/images/left-empty-annotated.png b/ar-SA/images/left-empty-annotated.png index 1c6c200b..7dd196b8 100644 Binary files a/ar-SA/images/left-empty-annotated.png and b/ar-SA/images/left-empty-annotated.png differ diff --git a/ar-SA/images/left-empty.png b/ar-SA/images/left-empty.png index 07a87aea..4fb0d531 100644 Binary files a/ar-SA/images/left-empty.png and b/ar-SA/images/left-empty.png differ diff --git a/ar-SA/images/make-annotated.png b/ar-SA/images/make-annotated.png index 9f9e2f5a..cf190cc2 100644 Binary files a/ar-SA/images/make-annotated.png and b/ar-SA/images/make-annotated.png differ diff --git a/ar-SA/images/make.png b/ar-SA/images/make.png index f337b368..1ef987fd 100644 Binary files a/ar-SA/images/make.png and b/ar-SA/images/make.png differ diff --git a/ar-SA/images/new-blocks.png b/ar-SA/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/ar-SA/images/new-blocks.png differ diff --git a/ar-SA/images/project-train.png b/ar-SA/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/ar-SA/images/project-train.png differ diff --git a/ar-SA/images/projects-list.png b/ar-SA/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/ar-SA/images/projects-list.png differ diff --git a/ar-SA/images/record-button.png b/ar-SA/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/ar-SA/images/record-button.png differ diff --git a/ar-SA/images/save-example-annotated.png b/ar-SA/images/save-example-annotated.png index 50276042..e0fbaad9 100644 Binary files a/ar-SA/images/save-example-annotated.png and b/ar-SA/images/save-example-annotated.png differ diff --git a/ar-SA/images/save-example.png b/ar-SA/images/save-example.png index 0d1a1d48..623b671a 100644 Binary files a/ar-SA/images/save-example.png and b/ar-SA/images/save-example.png differ diff --git a/ar-SA/images/start-listening-annotated.png b/ar-SA/images/start-listening-annotated.png index 2c33da25..bba435c0 100644 Binary files a/ar-SA/images/start-listening-annotated.png and b/ar-SA/images/start-listening-annotated.png differ diff --git a/ar-SA/images/start-listening.png b/ar-SA/images/start-listening.png index db113d03..60e0da94 100644 Binary files a/ar-SA/images/start-listening.png and b/ar-SA/images/start-listening.png differ diff --git a/ar-SA/images/test-new-blocks.png b/ar-SA/images/test-new-blocks.png index 5c4260bc..367abc5e 100644 Binary files a/ar-SA/images/test-new-blocks.png and b/ar-SA/images/test-new-blocks.png differ diff --git a/ar-SA/images/test-your-model.png b/ar-SA/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/ar-SA/images/test-your-model.png differ diff --git a/ar-SA/images/train-annotated.png b/ar-SA/images/train-annotated.png index e932f6b9..0dff2b2f 100644 Binary files a/ar-SA/images/train-annotated.png and b/ar-SA/images/train-annotated.png differ diff --git a/ar-SA/images/train-new-model.png b/ar-SA/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/ar-SA/images/train-new-model.png differ diff --git a/ar-SA/images/train.png b/ar-SA/images/train.png index ba8882af..2528d83a 100644 Binary files a/ar-SA/images/train.png and b/ar-SA/images/train.png differ diff --git a/ar-SA/images/whatyouwillmake.gif b/ar-SA/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/ar-SA/images/whatyouwillmake.gif differ diff --git a/ar-SA/meta.yml b/ar-SA/meta.yml index 5e7aa1ea..701e368b 100644 --- a/ar-SA/meta.yml +++ b/ar-SA/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: لغة غريبة hero_image: images/banner.png -description: Create your own alien language to move a sprite -theme: orange +description: قم بإنشاء لغة كائن الفضاء الخاصة بك لتحريك الكائن +theme: البرتقالي listed: true copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: ما الذي ستصنعه - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/ar-SA/resources/NEW Alien 1.mp4 b/ar-SA/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/ar-SA/resources/NEW Alien 1.mp4 differ diff --git a/ar-SA/resources/NEW Alien 1.srt b/ar-SA/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/ar-SA/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/ar-SA/resources/NEW Alien 2.mp4 b/ar-SA/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/ar-SA/resources/NEW Alien 2.mp4 differ diff --git a/ar-SA/resources/NEW Alien 2.srt b/ar-SA/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/ar-SA/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/ar-SA/resources/NEW Alien 3.mp4 b/ar-SA/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/ar-SA/resources/NEW Alien 3.mp4 differ diff --git a/ar-SA/resources/NEW Alien 3.srt b/ar-SA/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/ar-SA/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/ar-SA/resources/NEW Alien 4.mp4 b/ar-SA/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/ar-SA/resources/NEW Alien 4.mp4 differ diff --git a/ar-SA/resources/NEW Alien 4.srt b/ar-SA/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/ar-SA/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/ar-SA/resources/readme.txt b/ar-SA/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/ar-SA/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/ar-SA/step_1.md b/ar-SA/step_1.md index c490131c..a97b0d4b 100644 --- a/ar-SA/step_1.md +++ b/ar-SA/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## ما الذي ستصنعه -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +نود أن نشكر دايل من machinelearningforkids.co.uk على جميع أعماله في هذا المشروع. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/ar-SA/step_2.md b/ar-SA/step_2.md index 5954228f..e6930402 100644 --- a/ar-SA/step_2.md +++ b/ar-SA/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/ar-SA/step_3.md b/ar-SA/step_3.md index 1421a334..bf9eb8ee 100644 --- a/ar-SA/step_3.md +++ b/ar-SA/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/ar-SA/step_4.md b/ar-SA/step_4.md index 1460a58b..93068df9 100644 --- a/ar-SA/step_4.md +++ b/ar-SA/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +---/task-- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/ar-SA/step_5.md b/ar-SA/step_5.md index ad5d0c1f..c361be8e 100644 --- a/ar-SA/step_5.md +++ b/ar-SA/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/ar-SA/step_6.md b/ar-SA/step_6.md index 0fe36309..6ca94946 100644 --- a/ar-SA/step_6.md +++ b/ar-SA/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/ar-SA/step_7.md b/ar-SA/step_7.md index 043d77a9..d4b22e96 100644 --- a/ar-SA/step_7.md +++ b/ar-SA/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/ar-SA/step_8.md b/ar-SA/step_8.md index 0b7653d3..9a017059 100644 --- a/ar-SA/step_8.md +++ b/ar-SA/step_8.md @@ -1,7 +1,7 @@ -## What next? +## ما التالي؟ -If you haven't already, try our other machine learning with Scratch projects. +إذا لم تكن قد قمت بذلك بالفعل ، فجرب مشاريعنا الاخرى في تعلم الالة باستخدام منصة Scratch. -[Smart Classroom](https://projects.raspberrypi.org/en/projects/smart-classroom) +[الفصول الذكية](https://projects.raspberrypi.org/en/projects/smart-classroom) -[Journey to school](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file +[رحلة إلى المدرسة](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file diff --git a/ca-ES/images/8-background-annotated.png b/ca-ES/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/ca-ES/images/8-background-annotated.png and b/ca-ES/images/8-background-annotated.png differ diff --git a/ca-ES/images/8-background.png b/ca-ES/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/ca-ES/images/8-background.png and b/ca-ES/images/8-background.png differ diff --git a/ca-ES/images/8-left.png b/ca-ES/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/ca-ES/images/8-left.png and b/ca-ES/images/8-left.png differ diff --git a/ca-ES/images/8-right-annotated.png b/ca-ES/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/ca-ES/images/8-right-annotated.png and b/ca-ES/images/8-right-annotated.png differ diff --git a/ca-ES/images/8-right.png b/ca-ES/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/ca-ES/images/8-right.png and b/ca-ES/images/8-right.png differ diff --git a/ca-ES/images/add-example-annotated.png b/ca-ES/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/ca-ES/images/add-example-annotated.png and b/ca-ES/images/add-example-annotated.png differ diff --git a/ca-ES/images/alien-language.png b/ca-ES/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/ca-ES/images/alien-language.png differ diff --git a/ca-ES/images/allow-microphone.png b/ca-ES/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/ca-ES/images/allow-microphone.png differ diff --git a/ca-ES/images/background-noise-annotated.png b/ca-ES/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/ca-ES/images/background-noise-annotated.png and b/ca-ES/images/background-noise-annotated.png differ diff --git a/ca-ES/images/background-noise.png b/ca-ES/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/ca-ES/images/background-noise.png and b/ca-ES/images/background-noise.png differ diff --git a/ca-ES/images/click-train.png b/ca-ES/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/ca-ES/images/click-train.png and b/ca-ES/images/click-train.png differ diff --git a/ca-ES/images/control-alien-blocks.png b/ca-ES/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/ca-ES/images/control-alien-blocks.png differ diff --git a/ca-ES/images/create-project.png b/ca-ES/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/ca-ES/images/create-project.png differ diff --git a/ca-ES/images/create.png b/ca-ES/images/create.png index 16d02d79..2283d747 100644 Binary files a/ca-ES/images/create.png and b/ca-ES/images/create.png differ diff --git a/ca-ES/images/extensions-annotated.png b/ca-ES/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/ca-ES/images/extensions-annotated.png and b/ca-ES/images/extensions-annotated.png differ diff --git a/ca-ES/images/learn-test-annotated.png b/ca-ES/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/ca-ES/images/learn-test-annotated.png and b/ca-ES/images/learn-test-annotated.png differ diff --git a/ca-ES/images/left-empty-annotated.png b/ca-ES/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/ca-ES/images/left-empty-annotated.png and b/ca-ES/images/left-empty-annotated.png differ diff --git a/ca-ES/images/make-annotated.png b/ca-ES/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/ca-ES/images/make-annotated.png and b/ca-ES/images/make-annotated.png differ diff --git a/ca-ES/images/new-blocks.png b/ca-ES/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/ca-ES/images/new-blocks.png differ diff --git a/ca-ES/images/project-train.png b/ca-ES/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/ca-ES/images/project-train.png differ diff --git a/ca-ES/images/projects-list.png b/ca-ES/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/ca-ES/images/projects-list.png differ diff --git a/ca-ES/images/record-button.png b/ca-ES/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/ca-ES/images/record-button.png differ diff --git a/ca-ES/images/save-example-annotated.png b/ca-ES/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/ca-ES/images/save-example-annotated.png and b/ca-ES/images/save-example-annotated.png differ diff --git a/ca-ES/images/start-listening-annotated.png b/ca-ES/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/ca-ES/images/start-listening-annotated.png and b/ca-ES/images/start-listening-annotated.png differ diff --git a/ca-ES/images/test-your-model.png b/ca-ES/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/ca-ES/images/test-your-model.png differ diff --git a/ca-ES/images/train-annotated.png b/ca-ES/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/ca-ES/images/train-annotated.png and b/ca-ES/images/train-annotated.png differ diff --git a/ca-ES/images/train-new-model.png b/ca-ES/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/ca-ES/images/train-new-model.png differ diff --git a/ca-ES/images/whatyouwillmake.gif b/ca-ES/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/ca-ES/images/whatyouwillmake.gif differ diff --git a/ca-ES/meta.yml b/ca-ES/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/ca-ES/meta.yml +++ b/ca-ES/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/ca-ES/resources/NEW Alien 1.mp4 b/ca-ES/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/ca-ES/resources/NEW Alien 1.mp4 differ diff --git a/ca-ES/resources/NEW Alien 1.srt b/ca-ES/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/ca-ES/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/ca-ES/resources/NEW Alien 2.mp4 b/ca-ES/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/ca-ES/resources/NEW Alien 2.mp4 differ diff --git a/ca-ES/resources/NEW Alien 2.srt b/ca-ES/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/ca-ES/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/ca-ES/resources/NEW Alien 3.mp4 b/ca-ES/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/ca-ES/resources/NEW Alien 3.mp4 differ diff --git a/ca-ES/resources/NEW Alien 3.srt b/ca-ES/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/ca-ES/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/ca-ES/resources/NEW Alien 4.mp4 b/ca-ES/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/ca-ES/resources/NEW Alien 4.mp4 differ diff --git a/ca-ES/resources/NEW Alien 4.srt b/ca-ES/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/ca-ES/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/ca-ES/resources/readme.txt b/ca-ES/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/ca-ES/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/ca-ES/step_1.md b/ca-ES/step_1.md index c490131c..aa0540f2 100644 --- a/ca-ES/step_1.md +++ b/ca-ES/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/ca-ES/step_2.md b/ca-ES/step_2.md index 5954228f..e6930402 100644 --- a/ca-ES/step_2.md +++ b/ca-ES/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/ca-ES/step_3.md b/ca-ES/step_3.md index 1421a334..bf9eb8ee 100644 --- a/ca-ES/step_3.md +++ b/ca-ES/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/ca-ES/step_4.md b/ca-ES/step_4.md index 1460a58b..785b11b0 100644 --- a/ca-ES/step_4.md +++ b/ca-ES/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/ca-ES/step_5.md b/ca-ES/step_5.md index ad5d0c1f..c361be8e 100644 --- a/ca-ES/step_5.md +++ b/ca-ES/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/ca-ES/step_6.md b/ca-ES/step_6.md index 0fe36309..6ca94946 100644 --- a/ca-ES/step_6.md +++ b/ca-ES/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/ca-ES/step_7.md b/ca-ES/step_7.md index 043d77a9..d4b22e96 100644 --- a/ca-ES/step_7.md +++ b/ca-ES/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/cs-CZ/images/8-background-annotated.png b/cs-CZ/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/cs-CZ/images/8-background-annotated.png and b/cs-CZ/images/8-background-annotated.png differ diff --git a/cs-CZ/images/8-background.png b/cs-CZ/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/cs-CZ/images/8-background.png and b/cs-CZ/images/8-background.png differ diff --git a/cs-CZ/images/8-left.png b/cs-CZ/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/cs-CZ/images/8-left.png and b/cs-CZ/images/8-left.png differ diff --git a/cs-CZ/images/8-right-annotated.png b/cs-CZ/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/cs-CZ/images/8-right-annotated.png and b/cs-CZ/images/8-right-annotated.png differ diff --git a/cs-CZ/images/8-right.png b/cs-CZ/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/cs-CZ/images/8-right.png and b/cs-CZ/images/8-right.png differ diff --git a/cs-CZ/images/add-example-annotated.png b/cs-CZ/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/cs-CZ/images/add-example-annotated.png and b/cs-CZ/images/add-example-annotated.png differ diff --git a/cs-CZ/images/alien-language.png b/cs-CZ/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/cs-CZ/images/alien-language.png differ diff --git a/cs-CZ/images/allow-microphone.png b/cs-CZ/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/cs-CZ/images/allow-microphone.png differ diff --git a/cs-CZ/images/background-noise-annotated.png b/cs-CZ/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/cs-CZ/images/background-noise-annotated.png and b/cs-CZ/images/background-noise-annotated.png differ diff --git a/cs-CZ/images/background-noise.png b/cs-CZ/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/cs-CZ/images/background-noise.png and b/cs-CZ/images/background-noise.png differ diff --git a/cs-CZ/images/click-train.png b/cs-CZ/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/cs-CZ/images/click-train.png and b/cs-CZ/images/click-train.png differ diff --git a/cs-CZ/images/control-alien-blocks.png b/cs-CZ/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/cs-CZ/images/control-alien-blocks.png differ diff --git a/cs-CZ/images/create-project.png b/cs-CZ/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/cs-CZ/images/create-project.png differ diff --git a/cs-CZ/images/create.png b/cs-CZ/images/create.png index 16d02d79..2283d747 100644 Binary files a/cs-CZ/images/create.png and b/cs-CZ/images/create.png differ diff --git a/cs-CZ/images/extensions-annotated.png b/cs-CZ/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/cs-CZ/images/extensions-annotated.png and b/cs-CZ/images/extensions-annotated.png differ diff --git a/cs-CZ/images/learn-test-annotated.png b/cs-CZ/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/cs-CZ/images/learn-test-annotated.png and b/cs-CZ/images/learn-test-annotated.png differ diff --git a/cs-CZ/images/left-empty-annotated.png b/cs-CZ/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/cs-CZ/images/left-empty-annotated.png and b/cs-CZ/images/left-empty-annotated.png differ diff --git a/cs-CZ/images/make-annotated.png b/cs-CZ/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/cs-CZ/images/make-annotated.png and b/cs-CZ/images/make-annotated.png differ diff --git a/cs-CZ/images/new-blocks.png b/cs-CZ/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/cs-CZ/images/new-blocks.png differ diff --git a/cs-CZ/images/project-train.png b/cs-CZ/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/cs-CZ/images/project-train.png differ diff --git a/cs-CZ/images/projects-list.png b/cs-CZ/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/cs-CZ/images/projects-list.png differ diff --git a/cs-CZ/images/record-button.png b/cs-CZ/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/cs-CZ/images/record-button.png differ diff --git a/cs-CZ/images/save-example-annotated.png b/cs-CZ/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/cs-CZ/images/save-example-annotated.png and b/cs-CZ/images/save-example-annotated.png differ diff --git a/cs-CZ/images/start-listening-annotated.png b/cs-CZ/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/cs-CZ/images/start-listening-annotated.png and b/cs-CZ/images/start-listening-annotated.png differ diff --git a/cs-CZ/images/test-your-model.png b/cs-CZ/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/cs-CZ/images/test-your-model.png differ diff --git a/cs-CZ/images/train-annotated.png b/cs-CZ/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/cs-CZ/images/train-annotated.png and b/cs-CZ/images/train-annotated.png differ diff --git a/cs-CZ/images/train-new-model.png b/cs-CZ/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/cs-CZ/images/train-new-model.png differ diff --git a/cs-CZ/images/whatyouwillmake.gif b/cs-CZ/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/cs-CZ/images/whatyouwillmake.gif differ diff --git a/cs-CZ/meta.yml b/cs-CZ/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/cs-CZ/meta.yml +++ b/cs-CZ/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/cs-CZ/resources/NEW Alien 1.mp4 b/cs-CZ/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/cs-CZ/resources/NEW Alien 1.mp4 differ diff --git a/cs-CZ/resources/NEW Alien 1.srt b/cs-CZ/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/cs-CZ/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/cs-CZ/resources/NEW Alien 2.mp4 b/cs-CZ/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/cs-CZ/resources/NEW Alien 2.mp4 differ diff --git a/cs-CZ/resources/NEW Alien 2.srt b/cs-CZ/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/cs-CZ/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/cs-CZ/resources/NEW Alien 3.mp4 b/cs-CZ/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/cs-CZ/resources/NEW Alien 3.mp4 differ diff --git a/cs-CZ/resources/NEW Alien 3.srt b/cs-CZ/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/cs-CZ/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/cs-CZ/resources/NEW Alien 4.mp4 b/cs-CZ/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/cs-CZ/resources/NEW Alien 4.mp4 differ diff --git a/cs-CZ/resources/NEW Alien 4.srt b/cs-CZ/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/cs-CZ/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/cs-CZ/resources/readme.txt b/cs-CZ/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/cs-CZ/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/cs-CZ/step_1.md b/cs-CZ/step_1.md index c490131c..aa0540f2 100644 --- a/cs-CZ/step_1.md +++ b/cs-CZ/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/cs-CZ/step_2.md b/cs-CZ/step_2.md index 5954228f..e6930402 100644 --- a/cs-CZ/step_2.md +++ b/cs-CZ/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/cs-CZ/step_3.md b/cs-CZ/step_3.md index 1421a334..bf9eb8ee 100644 --- a/cs-CZ/step_3.md +++ b/cs-CZ/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/cs-CZ/step_4.md b/cs-CZ/step_4.md index 1460a58b..785b11b0 100644 --- a/cs-CZ/step_4.md +++ b/cs-CZ/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/cs-CZ/step_5.md b/cs-CZ/step_5.md index ad5d0c1f..c361be8e 100644 --- a/cs-CZ/step_5.md +++ b/cs-CZ/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/cs-CZ/step_6.md b/cs-CZ/step_6.md index 0fe36309..6ca94946 100644 --- a/cs-CZ/step_6.md +++ b/cs-CZ/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/cs-CZ/step_7.md b/cs-CZ/step_7.md index 043d77a9..d4b22e96 100644 --- a/cs-CZ/step_7.md +++ b/cs-CZ/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/da-DK/images/8-background-annotated.png b/da-DK/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/da-DK/images/8-background-annotated.png and b/da-DK/images/8-background-annotated.png differ diff --git a/da-DK/images/8-background.png b/da-DK/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/da-DK/images/8-background.png and b/da-DK/images/8-background.png differ diff --git a/da-DK/images/8-left.png b/da-DK/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/da-DK/images/8-left.png and b/da-DK/images/8-left.png differ diff --git a/da-DK/images/8-right-annotated.png b/da-DK/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/da-DK/images/8-right-annotated.png and b/da-DK/images/8-right-annotated.png differ diff --git a/da-DK/images/8-right.png b/da-DK/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/da-DK/images/8-right.png and b/da-DK/images/8-right.png differ diff --git a/da-DK/images/add-example-annotated.png b/da-DK/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/da-DK/images/add-example-annotated.png and b/da-DK/images/add-example-annotated.png differ diff --git a/da-DK/images/alien-language.png b/da-DK/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/da-DK/images/alien-language.png differ diff --git a/da-DK/images/allow-microphone.png b/da-DK/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/da-DK/images/allow-microphone.png differ diff --git a/da-DK/images/background-noise-annotated.png b/da-DK/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/da-DK/images/background-noise-annotated.png and b/da-DK/images/background-noise-annotated.png differ diff --git a/da-DK/images/background-noise.png b/da-DK/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/da-DK/images/background-noise.png and b/da-DK/images/background-noise.png differ diff --git a/da-DK/images/click-train.png b/da-DK/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/da-DK/images/click-train.png and b/da-DK/images/click-train.png differ diff --git a/da-DK/images/control-alien-blocks.png b/da-DK/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/da-DK/images/control-alien-blocks.png differ diff --git a/da-DK/images/create-project.png b/da-DK/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/da-DK/images/create-project.png differ diff --git a/da-DK/images/create.png b/da-DK/images/create.png index 16d02d79..2283d747 100644 Binary files a/da-DK/images/create.png and b/da-DK/images/create.png differ diff --git a/da-DK/images/extensions-annotated.png b/da-DK/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/da-DK/images/extensions-annotated.png and b/da-DK/images/extensions-annotated.png differ diff --git a/da-DK/images/learn-test-annotated.png b/da-DK/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/da-DK/images/learn-test-annotated.png and b/da-DK/images/learn-test-annotated.png differ diff --git a/da-DK/images/left-empty-annotated.png b/da-DK/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/da-DK/images/left-empty-annotated.png and b/da-DK/images/left-empty-annotated.png differ diff --git a/da-DK/images/make-annotated.png b/da-DK/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/da-DK/images/make-annotated.png and b/da-DK/images/make-annotated.png differ diff --git a/da-DK/images/new-blocks.png b/da-DK/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/da-DK/images/new-blocks.png differ diff --git a/da-DK/images/project-train.png b/da-DK/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/da-DK/images/project-train.png differ diff --git a/da-DK/images/projects-list.png b/da-DK/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/da-DK/images/projects-list.png differ diff --git a/da-DK/images/record-button.png b/da-DK/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/da-DK/images/record-button.png differ diff --git a/da-DK/images/save-example-annotated.png b/da-DK/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/da-DK/images/save-example-annotated.png and b/da-DK/images/save-example-annotated.png differ diff --git a/da-DK/images/start-listening-annotated.png b/da-DK/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/da-DK/images/start-listening-annotated.png and b/da-DK/images/start-listening-annotated.png differ diff --git a/da-DK/images/test-your-model.png b/da-DK/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/da-DK/images/test-your-model.png differ diff --git a/da-DK/images/train-annotated.png b/da-DK/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/da-DK/images/train-annotated.png and b/da-DK/images/train-annotated.png differ diff --git a/da-DK/images/train-new-model.png b/da-DK/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/da-DK/images/train-new-model.png differ diff --git a/da-DK/images/whatyouwillmake.gif b/da-DK/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/da-DK/images/whatyouwillmake.gif differ diff --git a/da-DK/meta.yml b/da-DK/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/da-DK/meta.yml +++ b/da-DK/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/da-DK/resources/NEW Alien 1.mp4 b/da-DK/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/da-DK/resources/NEW Alien 1.mp4 differ diff --git a/da-DK/resources/NEW Alien 1.srt b/da-DK/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/da-DK/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/da-DK/resources/NEW Alien 2.mp4 b/da-DK/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/da-DK/resources/NEW Alien 2.mp4 differ diff --git a/da-DK/resources/NEW Alien 2.srt b/da-DK/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/da-DK/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/da-DK/resources/NEW Alien 3.mp4 b/da-DK/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/da-DK/resources/NEW Alien 3.mp4 differ diff --git a/da-DK/resources/NEW Alien 3.srt b/da-DK/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/da-DK/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/da-DK/resources/NEW Alien 4.mp4 b/da-DK/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/da-DK/resources/NEW Alien 4.mp4 differ diff --git a/da-DK/resources/NEW Alien 4.srt b/da-DK/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/da-DK/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/da-DK/resources/readme.txt b/da-DK/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/da-DK/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/da-DK/step_1.md b/da-DK/step_1.md index c490131c..aa0540f2 100644 --- a/da-DK/step_1.md +++ b/da-DK/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/da-DK/step_2.md b/da-DK/step_2.md index 5954228f..e6930402 100644 --- a/da-DK/step_2.md +++ b/da-DK/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/da-DK/step_3.md b/da-DK/step_3.md index 1421a334..bf9eb8ee 100644 --- a/da-DK/step_3.md +++ b/da-DK/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/da-DK/step_4.md b/da-DK/step_4.md index 1460a58b..785b11b0 100644 --- a/da-DK/step_4.md +++ b/da-DK/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/da-DK/step_5.md b/da-DK/step_5.md index ad5d0c1f..c361be8e 100644 --- a/da-DK/step_5.md +++ b/da-DK/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/da-DK/step_6.md b/da-DK/step_6.md index 0fe36309..6ca94946 100644 --- a/da-DK/step_6.md +++ b/da-DK/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/da-DK/step_7.md b/da-DK/step_7.md index 043d77a9..d4b22e96 100644 --- a/da-DK/step_7.md +++ b/da-DK/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/de-DE/images/8-background-annotated.png b/de-DE/images/8-background-annotated.png index b80a56a6..8ba17960 100644 Binary files a/de-DE/images/8-background-annotated.png and b/de-DE/images/8-background-annotated.png differ diff --git a/de-DE/images/8-background.png b/de-DE/images/8-background.png index 096d3169..39ed52e2 100644 Binary files a/de-DE/images/8-background.png and b/de-DE/images/8-background.png differ diff --git a/de-DE/images/8-left.png b/de-DE/images/8-left.png index c8ccf98c..c7f1dcd2 100644 Binary files a/de-DE/images/8-left.png and b/de-DE/images/8-left.png differ diff --git a/de-DE/images/8-right-annotated.png b/de-DE/images/8-right-annotated.png index daef8333..09876f8a 100644 Binary files a/de-DE/images/8-right-annotated.png and b/de-DE/images/8-right-annotated.png differ diff --git a/de-DE/images/8-right.png b/de-DE/images/8-right.png index 10cda4e0..72e528fb 100644 Binary files a/de-DE/images/8-right.png and b/de-DE/images/8-right.png differ diff --git a/de-DE/images/S-to-T-blocks-test.png b/de-DE/images/S-to-T-blocks-test.png index 9584d082..cb78ca90 100644 Binary files a/de-DE/images/S-to-T-blocks-test.png and b/de-DE/images/S-to-T-blocks-test.png differ diff --git a/de-DE/images/S-to-T-blocks.png b/de-DE/images/S-to-T-blocks.png index 3abaa355..dba06eb8 100644 Binary files a/de-DE/images/S-to-T-blocks.png and b/de-DE/images/S-to-T-blocks.png differ diff --git a/de-DE/images/add-example-annotated.png b/de-DE/images/add-example-annotated.png index 81291957..587397b4 100644 Binary files a/de-DE/images/add-example-annotated.png and b/de-DE/images/add-example-annotated.png differ diff --git a/de-DE/images/add-example.png b/de-DE/images/add-example.png index 0fa70ce6..8a3aac1a 100644 Binary files a/de-DE/images/add-example.png and b/de-DE/images/add-example.png differ diff --git a/de-DE/images/add-new-blocks.png b/de-DE/images/add-new-blocks.png index a00e4d4c..23a05f17 100644 Binary files a/de-DE/images/add-new-blocks.png and b/de-DE/images/add-new-blocks.png differ diff --git a/de-DE/images/alien-language.png b/de-DE/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/de-DE/images/alien-language.png differ diff --git a/de-DE/images/allow-microphone.png b/de-DE/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/de-DE/images/allow-microphone.png differ diff --git a/de-DE/images/background-noise-annotated.png b/de-DE/images/background-noise-annotated.png index ad50c670..32dbe25d 100644 Binary files a/de-DE/images/background-noise-annotated.png and b/de-DE/images/background-noise-annotated.png differ diff --git a/de-DE/images/background-noise.png b/de-DE/images/background-noise.png index 3a740f3f..39ed52e2 100644 Binary files a/de-DE/images/background-noise.png and b/de-DE/images/background-noise.png differ diff --git a/de-DE/images/click-train.png b/de-DE/images/click-train.png index 78243ae3..74d8f9e8 100644 Binary files a/de-DE/images/click-train.png and b/de-DE/images/click-train.png differ diff --git a/de-DE/images/control-alien-blocks.png b/de-DE/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/de-DE/images/control-alien-blocks.png differ diff --git a/de-DE/images/create-project.png b/de-DE/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/de-DE/images/create-project.png differ diff --git a/de-DE/images/create.png b/de-DE/images/create.png index 16d02d79..143f4694 100644 Binary files a/de-DE/images/create.png and b/de-DE/images/create.png differ diff --git a/de-DE/images/extensions-annotated.png b/de-DE/images/extensions-annotated.png index 14c15c8c..288dd9a9 100644 Binary files a/de-DE/images/extensions-annotated.png and b/de-DE/images/extensions-annotated.png differ diff --git a/de-DE/images/extensions.png b/de-DE/images/extensions.png index 8882fb15..4dbad6da 100644 Binary files a/de-DE/images/extensions.png and b/de-DE/images/extensions.png differ diff --git a/de-DE/images/learn-test-annotated.png b/de-DE/images/learn-test-annotated.png index 3bf8142d..8c60e8d2 100644 Binary files a/de-DE/images/learn-test-annotated.png and b/de-DE/images/learn-test-annotated.png differ diff --git a/de-DE/images/learn-test.png b/de-DE/images/learn-test.png index f337b368..c44f1737 100644 Binary files a/de-DE/images/learn-test.png and b/de-DE/images/learn-test.png differ diff --git a/de-DE/images/left-empty-annotated.png b/de-DE/images/left-empty-annotated.png index 1c6c200b..6338b601 100644 Binary files a/de-DE/images/left-empty-annotated.png and b/de-DE/images/left-empty-annotated.png differ diff --git a/de-DE/images/left-empty.png b/de-DE/images/left-empty.png index 07a87aea..aba952c7 100644 Binary files a/de-DE/images/left-empty.png and b/de-DE/images/left-empty.png differ diff --git a/de-DE/images/make-annotated.png b/de-DE/images/make-annotated.png index 9f9e2f5a..bb8d6408 100644 Binary files a/de-DE/images/make-annotated.png and b/de-DE/images/make-annotated.png differ diff --git a/de-DE/images/make.png b/de-DE/images/make.png index f337b368..c44f1737 100644 Binary files a/de-DE/images/make.png and b/de-DE/images/make.png differ diff --git a/de-DE/images/new-blocks.png b/de-DE/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/de-DE/images/new-blocks.png differ diff --git a/de-DE/images/project-train.png b/de-DE/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/de-DE/images/project-train.png differ diff --git a/de-DE/images/projects-list.png b/de-DE/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/de-DE/images/projects-list.png differ diff --git a/de-DE/images/record-button.png b/de-DE/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/de-DE/images/record-button.png differ diff --git a/de-DE/images/save-example-annotated.png b/de-DE/images/save-example-annotated.png index 50276042..7d752eaa 100644 Binary files a/de-DE/images/save-example-annotated.png and b/de-DE/images/save-example-annotated.png differ diff --git a/de-DE/images/save-example.png b/de-DE/images/save-example.png index 0d1a1d48..ed03b90c 100644 Binary files a/de-DE/images/save-example.png and b/de-DE/images/save-example.png differ diff --git a/de-DE/images/start-listening-annotated.png b/de-DE/images/start-listening-annotated.png index 2c33da25..eeb9a145 100644 Binary files a/de-DE/images/start-listening-annotated.png and b/de-DE/images/start-listening-annotated.png differ diff --git a/de-DE/images/start-listening.png b/de-DE/images/start-listening.png index db113d03..1eebf5db 100644 Binary files a/de-DE/images/start-listening.png and b/de-DE/images/start-listening.png differ diff --git a/de-DE/images/test-new-blocks.png b/de-DE/images/test-new-blocks.png index 5c4260bc..77ae91ee 100644 Binary files a/de-DE/images/test-new-blocks.png and b/de-DE/images/test-new-blocks.png differ diff --git a/de-DE/images/test-your-model.png b/de-DE/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/de-DE/images/test-your-model.png differ diff --git a/de-DE/images/train-annotated.png b/de-DE/images/train-annotated.png index e932f6b9..2b89f5d5 100644 Binary files a/de-DE/images/train-annotated.png and b/de-DE/images/train-annotated.png differ diff --git a/de-DE/images/train-new-model.png b/de-DE/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/de-DE/images/train-new-model.png differ diff --git a/de-DE/images/train.png b/de-DE/images/train.png index ba8882af..1179a632 100644 Binary files a/de-DE/images/train.png and b/de-DE/images/train.png differ diff --git a/de-DE/images/whatyouwillmake.gif b/de-DE/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/de-DE/images/whatyouwillmake.gif differ diff --git a/de-DE/meta.yml b/de-DE/meta.yml index 5e7aa1ea..af0d3fb1 100644 --- a/de-DE/meta.yml +++ b/de-DE/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: Alien-Sprache hero_image: images/banner.png -description: Create your own alien language to move a sprite +description: Erstelle deine eigene Alien-Sprache, um eine Figur zu bewegen theme: orange listed: true copyedit: true -technologies: scratch -software: scratch +technologies: Scratch +software: Scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: Was du machen wirst - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/de-DE/resources/NEW Alien 1.mp4 b/de-DE/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/de-DE/resources/NEW Alien 1.mp4 differ diff --git a/de-DE/resources/NEW Alien 1.srt b/de-DE/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/de-DE/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/de-DE/resources/NEW Alien 2.mp4 b/de-DE/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/de-DE/resources/NEW Alien 2.mp4 differ diff --git a/de-DE/resources/NEW Alien 2.srt b/de-DE/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/de-DE/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/de-DE/resources/NEW Alien 3.mp4 b/de-DE/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/de-DE/resources/NEW Alien 3.mp4 differ diff --git a/de-DE/resources/NEW Alien 3.srt b/de-DE/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/de-DE/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/de-DE/resources/NEW Alien 4.mp4 b/de-DE/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/de-DE/resources/NEW Alien 4.mp4 differ diff --git a/de-DE/resources/NEW Alien 4.srt b/de-DE/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/de-DE/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/de-DE/resources/readme.txt b/de-DE/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/de-DE/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/de-DE/step_1.md b/de-DE/step_1.md index c490131c..9d245f88 100644 --- a/de-DE/step_1.md +++ b/de-DE/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## Was du machen wirst -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +Wir möchten Dale von machinelearningforkids.co.uk für seine Arbeit an diesem Projekt danken. + +--- /collapse--- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/de-DE/step_2.md b/de-DE/step_2.md index 5954228f..e6930402 100644 --- a/de-DE/step_2.md +++ b/de-DE/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/de-DE/step_3.md b/de-DE/step_3.md index 1421a334..bf9eb8ee 100644 --- a/de-DE/step_3.md +++ b/de-DE/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/de-DE/step_4.md b/de-DE/step_4.md index 1460a58b..785b11b0 100644 --- a/de-DE/step_4.md +++ b/de-DE/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/de-DE/step_5.md b/de-DE/step_5.md index ad5d0c1f..c361be8e 100644 --- a/de-DE/step_5.md +++ b/de-DE/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/de-DE/step_6.md b/de-DE/step_6.md index 0fe36309..6ca94946 100644 --- a/de-DE/step_6.md +++ b/de-DE/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/de-DE/step_7.md b/de-DE/step_7.md index 043d77a9..d4b22e96 100644 --- a/de-DE/step_7.md +++ b/de-DE/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/de-DE/step_8.md b/de-DE/step_8.md index 0b7653d3..4d4b61a3 100644 --- a/de-DE/step_8.md +++ b/de-DE/step_8.md @@ -1,7 +1,7 @@ -## What next? +## Wie geht es weiter? -If you haven't already, try our other machine learning with Scratch projects. +Wenn du es noch nicht getan hast, probiere unsere anderen Scratch-Projekte für maschinelles Lernen aus. -[Smart Classroom](https://projects.raspberrypi.org/en/projects/smart-classroom) +[Intelligentes Klassenzimmer](https://projects.raspberrypi.org/en/projects/smart-classroom) -[Journey to school](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file +[Fahrt zur Schule](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file diff --git a/el-GR/images/8-background-annotated.png b/el-GR/images/8-background-annotated.png index b80a56a6..b4a92986 100644 Binary files a/el-GR/images/8-background-annotated.png and b/el-GR/images/8-background-annotated.png differ diff --git a/el-GR/images/8-background.png b/el-GR/images/8-background.png index 096d3169..7e21f607 100644 Binary files a/el-GR/images/8-background.png and b/el-GR/images/8-background.png differ diff --git a/el-GR/images/8-left.png b/el-GR/images/8-left.png index c8ccf98c..03e2aad2 100644 Binary files a/el-GR/images/8-left.png and b/el-GR/images/8-left.png differ diff --git a/el-GR/images/8-right-annotated.png b/el-GR/images/8-right-annotated.png index daef8333..238e5cad 100644 Binary files a/el-GR/images/8-right-annotated.png and b/el-GR/images/8-right-annotated.png differ diff --git a/el-GR/images/8-right.png b/el-GR/images/8-right.png index 10cda4e0..479ecf87 100644 Binary files a/el-GR/images/8-right.png and b/el-GR/images/8-right.png differ diff --git a/el-GR/images/S-to-T-blocks-test.png b/el-GR/images/S-to-T-blocks-test.png index 9584d082..974f1797 100644 Binary files a/el-GR/images/S-to-T-blocks-test.png and b/el-GR/images/S-to-T-blocks-test.png differ diff --git a/el-GR/images/S-to-T-blocks.png b/el-GR/images/S-to-T-blocks.png index 3abaa355..f532ca7e 100644 Binary files a/el-GR/images/S-to-T-blocks.png and b/el-GR/images/S-to-T-blocks.png differ diff --git a/el-GR/images/add-example-annotated.png b/el-GR/images/add-example-annotated.png index 81291957..bd02ce38 100644 Binary files a/el-GR/images/add-example-annotated.png and b/el-GR/images/add-example-annotated.png differ diff --git a/el-GR/images/add-example.png b/el-GR/images/add-example.png index 0fa70ce6..8145db3d 100644 Binary files a/el-GR/images/add-example.png and b/el-GR/images/add-example.png differ diff --git a/el-GR/images/add-new-blocks.png b/el-GR/images/add-new-blocks.png index a00e4d4c..04709c5c 100644 Binary files a/el-GR/images/add-new-blocks.png and b/el-GR/images/add-new-blocks.png differ diff --git a/el-GR/images/alien-language.png b/el-GR/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/el-GR/images/alien-language.png differ diff --git a/el-GR/images/allow-microphone.png b/el-GR/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/el-GR/images/allow-microphone.png differ diff --git a/el-GR/images/background-noise-annotated.png b/el-GR/images/background-noise-annotated.png index ad50c670..51f7eb66 100644 Binary files a/el-GR/images/background-noise-annotated.png and b/el-GR/images/background-noise-annotated.png differ diff --git a/el-GR/images/background-noise.png b/el-GR/images/background-noise.png index 3a740f3f..b9c6db7e 100644 Binary files a/el-GR/images/background-noise.png and b/el-GR/images/background-noise.png differ diff --git a/el-GR/images/click-train.png b/el-GR/images/click-train.png index 78243ae3..5b178848 100644 Binary files a/el-GR/images/click-train.png and b/el-GR/images/click-train.png differ diff --git a/el-GR/images/control-alien-blocks.png b/el-GR/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/el-GR/images/control-alien-blocks.png differ diff --git a/el-GR/images/create-project.png b/el-GR/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/el-GR/images/create-project.png differ diff --git a/el-GR/images/create.png b/el-GR/images/create.png index 16d02d79..12e32589 100644 Binary files a/el-GR/images/create.png and b/el-GR/images/create.png differ diff --git a/el-GR/images/extensions-annotated.png b/el-GR/images/extensions-annotated.png index 14c15c8c..9edb5cc7 100644 Binary files a/el-GR/images/extensions-annotated.png and b/el-GR/images/extensions-annotated.png differ diff --git a/el-GR/images/extensions.png b/el-GR/images/extensions.png index 8882fb15..d328e5d5 100644 Binary files a/el-GR/images/extensions.png and b/el-GR/images/extensions.png differ diff --git a/el-GR/images/learn-test-annotated.png b/el-GR/images/learn-test-annotated.png index 3bf8142d..e63fe821 100644 Binary files a/el-GR/images/learn-test-annotated.png and b/el-GR/images/learn-test-annotated.png differ diff --git a/el-GR/images/learn-test.png b/el-GR/images/learn-test.png index f337b368..caa3378f 100644 Binary files a/el-GR/images/learn-test.png and b/el-GR/images/learn-test.png differ diff --git a/el-GR/images/left-empty-annotated.png b/el-GR/images/left-empty-annotated.png index 1c6c200b..6f216f8f 100644 Binary files a/el-GR/images/left-empty-annotated.png and b/el-GR/images/left-empty-annotated.png differ diff --git a/el-GR/images/left-empty.png b/el-GR/images/left-empty.png index 07a87aea..d628462f 100644 Binary files a/el-GR/images/left-empty.png and b/el-GR/images/left-empty.png differ diff --git a/el-GR/images/make-annotated.png b/el-GR/images/make-annotated.png index 9f9e2f5a..4fcefc0f 100644 Binary files a/el-GR/images/make-annotated.png and b/el-GR/images/make-annotated.png differ diff --git a/el-GR/images/make.png b/el-GR/images/make.png index f337b368..caa3378f 100644 Binary files a/el-GR/images/make.png and b/el-GR/images/make.png differ diff --git a/el-GR/images/new-blocks.png b/el-GR/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/el-GR/images/new-blocks.png differ diff --git a/el-GR/images/project-train.png b/el-GR/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/el-GR/images/project-train.png differ diff --git a/el-GR/images/projects-list.png b/el-GR/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/el-GR/images/projects-list.png differ diff --git a/el-GR/images/record-button.png b/el-GR/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/el-GR/images/record-button.png differ diff --git a/el-GR/images/save-example-annotated.png b/el-GR/images/save-example-annotated.png index 50276042..f5be3fc2 100644 Binary files a/el-GR/images/save-example-annotated.png and b/el-GR/images/save-example-annotated.png differ diff --git a/el-GR/images/save-example.png b/el-GR/images/save-example.png index 0d1a1d48..6e9e61a7 100644 Binary files a/el-GR/images/save-example.png and b/el-GR/images/save-example.png differ diff --git a/el-GR/images/start-listening-annotated.png b/el-GR/images/start-listening-annotated.png index 2c33da25..d448b8ba 100644 Binary files a/el-GR/images/start-listening-annotated.png and b/el-GR/images/start-listening-annotated.png differ diff --git a/el-GR/images/start-listening.png b/el-GR/images/start-listening.png index db113d03..10e6635b 100644 Binary files a/el-GR/images/start-listening.png and b/el-GR/images/start-listening.png differ diff --git a/el-GR/images/test-new-blocks.png b/el-GR/images/test-new-blocks.png index 5c4260bc..7130f66e 100644 Binary files a/el-GR/images/test-new-blocks.png and b/el-GR/images/test-new-blocks.png differ diff --git a/el-GR/images/test-your-model.png b/el-GR/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/el-GR/images/test-your-model.png differ diff --git a/el-GR/images/train-annotated.png b/el-GR/images/train-annotated.png index e932f6b9..cadccb36 100644 Binary files a/el-GR/images/train-annotated.png and b/el-GR/images/train-annotated.png differ diff --git a/el-GR/images/train-new-model.png b/el-GR/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/el-GR/images/train-new-model.png differ diff --git a/el-GR/images/train.png b/el-GR/images/train.png index ba8882af..91872ea3 100644 Binary files a/el-GR/images/train.png and b/el-GR/images/train.png differ diff --git a/el-GR/images/whatyouwillmake.gif b/el-GR/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/el-GR/images/whatyouwillmake.gif differ diff --git a/el-GR/meta.yml b/el-GR/meta.yml index 5e7aa1ea..94cf017d 100644 --- a/el-GR/meta.yml +++ b/el-GR/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: Γλώσσα εξωγήινου hero_image: images/banner.png -description: Create your own alien language to move a sprite +description: Δημιούργησε τη δική σου γλώσσα εξωγήινων για να κινείς ένα αντικείμενο theme: orange listed: true copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: Τι θα φτιάξεις - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/el-GR/resources/NEW Alien 1.mp4 b/el-GR/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/el-GR/resources/NEW Alien 1.mp4 differ diff --git a/el-GR/resources/NEW Alien 1.srt b/el-GR/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/el-GR/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/el-GR/resources/NEW Alien 2.mp4 b/el-GR/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/el-GR/resources/NEW Alien 2.mp4 differ diff --git a/el-GR/resources/NEW Alien 2.srt b/el-GR/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/el-GR/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/el-GR/resources/NEW Alien 3.mp4 b/el-GR/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/el-GR/resources/NEW Alien 3.mp4 differ diff --git a/el-GR/resources/NEW Alien 3.srt b/el-GR/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/el-GR/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/el-GR/resources/NEW Alien 4.mp4 b/el-GR/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/el-GR/resources/NEW Alien 4.mp4 differ diff --git a/el-GR/resources/NEW Alien 4.srt b/el-GR/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/el-GR/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/el-GR/resources/readme.txt b/el-GR/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/el-GR/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/el-GR/step_1.md b/el-GR/step_1.md index c490131c..62fad384 100644 --- a/el-GR/step_1.md +++ b/el-GR/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## Τι θα φτιάξεις -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +Θα θέλαμε να ευχαριστήσουμε τον Dale από το machinelearningforkids.co.uk για όλη τη δουλειά του σε αυτό το έργο. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/el-GR/step_2.md b/el-GR/step_2.md index 5954228f..e6930402 100644 --- a/el-GR/step_2.md +++ b/el-GR/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/el-GR/step_3.md b/el-GR/step_3.md index 1421a334..bf9eb8ee 100644 --- a/el-GR/step_3.md +++ b/el-GR/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/el-GR/step_4.md b/el-GR/step_4.md index 1460a58b..81641be4 100644 --- a/el-GR/step_4.md +++ b/el-GR/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task -- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/el-GR/step_5.md b/el-GR/step_5.md index ad5d0c1f..c361be8e 100644 --- a/el-GR/step_5.md +++ b/el-GR/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/el-GR/step_6.md b/el-GR/step_6.md index 0fe36309..6ca94946 100644 --- a/el-GR/step_6.md +++ b/el-GR/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/el-GR/step_7.md b/el-GR/step_7.md index 043d77a9..d4b22e96 100644 --- a/el-GR/step_7.md +++ b/el-GR/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/el-GR/step_8.md b/el-GR/step_8.md index 0b7653d3..7a02faf7 100644 --- a/el-GR/step_8.md +++ b/el-GR/step_8.md @@ -1,7 +1,7 @@ -## What next? +## Και τώρα; -If you haven't already, try our other machine learning with Scratch projects. +Εάν δεν το έχεις κάνει ήδη, δοκίμασε τις άλλες μας μηχανές μάθησης με προγράμματα Scratch. -[Smart Classroom](https://projects.raspberrypi.org/en/projects/smart-classroom) +[Έξυπνη τάξη](https://projects.raspberrypi.org/en/projects/smart-classroom) -[Journey to school](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file +[Ταξίδι στο σχολείο](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file diff --git a/en-US/images/8-background-annotated.png b/en-US/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/en-US/images/8-background-annotated.png and b/en-US/images/8-background-annotated.png differ diff --git a/en-US/images/8-background.png b/en-US/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/en-US/images/8-background.png and b/en-US/images/8-background.png differ diff --git a/en-US/images/8-left.png b/en-US/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/en-US/images/8-left.png and b/en-US/images/8-left.png differ diff --git a/en-US/images/8-right-annotated.png b/en-US/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/en-US/images/8-right-annotated.png and b/en-US/images/8-right-annotated.png differ diff --git a/en-US/images/8-right.png b/en-US/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/en-US/images/8-right.png and b/en-US/images/8-right.png differ diff --git a/en-US/images/add-example-annotated.png b/en-US/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/en-US/images/add-example-annotated.png and b/en-US/images/add-example-annotated.png differ diff --git a/en-US/images/alien-language.png b/en-US/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/en-US/images/alien-language.png differ diff --git a/en-US/images/allow-microphone.png b/en-US/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/en-US/images/allow-microphone.png differ diff --git a/en-US/images/background-noise-annotated.png b/en-US/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/en-US/images/background-noise-annotated.png and b/en-US/images/background-noise-annotated.png differ diff --git a/en-US/images/background-noise.png b/en-US/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/en-US/images/background-noise.png and b/en-US/images/background-noise.png differ diff --git a/en-US/images/click-train.png b/en-US/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/en-US/images/click-train.png and b/en-US/images/click-train.png differ diff --git a/en-US/images/control-alien-blocks.png b/en-US/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/en-US/images/control-alien-blocks.png differ diff --git a/en-US/images/create-project.png b/en-US/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/en-US/images/create-project.png differ diff --git a/en-US/images/create.png b/en-US/images/create.png index 16d02d79..2283d747 100644 Binary files a/en-US/images/create.png and b/en-US/images/create.png differ diff --git a/en-US/images/extensions-annotated.png b/en-US/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/en-US/images/extensions-annotated.png and b/en-US/images/extensions-annotated.png differ diff --git a/en-US/images/learn-test-annotated.png b/en-US/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/en-US/images/learn-test-annotated.png and b/en-US/images/learn-test-annotated.png differ diff --git a/en-US/images/left-empty-annotated.png b/en-US/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/en-US/images/left-empty-annotated.png and b/en-US/images/left-empty-annotated.png differ diff --git a/en-US/images/make-annotated.png b/en-US/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/en-US/images/make-annotated.png and b/en-US/images/make-annotated.png differ diff --git a/en-US/images/new-blocks.png b/en-US/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/en-US/images/new-blocks.png differ diff --git a/en-US/images/project-train.png b/en-US/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/en-US/images/project-train.png differ diff --git a/en-US/images/projects-list.png b/en-US/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/en-US/images/projects-list.png differ diff --git a/en-US/images/record-button.png b/en-US/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/en-US/images/record-button.png differ diff --git a/en-US/images/save-example-annotated.png b/en-US/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/en-US/images/save-example-annotated.png and b/en-US/images/save-example-annotated.png differ diff --git a/en-US/images/start-listening-annotated.png b/en-US/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/en-US/images/start-listening-annotated.png and b/en-US/images/start-listening-annotated.png differ diff --git a/en-US/images/test-your-model.png b/en-US/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/en-US/images/test-your-model.png differ diff --git a/en-US/images/train-annotated.png b/en-US/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/en-US/images/train-annotated.png and b/en-US/images/train-annotated.png differ diff --git a/en-US/images/train-new-model.png b/en-US/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/en-US/images/train-new-model.png differ diff --git a/en-US/images/whatyouwillmake.gif b/en-US/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/en-US/images/whatyouwillmake.gif differ diff --git a/en-US/meta.yml b/en-US/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/en-US/meta.yml +++ b/en-US/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/en-US/resources/NEW Alien 1.mp4 b/en-US/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/en-US/resources/NEW Alien 1.mp4 differ diff --git a/en-US/resources/NEW Alien 1.srt b/en-US/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/en-US/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/en-US/resources/NEW Alien 2.mp4 b/en-US/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/en-US/resources/NEW Alien 2.mp4 differ diff --git a/en-US/resources/NEW Alien 2.srt b/en-US/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/en-US/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/en-US/resources/NEW Alien 3.mp4 b/en-US/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/en-US/resources/NEW Alien 3.mp4 differ diff --git a/en-US/resources/NEW Alien 3.srt b/en-US/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/en-US/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/en-US/resources/NEW Alien 4.mp4 b/en-US/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/en-US/resources/NEW Alien 4.mp4 differ diff --git a/en-US/resources/NEW Alien 4.srt b/en-US/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/en-US/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/en-US/resources/readme.txt b/en-US/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/en-US/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/en-US/step_1.md b/en-US/step_1.md index c490131c..aa0540f2 100644 --- a/en-US/step_1.md +++ b/en-US/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/en-US/step_2.md b/en-US/step_2.md index 5954228f..e6930402 100644 --- a/en-US/step_2.md +++ b/en-US/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/en-US/step_3.md b/en-US/step_3.md index 1421a334..bf9eb8ee 100644 --- a/en-US/step_3.md +++ b/en-US/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/en-US/step_4.md b/en-US/step_4.md index 1460a58b..785b11b0 100644 --- a/en-US/step_4.md +++ b/en-US/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/en-US/step_5.md b/en-US/step_5.md index ad5d0c1f..c361be8e 100644 --- a/en-US/step_5.md +++ b/en-US/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/en-US/step_6.md b/en-US/step_6.md index 0fe36309..6ca94946 100644 --- a/en-US/step_6.md +++ b/en-US/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/en-US/step_7.md b/en-US/step_7.md index 043d77a9..d4b22e96 100644 --- a/en-US/step_7.md +++ b/en-US/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/es-ES/images/8-background-annotated.png b/es-ES/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/es-ES/images/8-background-annotated.png and b/es-ES/images/8-background-annotated.png differ diff --git a/es-ES/images/8-background.png b/es-ES/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/es-ES/images/8-background.png and b/es-ES/images/8-background.png differ diff --git a/es-ES/images/8-left.png b/es-ES/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/es-ES/images/8-left.png and b/es-ES/images/8-left.png differ diff --git a/es-ES/images/8-right-annotated.png b/es-ES/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/es-ES/images/8-right-annotated.png and b/es-ES/images/8-right-annotated.png differ diff --git a/es-ES/images/8-right.png b/es-ES/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/es-ES/images/8-right.png and b/es-ES/images/8-right.png differ diff --git a/es-ES/images/add-example-annotated.png b/es-ES/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/es-ES/images/add-example-annotated.png and b/es-ES/images/add-example-annotated.png differ diff --git a/es-ES/images/alien-language.png b/es-ES/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/es-ES/images/alien-language.png differ diff --git a/es-ES/images/allow-microphone.png b/es-ES/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/es-ES/images/allow-microphone.png differ diff --git a/es-ES/images/background-noise-annotated.png b/es-ES/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/es-ES/images/background-noise-annotated.png and b/es-ES/images/background-noise-annotated.png differ diff --git a/es-ES/images/background-noise.png b/es-ES/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/es-ES/images/background-noise.png and b/es-ES/images/background-noise.png differ diff --git a/es-ES/images/click-train.png b/es-ES/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/es-ES/images/click-train.png and b/es-ES/images/click-train.png differ diff --git a/es-ES/images/control-alien-blocks.png b/es-ES/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/es-ES/images/control-alien-blocks.png differ diff --git a/es-ES/images/create-project.png b/es-ES/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/es-ES/images/create-project.png differ diff --git a/es-ES/images/create.png b/es-ES/images/create.png index 16d02d79..2283d747 100644 Binary files a/es-ES/images/create.png and b/es-ES/images/create.png differ diff --git a/es-ES/images/extensions-annotated.png b/es-ES/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/es-ES/images/extensions-annotated.png and b/es-ES/images/extensions-annotated.png differ diff --git a/es-ES/images/learn-test-annotated.png b/es-ES/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/es-ES/images/learn-test-annotated.png and b/es-ES/images/learn-test-annotated.png differ diff --git a/es-ES/images/left-empty-annotated.png b/es-ES/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/es-ES/images/left-empty-annotated.png and b/es-ES/images/left-empty-annotated.png differ diff --git a/es-ES/images/make-annotated.png b/es-ES/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/es-ES/images/make-annotated.png and b/es-ES/images/make-annotated.png differ diff --git a/es-ES/images/new-blocks.png b/es-ES/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/es-ES/images/new-blocks.png differ diff --git a/es-ES/images/project-train.png b/es-ES/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/es-ES/images/project-train.png differ diff --git a/es-ES/images/projects-list.png b/es-ES/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/es-ES/images/projects-list.png differ diff --git a/es-ES/images/record-button.png b/es-ES/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/es-ES/images/record-button.png differ diff --git a/es-ES/images/save-example-annotated.png b/es-ES/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/es-ES/images/save-example-annotated.png and b/es-ES/images/save-example-annotated.png differ diff --git a/es-ES/images/start-listening-annotated.png b/es-ES/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/es-ES/images/start-listening-annotated.png and b/es-ES/images/start-listening-annotated.png differ diff --git a/es-ES/images/test-your-model.png b/es-ES/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/es-ES/images/test-your-model.png differ diff --git a/es-ES/images/train-annotated.png b/es-ES/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/es-ES/images/train-annotated.png and b/es-ES/images/train-annotated.png differ diff --git a/es-ES/images/train-new-model.png b/es-ES/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/es-ES/images/train-new-model.png differ diff --git a/es-ES/images/whatyouwillmake.gif b/es-ES/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/es-ES/images/whatyouwillmake.gif differ diff --git a/es-ES/meta.yml b/es-ES/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/es-ES/meta.yml +++ b/es-ES/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/es-ES/resources/NEW Alien 1.mp4 b/es-ES/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/es-ES/resources/NEW Alien 1.mp4 differ diff --git a/es-ES/resources/NEW Alien 1.srt b/es-ES/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/es-ES/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/es-ES/resources/NEW Alien 2.mp4 b/es-ES/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/es-ES/resources/NEW Alien 2.mp4 differ diff --git a/es-ES/resources/NEW Alien 2.srt b/es-ES/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/es-ES/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/es-ES/resources/NEW Alien 3.mp4 b/es-ES/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/es-ES/resources/NEW Alien 3.mp4 differ diff --git a/es-ES/resources/NEW Alien 3.srt b/es-ES/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/es-ES/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/es-ES/resources/NEW Alien 4.mp4 b/es-ES/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/es-ES/resources/NEW Alien 4.mp4 differ diff --git a/es-ES/resources/NEW Alien 4.srt b/es-ES/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/es-ES/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/es-ES/resources/readme.txt b/es-ES/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/es-ES/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/es-ES/step_1.md b/es-ES/step_1.md index c490131c..aa0540f2 100644 --- a/es-ES/step_1.md +++ b/es-ES/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/es-ES/step_2.md b/es-ES/step_2.md index 5954228f..e6930402 100644 --- a/es-ES/step_2.md +++ b/es-ES/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/es-ES/step_3.md b/es-ES/step_3.md index 1421a334..bf9eb8ee 100644 --- a/es-ES/step_3.md +++ b/es-ES/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/es-ES/step_4.md b/es-ES/step_4.md index 1460a58b..785b11b0 100644 --- a/es-ES/step_4.md +++ b/es-ES/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/es-ES/step_5.md b/es-ES/step_5.md index ad5d0c1f..c361be8e 100644 --- a/es-ES/step_5.md +++ b/es-ES/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/es-ES/step_6.md b/es-ES/step_6.md index 0fe36309..6ca94946 100644 --- a/es-ES/step_6.md +++ b/es-ES/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/es-ES/step_7.md b/es-ES/step_7.md index 043d77a9..d4b22e96 100644 --- a/es-ES/step_7.md +++ b/es-ES/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/es-LA/images/8-background-annotated.png b/es-LA/images/8-background-annotated.png new file mode 100644 index 00000000..42aed481 Binary files /dev/null and b/es-LA/images/8-background-annotated.png differ diff --git a/es-LA/images/8-background.png b/es-LA/images/8-background.png new file mode 100644 index 00000000..b301da2c Binary files /dev/null and b/es-LA/images/8-background.png differ diff --git a/es-LA/images/8-left.png b/es-LA/images/8-left.png new file mode 100644 index 00000000..f465f98f Binary files /dev/null and b/es-LA/images/8-left.png differ diff --git a/es-LA/images/8-right-annotated.png b/es-LA/images/8-right-annotated.png new file mode 100644 index 00000000..995fd20e Binary files /dev/null and b/es-LA/images/8-right-annotated.png differ diff --git a/es-LA/images/8-right.png b/es-LA/images/8-right.png new file mode 100644 index 00000000..c8df6622 Binary files /dev/null and b/es-LA/images/8-right.png differ diff --git a/es-LA/images/S-to-T-blocks-test.png b/es-LA/images/S-to-T-blocks-test.png new file mode 100644 index 00000000..1664b7ad Binary files /dev/null and b/es-LA/images/S-to-T-blocks-test.png differ diff --git a/es-LA/images/S-to-T-blocks.png b/es-LA/images/S-to-T-blocks.png new file mode 100644 index 00000000..398feec8 Binary files /dev/null and b/es-LA/images/S-to-T-blocks.png differ diff --git a/es-LA/images/add-example-annotated.png b/es-LA/images/add-example-annotated.png new file mode 100644 index 00000000..01fa5507 Binary files /dev/null and b/es-LA/images/add-example-annotated.png differ diff --git a/es-LA/images/add-example.png b/es-LA/images/add-example.png new file mode 100644 index 00000000..0fa70ce6 Binary files /dev/null and b/es-LA/images/add-example.png differ diff --git a/es-LA/images/add-new-blocks.png b/es-LA/images/add-new-blocks.png new file mode 100644 index 00000000..21309e1b Binary files /dev/null and b/es-LA/images/add-new-blocks.png differ diff --git a/es-LA/images/alien-language.png b/es-LA/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/es-LA/images/alien-language.png differ diff --git a/es-LA/images/allow-microphone.png b/es-LA/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/es-LA/images/allow-microphone.png differ diff --git a/es-LA/images/background-noise-annotated.png b/es-LA/images/background-noise-annotated.png new file mode 100644 index 00000000..2c3fd184 Binary files /dev/null and b/es-LA/images/background-noise-annotated.png differ diff --git a/es-LA/images/background-noise.png b/es-LA/images/background-noise.png new file mode 100644 index 00000000..3a924b00 Binary files /dev/null and b/es-LA/images/background-noise.png differ diff --git a/es-LA/images/banner.png b/es-LA/images/banner.png new file mode 100644 index 00000000..a54fe151 Binary files /dev/null and b/es-LA/images/banner.png differ diff --git a/es-LA/images/click-train.png b/es-LA/images/click-train.png new file mode 100644 index 00000000..2b57a83b Binary files /dev/null and b/es-LA/images/click-train.png differ diff --git a/es-LA/images/control-alien-blocks.png b/es-LA/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/es-LA/images/control-alien-blocks.png differ diff --git a/es-LA/images/create-project.png b/es-LA/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/es-LA/images/create-project.png differ diff --git a/es-LA/images/create.png b/es-LA/images/create.png new file mode 100644 index 00000000..d0a1dff6 Binary files /dev/null and b/es-LA/images/create.png differ diff --git a/es-LA/images/extensions-annotated.png b/es-LA/images/extensions-annotated.png new file mode 100644 index 00000000..48dadad0 Binary files /dev/null and b/es-LA/images/extensions-annotated.png differ diff --git a/es-LA/images/extensions.png b/es-LA/images/extensions.png new file mode 100644 index 00000000..8882fb15 Binary files /dev/null and b/es-LA/images/extensions.png differ diff --git a/es-LA/images/journey.gif b/es-LA/images/journey.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/es-LA/images/journey.gif differ diff --git a/es-LA/images/learn-test-annotated.png b/es-LA/images/learn-test-annotated.png new file mode 100644 index 00000000..b92d0e6a Binary files /dev/null and b/es-LA/images/learn-test-annotated.png differ diff --git a/es-LA/images/learn-test.png b/es-LA/images/learn-test.png new file mode 100644 index 00000000..f337b368 Binary files /dev/null and b/es-LA/images/learn-test.png differ diff --git a/es-LA/images/left-empty-annotated.png b/es-LA/images/left-empty-annotated.png new file mode 100644 index 00000000..4608f50a Binary files /dev/null and b/es-LA/images/left-empty-annotated.png differ diff --git a/es-LA/images/left-empty.png b/es-LA/images/left-empty.png new file mode 100644 index 00000000..07a87aea Binary files /dev/null and b/es-LA/images/left-empty.png differ diff --git a/es-LA/images/make-annotated.png b/es-LA/images/make-annotated.png new file mode 100644 index 00000000..1efd4854 Binary files /dev/null and b/es-LA/images/make-annotated.png differ diff --git a/es-LA/images/make.png b/es-LA/images/make.png new file mode 100644 index 00000000..f337b368 Binary files /dev/null and b/es-LA/images/make.png differ diff --git a/es-LA/images/new-blocks.png b/es-LA/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/es-LA/images/new-blocks.png differ diff --git a/es-LA/images/project-train.png b/es-LA/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/es-LA/images/project-train.png differ diff --git a/es-LA/images/projects-list.png b/es-LA/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/es-LA/images/projects-list.png differ diff --git a/es-LA/images/record-button.png b/es-LA/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/es-LA/images/record-button.png differ diff --git a/es-LA/images/save-example-annotated.png b/es-LA/images/save-example-annotated.png new file mode 100644 index 00000000..1a911a50 Binary files /dev/null and b/es-LA/images/save-example-annotated.png differ diff --git a/es-LA/images/save-example.png b/es-LA/images/save-example.png new file mode 100644 index 00000000..0d1a1d48 Binary files /dev/null and b/es-LA/images/save-example.png differ diff --git a/es-LA/images/start-listening-annotated.png b/es-LA/images/start-listening-annotated.png new file mode 100644 index 00000000..d327bcf3 Binary files /dev/null and b/es-LA/images/start-listening-annotated.png differ diff --git a/es-LA/images/start-listening.png b/es-LA/images/start-listening.png new file mode 100644 index 00000000..db113d03 Binary files /dev/null and b/es-LA/images/start-listening.png differ diff --git a/es-LA/images/test-new-blocks.png b/es-LA/images/test-new-blocks.png new file mode 100644 index 00000000..5c4260bc Binary files /dev/null and b/es-LA/images/test-new-blocks.png differ diff --git a/es-LA/images/test-your-model.png b/es-LA/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/es-LA/images/test-your-model.png differ diff --git a/es-LA/images/train-annotated.png b/es-LA/images/train-annotated.png new file mode 100644 index 00000000..28048304 Binary files /dev/null and b/es-LA/images/train-annotated.png differ diff --git a/es-LA/images/train-new-model.png b/es-LA/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/es-LA/images/train-new-model.png differ diff --git a/es-LA/images/train.png b/es-LA/images/train.png new file mode 100644 index 00000000..ba8882af Binary files /dev/null and b/es-LA/images/train.png differ diff --git a/es-LA/images/whatyouwillmake.gif b/es-LA/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/es-LA/images/whatyouwillmake.gif differ diff --git a/es-LA/meta.yml b/es-LA/meta.yml new file mode 100644 index 00000000..09322c14 --- /dev/null +++ b/es-LA/meta.yml @@ -0,0 +1,31 @@ +--- +title: Lenguaje Alienígena +hero_image: images/banner.png +description: Crea tu propio lenguaje alienígena para mover un objeto +theme: naranja +listed: true +copyedit: true +technologies: scratch +software: scratch +version: 4.0.0 +last_tested: '2019-06-04' +steps: + - + title: Lo que harás + - + title: Set up the project + - + title: Invent two words + completion: + - engaged + - + title: Train the model + - + title: Control the alien + completion: + - internal + - + title: 'Challenge' + challenge: true + completion: + - external diff --git a/es-LA/resources/NEW Alien 1.mp4 b/es-LA/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/es-LA/resources/NEW Alien 1.mp4 differ diff --git a/es-LA/resources/NEW Alien 1.srt b/es-LA/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/es-LA/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/es-LA/resources/NEW Alien 2.mp4 b/es-LA/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/es-LA/resources/NEW Alien 2.mp4 differ diff --git a/es-LA/resources/NEW Alien 2.srt b/es-LA/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/es-LA/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/es-LA/resources/NEW Alien 3.mp4 b/es-LA/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/es-LA/resources/NEW Alien 3.mp4 differ diff --git a/es-LA/resources/NEW Alien 3.srt b/es-LA/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/es-LA/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/es-LA/resources/NEW Alien 4.mp4 b/es-LA/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/es-LA/resources/NEW Alien 4.mp4 differ diff --git a/es-LA/resources/NEW Alien 4.srt b/es-LA/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/es-LA/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/es-LA/resources/readme.txt b/es-LA/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/es-LA/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/es-LA/step_1.md b/es-LA/step_1.md new file mode 100644 index 00000000..d233ce0a --- /dev/null +++ b/es-LA/step_1.md @@ -0,0 +1,44 @@ +## Lo que harás + +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. + +You will need a **microphone**. + +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) + +--- collapse --- + +--- +title: Where are my voice recordings stored? +--- + +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). + +--- /collapse --- + +--- collapse --- +--- +title: No YouTube? Download the videos! +--- + +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. + + +--- /collapse --- + +--- collapse --- +--- +title: License +--- + +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. + +Nos gustaría dar las gracias a Dale de machinelearningforkids.co.uk por todo su trabajo en este proyecto. + +--- /collapse --- + + + + + diff --git a/es-LA/step_2.md b/es-LA/step_2.md new file mode 100644 index 00000000..e6930402 --- /dev/null +++ b/es-LA/step_2.md @@ -0,0 +1,42 @@ +## Set up the project + + +
+ +
+ + +--- task --- + ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. + ++ Click on **Get started**. + ++ Click on **Try it now**. + +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- + + + diff --git a/es-LA/step_3.md b/es-LA/step_3.md new file mode 100644 index 00000000..bf9eb8ee --- /dev/null +++ b/es-LA/step_3.md @@ -0,0 +1,49 @@ +## Invent two words + + +
+ +
+ + +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. + +--- task --- + ++ Click the **+ Add example** button in **background noise**. + ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) + ++ Click the **Add** button to save your recording. + +--- /task --- + +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/es-LA/step_4.md b/es-LA/step_4.md new file mode 100644 index 00000000..785b11b0 --- /dev/null +++ b/es-LA/step_4.md @@ -0,0 +1,36 @@ +## Train the model + + +
+ +
+ + +You have gathered the examples you need, now you will use these examples to train your machine learning model. + +--- task --- + ++ Click on **Back to project** in the top left-hand corner. + ++ Click on **Learn & Test**. + ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) + +--- /task --- + +Once the training has finished, you can test how well your model recognises the alien words you have invented. + +--- task --- + ++ Click the **Start listening** button, then say your alien word for "left". + +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) + ++ Test whether the model recognises your alien word for "right" as well. + +--- /task --- + +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. + + + diff --git a/es-LA/step_5.md b/es-LA/step_5.md new file mode 100644 index 00000000..c361be8e --- /dev/null +++ b/es-LA/step_5.md @@ -0,0 +1,50 @@ +## Control the alien + + +
+ +
+ + +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. + +--- task --- + ++ Click on the **< Back to project** link. + ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- + + + + + diff --git a/es-LA/step_6.md b/es-LA/step_6.md new file mode 100644 index 00000000..6ca94946 --- /dev/null +++ b/es-LA/step_6.md @@ -0,0 +1,11 @@ +## Challenge + +--- challenge --- + +--- task --- + +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. + +--- /task --- + +--- /challenge --- diff --git a/es-LA/step_7.md b/es-LA/step_7.md new file mode 100644 index 00000000..d4b22e96 --- /dev/null +++ b/es-LA/step_7.md @@ -0,0 +1,3 @@ +## What can you do now? + +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/es-LA/step_8.md b/es-LA/step_8.md new file mode 100644 index 00000000..def2620d --- /dev/null +++ b/es-LA/step_8.md @@ -0,0 +1,7 @@ +## ¿Qué sigue? + +Si aún no lo ha hecho, prueba otros de nuestros proyectos de aprendizaje automático con Scratch. + +[Salón de clases Inteligente](https://projects.raspberrypi.org/en/projects/smart-classroom) + +[Camino a la escuela](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file diff --git a/fi-FI/images/8-background-annotated.png b/fi-FI/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/fi-FI/images/8-background-annotated.png and b/fi-FI/images/8-background-annotated.png differ diff --git a/fi-FI/images/8-background.png b/fi-FI/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/fi-FI/images/8-background.png and b/fi-FI/images/8-background.png differ diff --git a/fi-FI/images/8-left.png b/fi-FI/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/fi-FI/images/8-left.png and b/fi-FI/images/8-left.png differ diff --git a/fi-FI/images/8-right-annotated.png b/fi-FI/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/fi-FI/images/8-right-annotated.png and b/fi-FI/images/8-right-annotated.png differ diff --git a/fi-FI/images/8-right.png b/fi-FI/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/fi-FI/images/8-right.png and b/fi-FI/images/8-right.png differ diff --git a/fi-FI/images/add-example-annotated.png b/fi-FI/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/fi-FI/images/add-example-annotated.png and b/fi-FI/images/add-example-annotated.png differ diff --git a/fi-FI/images/alien-language.png b/fi-FI/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/fi-FI/images/alien-language.png differ diff --git a/fi-FI/images/allow-microphone.png b/fi-FI/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/fi-FI/images/allow-microphone.png differ diff --git a/fi-FI/images/background-noise-annotated.png b/fi-FI/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/fi-FI/images/background-noise-annotated.png and b/fi-FI/images/background-noise-annotated.png differ diff --git a/fi-FI/images/background-noise.png b/fi-FI/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/fi-FI/images/background-noise.png and b/fi-FI/images/background-noise.png differ diff --git a/fi-FI/images/click-train.png b/fi-FI/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/fi-FI/images/click-train.png and b/fi-FI/images/click-train.png differ diff --git a/fi-FI/images/control-alien-blocks.png b/fi-FI/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/fi-FI/images/control-alien-blocks.png differ diff --git a/fi-FI/images/create-project.png b/fi-FI/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/fi-FI/images/create-project.png differ diff --git a/fi-FI/images/create.png b/fi-FI/images/create.png index 16d02d79..2283d747 100644 Binary files a/fi-FI/images/create.png and b/fi-FI/images/create.png differ diff --git a/fi-FI/images/extensions-annotated.png b/fi-FI/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/fi-FI/images/extensions-annotated.png and b/fi-FI/images/extensions-annotated.png differ diff --git a/fi-FI/images/learn-test-annotated.png b/fi-FI/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/fi-FI/images/learn-test-annotated.png and b/fi-FI/images/learn-test-annotated.png differ diff --git a/fi-FI/images/left-empty-annotated.png b/fi-FI/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/fi-FI/images/left-empty-annotated.png and b/fi-FI/images/left-empty-annotated.png differ diff --git a/fi-FI/images/make-annotated.png b/fi-FI/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/fi-FI/images/make-annotated.png and b/fi-FI/images/make-annotated.png differ diff --git a/fi-FI/images/new-blocks.png b/fi-FI/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/fi-FI/images/new-blocks.png differ diff --git a/fi-FI/images/project-train.png b/fi-FI/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/fi-FI/images/project-train.png differ diff --git a/fi-FI/images/projects-list.png b/fi-FI/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/fi-FI/images/projects-list.png differ diff --git a/fi-FI/images/record-button.png b/fi-FI/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/fi-FI/images/record-button.png differ diff --git a/fi-FI/images/save-example-annotated.png b/fi-FI/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/fi-FI/images/save-example-annotated.png and b/fi-FI/images/save-example-annotated.png differ diff --git a/fi-FI/images/start-listening-annotated.png b/fi-FI/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/fi-FI/images/start-listening-annotated.png and b/fi-FI/images/start-listening-annotated.png differ diff --git a/fi-FI/images/test-your-model.png b/fi-FI/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/fi-FI/images/test-your-model.png differ diff --git a/fi-FI/images/train-annotated.png b/fi-FI/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/fi-FI/images/train-annotated.png and b/fi-FI/images/train-annotated.png differ diff --git a/fi-FI/images/train-new-model.png b/fi-FI/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/fi-FI/images/train-new-model.png differ diff --git a/fi-FI/images/whatyouwillmake.gif b/fi-FI/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/fi-FI/images/whatyouwillmake.gif differ diff --git a/fi-FI/meta.yml b/fi-FI/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/fi-FI/meta.yml +++ b/fi-FI/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/fi-FI/resources/NEW Alien 1.mp4 b/fi-FI/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/fi-FI/resources/NEW Alien 1.mp4 differ diff --git a/fi-FI/resources/NEW Alien 1.srt b/fi-FI/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/fi-FI/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/fi-FI/resources/NEW Alien 2.mp4 b/fi-FI/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/fi-FI/resources/NEW Alien 2.mp4 differ diff --git a/fi-FI/resources/NEW Alien 2.srt b/fi-FI/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/fi-FI/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/fi-FI/resources/NEW Alien 3.mp4 b/fi-FI/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/fi-FI/resources/NEW Alien 3.mp4 differ diff --git a/fi-FI/resources/NEW Alien 3.srt b/fi-FI/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/fi-FI/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/fi-FI/resources/NEW Alien 4.mp4 b/fi-FI/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/fi-FI/resources/NEW Alien 4.mp4 differ diff --git a/fi-FI/resources/NEW Alien 4.srt b/fi-FI/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/fi-FI/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/fi-FI/resources/readme.txt b/fi-FI/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/fi-FI/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/fi-FI/step_1.md b/fi-FI/step_1.md index c490131c..aa0540f2 100644 --- a/fi-FI/step_1.md +++ b/fi-FI/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/fi-FI/step_2.md b/fi-FI/step_2.md index 5954228f..e6930402 100644 --- a/fi-FI/step_2.md +++ b/fi-FI/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/fi-FI/step_3.md b/fi-FI/step_3.md index 1421a334..bf9eb8ee 100644 --- a/fi-FI/step_3.md +++ b/fi-FI/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/fi-FI/step_4.md b/fi-FI/step_4.md index 1460a58b..785b11b0 100644 --- a/fi-FI/step_4.md +++ b/fi-FI/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/fi-FI/step_5.md b/fi-FI/step_5.md index ad5d0c1f..c361be8e 100644 --- a/fi-FI/step_5.md +++ b/fi-FI/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/fi-FI/step_6.md b/fi-FI/step_6.md index 0fe36309..6ca94946 100644 --- a/fi-FI/step_6.md +++ b/fi-FI/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/fi-FI/step_7.md b/fi-FI/step_7.md index 043d77a9..d4b22e96 100644 --- a/fi-FI/step_7.md +++ b/fi-FI/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/fr-FR/images/8-background-annotated.png b/fr-FR/images/8-background-annotated.png index b80a56a6..abc61ae9 100644 Binary files a/fr-FR/images/8-background-annotated.png and b/fr-FR/images/8-background-annotated.png differ diff --git a/fr-FR/images/8-background.png b/fr-FR/images/8-background.png index 096d3169..d20c2a40 100644 Binary files a/fr-FR/images/8-background.png and b/fr-FR/images/8-background.png differ diff --git a/fr-FR/images/8-left.png b/fr-FR/images/8-left.png index c8ccf98c..5689b2bf 100644 Binary files a/fr-FR/images/8-left.png and b/fr-FR/images/8-left.png differ diff --git a/fr-FR/images/8-right-annotated.png b/fr-FR/images/8-right-annotated.png index daef8333..e4dc8ed2 100644 Binary files a/fr-FR/images/8-right-annotated.png and b/fr-FR/images/8-right-annotated.png differ diff --git a/fr-FR/images/8-right.png b/fr-FR/images/8-right.png index 10cda4e0..be3317be 100644 Binary files a/fr-FR/images/8-right.png and b/fr-FR/images/8-right.png differ diff --git a/fr-FR/images/S-to-T-blocks-test.png b/fr-FR/images/S-to-T-blocks-test.png index 9584d082..2cf5786e 100644 Binary files a/fr-FR/images/S-to-T-blocks-test.png and b/fr-FR/images/S-to-T-blocks-test.png differ diff --git a/fr-FR/images/S-to-T-blocks.png b/fr-FR/images/S-to-T-blocks.png index 3abaa355..e39e4fce 100644 Binary files a/fr-FR/images/S-to-T-blocks.png and b/fr-FR/images/S-to-T-blocks.png differ diff --git a/fr-FR/images/add-example-annotated.png b/fr-FR/images/add-example-annotated.png index 81291957..fe9361b0 100644 Binary files a/fr-FR/images/add-example-annotated.png and b/fr-FR/images/add-example-annotated.png differ diff --git a/fr-FR/images/add-example.png b/fr-FR/images/add-example.png index 0fa70ce6..20b91174 100644 Binary files a/fr-FR/images/add-example.png and b/fr-FR/images/add-example.png differ diff --git a/fr-FR/images/add-new-blocks.png b/fr-FR/images/add-new-blocks.png index a00e4d4c..96f48750 100644 Binary files a/fr-FR/images/add-new-blocks.png and b/fr-FR/images/add-new-blocks.png differ diff --git a/fr-FR/images/alien-language.png b/fr-FR/images/alien-language.png new file mode 100644 index 00000000..1f6b91b7 Binary files /dev/null and b/fr-FR/images/alien-language.png differ diff --git a/fr-FR/images/allow-microphone.png b/fr-FR/images/allow-microphone.png new file mode 100644 index 00000000..77f0944f Binary files /dev/null and b/fr-FR/images/allow-microphone.png differ diff --git a/fr-FR/images/background-noise-annotated.png b/fr-FR/images/background-noise-annotated.png index ad50c670..69f5c9bb 100644 Binary files a/fr-FR/images/background-noise-annotated.png and b/fr-FR/images/background-noise-annotated.png differ diff --git a/fr-FR/images/background-noise.png b/fr-FR/images/background-noise.png index 3a740f3f..2ee000db 100644 Binary files a/fr-FR/images/background-noise.png and b/fr-FR/images/background-noise.png differ diff --git a/fr-FR/images/click-train.png b/fr-FR/images/click-train.png index 78243ae3..94526a18 100644 Binary files a/fr-FR/images/click-train.png and b/fr-FR/images/click-train.png differ diff --git a/fr-FR/images/control-alien-blocks.png b/fr-FR/images/control-alien-blocks.png new file mode 100644 index 00000000..bdf8f844 Binary files /dev/null and b/fr-FR/images/control-alien-blocks.png differ diff --git a/fr-FR/images/create-project.png b/fr-FR/images/create-project.png new file mode 100644 index 00000000..bafdc3ac Binary files /dev/null and b/fr-FR/images/create-project.png differ diff --git a/fr-FR/images/create.png b/fr-FR/images/create.png index 16d02d79..087b0c7b 100644 Binary files a/fr-FR/images/create.png and b/fr-FR/images/create.png differ diff --git a/fr-FR/images/extensions-annotated.png b/fr-FR/images/extensions-annotated.png index 14c15c8c..c53e3477 100644 Binary files a/fr-FR/images/extensions-annotated.png and b/fr-FR/images/extensions-annotated.png differ diff --git a/fr-FR/images/extensions.png b/fr-FR/images/extensions.png index 8882fb15..099a0238 100644 Binary files a/fr-FR/images/extensions.png and b/fr-FR/images/extensions.png differ diff --git a/fr-FR/images/learn-test-annotated.png b/fr-FR/images/learn-test-annotated.png index 3bf8142d..922e239a 100644 Binary files a/fr-FR/images/learn-test-annotated.png and b/fr-FR/images/learn-test-annotated.png differ diff --git a/fr-FR/images/learn-test.png b/fr-FR/images/learn-test.png index f337b368..1d89794f 100644 Binary files a/fr-FR/images/learn-test.png and b/fr-FR/images/learn-test.png differ diff --git a/fr-FR/images/left-empty-annotated.png b/fr-FR/images/left-empty-annotated.png index 1c6c200b..4176156c 100644 Binary files a/fr-FR/images/left-empty-annotated.png and b/fr-FR/images/left-empty-annotated.png differ diff --git a/fr-FR/images/left-empty.png b/fr-FR/images/left-empty.png index 07a87aea..74de8165 100644 Binary files a/fr-FR/images/left-empty.png and b/fr-FR/images/left-empty.png differ diff --git a/fr-FR/images/make-annotated.png b/fr-FR/images/make-annotated.png index 9f9e2f5a..133ca31f 100644 Binary files a/fr-FR/images/make-annotated.png and b/fr-FR/images/make-annotated.png differ diff --git a/fr-FR/images/make.png b/fr-FR/images/make.png index f337b368..1d89794f 100644 Binary files a/fr-FR/images/make.png and b/fr-FR/images/make.png differ diff --git a/fr-FR/images/new-blocks.png b/fr-FR/images/new-blocks.png new file mode 100644 index 00000000..54653673 Binary files /dev/null and b/fr-FR/images/new-blocks.png differ diff --git a/fr-FR/images/project-train.png b/fr-FR/images/project-train.png new file mode 100644 index 00000000..3826639e Binary files /dev/null and b/fr-FR/images/project-train.png differ diff --git a/fr-FR/images/projects-list.png b/fr-FR/images/projects-list.png new file mode 100644 index 00000000..496ad169 Binary files /dev/null and b/fr-FR/images/projects-list.png differ diff --git a/fr-FR/images/record-button.png b/fr-FR/images/record-button.png new file mode 100644 index 00000000..e38cdc20 Binary files /dev/null and b/fr-FR/images/record-button.png differ diff --git a/fr-FR/images/save-example-annotated.png b/fr-FR/images/save-example-annotated.png index 50276042..fe430255 100644 Binary files a/fr-FR/images/save-example-annotated.png and b/fr-FR/images/save-example-annotated.png differ diff --git a/fr-FR/images/save-example.png b/fr-FR/images/save-example.png index 0d1a1d48..e7e05aba 100644 Binary files a/fr-FR/images/save-example.png and b/fr-FR/images/save-example.png differ diff --git a/fr-FR/images/start-listening-annotated.png b/fr-FR/images/start-listening-annotated.png index 2c33da25..8dd1473b 100644 Binary files a/fr-FR/images/start-listening-annotated.png and b/fr-FR/images/start-listening-annotated.png differ diff --git a/fr-FR/images/start-listening.png b/fr-FR/images/start-listening.png index db113d03..b1643572 100644 Binary files a/fr-FR/images/start-listening.png and b/fr-FR/images/start-listening.png differ diff --git a/fr-FR/images/test-new-blocks.png b/fr-FR/images/test-new-blocks.png index 5c4260bc..ee3655e1 100644 Binary files a/fr-FR/images/test-new-blocks.png and b/fr-FR/images/test-new-blocks.png differ diff --git a/fr-FR/images/test-your-model.png b/fr-FR/images/test-your-model.png new file mode 100644 index 00000000..c9254fb7 Binary files /dev/null and b/fr-FR/images/test-your-model.png differ diff --git a/fr-FR/images/train-annotated.png b/fr-FR/images/train-annotated.png index e932f6b9..ebf0d717 100644 Binary files a/fr-FR/images/train-annotated.png and b/fr-FR/images/train-annotated.png differ diff --git a/fr-FR/images/train-new-model.png b/fr-FR/images/train-new-model.png new file mode 100644 index 00000000..aee897ed Binary files /dev/null and b/fr-FR/images/train-new-model.png differ diff --git a/fr-FR/images/train.png b/fr-FR/images/train.png index ba8882af..a21ef575 100644 Binary files a/fr-FR/images/train.png and b/fr-FR/images/train.png differ diff --git a/fr-FR/images/whatyouwillmake.gif b/fr-FR/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/fr-FR/images/whatyouwillmake.gif differ diff --git a/fr-FR/meta.yml b/fr-FR/meta.yml index 5e7aa1ea..5c72738c 100644 --- a/fr-FR/meta.yml +++ b/fr-FR/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: Langue extraterrestre hero_image: images/banner.png -description: Create your own alien language to move a sprite +description: Créer ton propre langage extraterrestre pour déplacer un sprite theme: orange listed: true copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: Ce que tu vas faire - - title: Use a pretrained model + title: Configurer le projet - - title: Create a new project + title: Inventer deux mots + completion: + - engaged - - title: Create alien words + title: Entraîner le modèle - - title: Train a new machine learning model + title: Contrôler l'extraterrestre + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Défi' challenge: true - - - title: What next? + completion: + - external diff --git a/fr-FR/resources/NEW Alien 1.mp4 b/fr-FR/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/fr-FR/resources/NEW Alien 1.mp4 differ diff --git a/fr-FR/resources/NEW Alien 1.srt b/fr-FR/resources/NEW Alien 1.srt new file mode 100644 index 00000000..cfece9bb --- /dev/null +++ b/fr-FR/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Va sur rpf.io/ml4k et clique sur « Démarrez ». + +2 +00:00:11,520 --> 00:00:15,560 +Clique sur « Essayer maintenant ». + +3 +00:00:15,560 --> 00:00:20,560 +Ajoute un nouveau projet appelé « Langage extraterrestre ». + +4 +00:00:20,560 --> 00:00:28,280 +Définis le type de projet sur « reconnaissance sons », +et stockage sur « dans votre navigateur ». + +5 +00:00:28,280 --> 00:00:34,840 +Crée le projet, puis  +clique sur le titre du projet. + +6 +00:00:34,840 --> 00:00:40,000 +Clique maintenant sur « Entraîner ». + diff --git a/fr-FR/resources/NEW Alien 2.mp4 b/fr-FR/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/fr-FR/resources/NEW Alien 2.mp4 differ diff --git a/fr-FR/resources/NEW Alien 2.srt b/fr-FR/resources/NEW Alien 2.srt new file mode 100644 index 00000000..10071b24 --- /dev/null +++ b/fr-FR/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Autorise le site à accéder à  +ton microphone s'il le demande. + +2 +00:00:07,160 --> 00:00:12,440 +Enregistre un échantillon de bruit  +de fond - alors ne dis rien. + +3 +00:00:12,440 --> 00:00:17,800 +Répète maintenant cela jusqu’à ce que tu aies  +huit échantillons de bruit de fond. + +4 +00:00:17,800 --> 00:00:27,040 +Ajoute une étiquette pour gauche et enregistre ton  +mot extraterrestre inventé pour gauche, huit fois. + +5 +00:00:27,040 --> 00:00:38,120 +Ensuite, ajoute une étiquette pour droite et enregistre  +un mot inventé différent, huit fois. + diff --git a/fr-FR/resources/NEW Alien 3.mp4 b/fr-FR/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/fr-FR/resources/NEW Alien 3.mp4 differ diff --git a/fr-FR/resources/NEW Alien 3.srt b/fr-FR/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5bf54a9e --- /dev/null +++ b/fr-FR/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Clique sur « Revenir au projet », puis sur « Apprendre & Tester ». + +2 +00:00:11,320 --> 00:00:15,520 +Il est temps d'entraîner ton modèle ! + +3 +00:00:15,520 --> 00:00:19,160 +Teste le modèle en prononçant un de tes mots : + +4 +00:00:19,160 --> 00:00:27,520 +Blop ! + diff --git a/fr-FR/resources/NEW Alien 4.mp4 b/fr-FR/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/fr-FR/resources/NEW Alien 4.mp4 differ diff --git a/fr-FR/resources/NEW Alien 4.srt b/fr-FR/resources/NEW Alien 4.srt new file mode 100644 index 00000000..5a0d0c62 --- /dev/null +++ b/fr-FR/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Clique maintenant à nouveau sur « Revenir au projet » et  +cette fois, choisis « Faire ». + +2 +00:00:08,640 --> 00:00:14,160 +Utilisons le modèle dans Scratch ! + +3 +00:00:14,160 --> 00:00:21,920 +Va dans « Modèles de projets » et sélectionne  +le modèle pour « Alien language ». + +4 +00:00:21,920 --> 00:00:24,360 +Du code a été ajouté pour toi. + +5 +00:00:24,360 --> 00:00:29,960 +Fais glisser les blocs de code pour déplacer  +l'extraterrestre lorsque tu parles. + +6 +00:00:36,800 --> 00:00:40,800 +Testons. + +7 +00:00:40,800 --> 00:00:43,840 +Blop ! + +8 +00:00:43,840 --> 00:00:50,200 +Waouh ! + diff --git a/fr-FR/resources/readme.txt b/fr-FR/resources/readme.txt new file mode 100644 index 00000000..39ad83be --- /dev/null +++ b/fr-FR/resources/readme.txt @@ -0,0 +1 @@ +Pour regarder une vidéo avec des sous-titres sur VLC (videolan.org), assure-toi que le fichier vidéo et le fichier de sous-titres sont dans le même dossier et ont exactement le même nom (par exemple, video.mp4 et video.srt). Ouvre la vidéo dans VLC, les sous-titres seront chargés automatiquement. Si les sous-titres n'apparaissent pas, fais un clic droit sur l'écran vidéo, va dans **Sous-titres**, puis **Ajouter un fichier de sous-titres**, et sélectionne le bon fichier .srt. Profite du visionnage avec les sous-titres ! \ No newline at end of file diff --git a/fr-FR/step_1.md b/fr-FR/step_1.md index c490131c..391aa36a 100644 --- a/fr-FR/step_1.md +++ b/fr-FR/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## Ce que tu vas faire -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Entraîne un modèle d’apprentissage automatique pour reconnaître une langue extraterrestre et utilise-le dans Scratch pour contrôler un extraterrestre. -### What you will make +Tu auras besoin d'un **microphone**. -\--- no-print \--- +![L'extraterrestre se déplaçant de gauche à droite pour de nouveaux mots, Eeek et Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Où sont stockés mes enregistrements vocaux ? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- Ce projet utilise une technologie appelée « apprentissage automatique ». Les systèmes d'apprentissage automatique sont entraînés à l'aide d'une grande quantité de données. +- Ce projet ne nécessite pas la création d'un compte ou d'une connexion. Pour ce projet, les exemples que tu utilises pour réaliser le modèle ne sont stockés que temporairement dans ton navigateur (uniquement sur ta machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: Pas de YouTube ? Télécharge les vidéos ! --- -+ A computer with a microphone +Tu peux [télécharger l'ensemble des vidéos de ce projet](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +Ce projet fait l'objet d'une double licence, à la fois sous une licence [Creative Commons Attribution, une licence à part égale et non commerciale](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} et une licence [Apache, version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -\--- collapse \--- ---- -title: Additional information for educators ---- +Nous aimerions remercier Dale de machinelearningforkids.co.uk pour tout son travail sur ce projet. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/fr-FR/step_2.md b/fr-FR/step_2.md index 5954228f..f21eefa3 100644 --- a/fr-FR/step_2.md +++ b/fr-FR/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Configurer le projet -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Va sur [https://machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} dans un navigateur web. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Clique sur **Démarrez**. -\--- /task \--- ++ Clique sur **Essayer maintenant**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Clique sur **Projets** dans la barre de menus en haut de la page. + ++ Clique sur le bouton **+ Ajouter un nouveau projet**. + ++ Nomme ton projet `Langage extraterrestre` et configure-le pour qu'il apprenne à reconnaître les **sons** et stocke les données **dans ton navigateur web**. Clique ensuite sur **Faire**. ![Créer un projet](images/create-project.png) + ++ Tu devrais maintenant voir « Langage extraterrestre » dans la liste des projets. Clique sur le projet. ![Liste de projets avec langage extraterrestre répertoriée](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Clique sur le bouton **Entraîner**. ![Menu principal du projet avec une flèche pointant vers le bouton Entraîner](images/project-train.png) + ++ Si tu vois un message contextuel te demandant d'utiliser le microphone, clique sur **Autoriser pendant la visite du site**. + +![Popup te demandant d'autoriser le microphone, avec une flèche pointant pour autoriser pendant la visite du site](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/fr-FR/step_3.md b/fr-FR/step_3.md index 1421a334..497e977a 100644 --- a/fr-FR/step_3.md +++ b/fr-FR/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Inventer deux mots -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +Tout d'abord, tu vas collecter des échantillons de bruit de fond. Cela aidera ton modèle d’apprentissage machine à faire la différence entre les sons que tu vas l’entraîner à reconnaître et le bruit de fond où tu te trouves. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Clique sur le bouton **+ Ajouter un exemple** dans **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Clique sur le microphone, mais ne dis rien. Enregistre 2 secondes de bruit de fond. ![Flèche pointant sur le bouton du microphone](images/record-button.png) -+ Click the **Add a new project** button. ++ Clique sur le bouton **Ajouter** pour enregistrer ton enregistrement. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Répète ces étapes jusqu'à obtenir **au moins huit exemples** de bruit de fond. ![Élément rempli de 8 exemples de référence](images/8-background.png) + +--- /task --- + +Invente deux mots extraterrestres : un mot qui signifie « gauche » et un mot qui signifie « droite ». + +Tu vas maintenant enregistrer huit exemples pour chaque mot pour que ton modèle d’apprentissage automatique puisse apprendre à les reconnaître. + +--- task --- + ++ Clique sur **+ Ajouter une nouvelle étiquette** en haut à droite de l'écran et ajoute une étiquette appelée `gauche`. + +--- /task --- + +--- task --- + ++ Clique sur **+ Ajouter un exemple** à l'intérieur de la case pour la nouvelle étiquette `gauche`, et enregistre-toi en disant ton mot extraterrestre pour « gauche ». + ++ Répète jusqu'à ce que tu aies enregistré **au moins huit exemples**. + +--- /task --- + +--- task --- + ++ Clique sur **+ Ajouter une nouvelle étiquette** pour créer une autre étiquette appelée `droite` et enregistre huit exemples de ton mot extraterrestre pour « droite ». + +--- /task --- diff --git a/fr-FR/step_4.md b/fr-FR/step_4.md index 1460a58b..228f7908 100644 --- a/fr-FR/step_4.md +++ b/fr-FR/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Entraîner le modèle -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +Tu as rassemblé les exemples dont tu as besoin, tu vas maintenant utiliser ces exemples pour entraîner ton modèle d'apprentissage automatique. -\--- /task \--- +--- task --- -\--- task \--- ++ Clique sur **Revenir au projet** dans le coin supérieur gauche. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Clique sur **Apprendre & Tester**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Clique sur le bouton **Entraîner un nouveau modèle d'apprentissage machine**. Cela peut prendre quelques minutes. ![Flèche pointant vers un bouton indiquant Entraîner un nouveau modèle d'apprentissage machine](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Une fois l'entraînement terminé, tu peux tester dans quelle mesure ton modèle reconnaît les mots extraterrestres que tu as inventés. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Clique sur le bouton **Commencez à écouter**, puis dis ton mot extraterrestre pour « gauche ». -\--- task \--- +Si ton modèle d'apprentissage automatique le reconnaît, il affichera ce qu'il te prédit. ![Flèche pointant vers le bouton Commencez à écouter](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Teste si le modèle reconnaît également ton mot extraterrestre pour « droite ». -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +Si tu n'es pas satisfait·e de la façon dont le modèle fonctionne, retourne à la page **Entraîner** et ajoute d'autres exemples, puis entraîne ton modèle à nouveau. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/fr-FR/step_5.md b/fr-FR/step_5.md index ad5d0c1f..0106c8f7 100644 --- a/fr-FR/step_5.md +++ b/fr-FR/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Contrôler l'extraterrestre -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Maintenant que ton modèle peut distinguer les mots, tu peux l'utiliser dans un programme Scratch pour contrôler un extraterrestre. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Clique sur le lien **< Revenir au projet**. -\--- /task \--- ++ Clique sur **Faire**. + ++ Clique sur **Scratch 3**. + ++ Clique sur **Ouvrir dans Scratch 3**. + +--- /task --- + +--- task --- + ++ Clique sur **Modèles de projets** en haut et sélectionnez le projet « Alien language » pour charger le sprite extraterrestre, qui contient déjà du code ajouté. + +![Le projet Langage extraterrestre est sélectionné dans les modèles Scratch](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids a ajouté des blocs spéciaux à Scratch pour te permettre d'utiliser le modèle que tu viens d'entraîner. Ce modèle de projet contient également des blocs spéciaux « marcher gauche » et « marcher droite » dans « Mes blocs ». Retrouve les deux en bas de la liste des blocs. + +![Blocs Langage extraterrestre affichés dans le menu sous Mes blocs et Images](images/new-blocks.png) + +--- task --- + ++ Assurez-toi d'avoir sélectionné le sprite **Extraterrestre**, puis clique sur l'onglet **Code** et ajoute ce code. (Garde le code qui est déjà là !) ![Ajoute du code pour contrôler l'extraterrestre : quand le drapeau est cliqué, commencer à écouter. When I hear gauche, dis gauche et marcher gauche. When I hear droite, dis droite et marcher droite.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Clique sur le **drapeau vert** et dis tes mots extraterrestres pour « gauche » et « droite ». Vérifie que l'extraterrestre se déplace dans la direction souhaitée. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/fr-FR/step_6.md b/fr-FR/step_6.md index 0fe36309..ee0e5c57 100644 --- a/fr-FR/step_6.md +++ b/fr-FR/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Défi -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Déplacer vers le haut et vers le bas** : reviens à ton modèle et ajoute deux autres étiquettes pour « haut » et « bas », puis modifie ton code Scratch afin de pouvoir déplacer l'extraterrestre dans les quatre directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/fr-FR/step_7.md b/fr-FR/step_7.md index 043d77a9..3194b2ee 100644 --- a/fr-FR/step_7.md +++ b/fr-FR/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## Que peux-tu faire maintenant ? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +Il existe de nombreux autres projets d'apprentissage automatique et d'IA dans le parcours [Apprentissage automatique avec Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning). diff --git a/fr-FR/step_8.md b/fr-FR/step_8.md index 0b7653d3..7b0cff21 100644 --- a/fr-FR/step_8.md +++ b/fr-FR/step_8.md @@ -1,6 +1,6 @@ -## What next? +## Et ensuite ? -If you haven't already, try our other machine learning with Scratch projects. +Si tu ne l'as pas déjà fait, essaie notre autre apprentissage machine avec les projets Scratch. [Smart Classroom](https://projects.raspberrypi.org/en/projects/smart-classroom) diff --git a/he-IL/images/8-background-annotated.png b/he-IL/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/he-IL/images/8-background-annotated.png and b/he-IL/images/8-background-annotated.png differ diff --git a/he-IL/images/8-background.png b/he-IL/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/he-IL/images/8-background.png and b/he-IL/images/8-background.png differ diff --git a/he-IL/images/8-left.png b/he-IL/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/he-IL/images/8-left.png and b/he-IL/images/8-left.png differ diff --git a/he-IL/images/8-right-annotated.png b/he-IL/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/he-IL/images/8-right-annotated.png and b/he-IL/images/8-right-annotated.png differ diff --git a/he-IL/images/8-right.png b/he-IL/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/he-IL/images/8-right.png and b/he-IL/images/8-right.png differ diff --git a/he-IL/images/add-example-annotated.png b/he-IL/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/he-IL/images/add-example-annotated.png and b/he-IL/images/add-example-annotated.png differ diff --git a/he-IL/images/alien-language.png b/he-IL/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/he-IL/images/alien-language.png differ diff --git a/he-IL/images/allow-microphone.png b/he-IL/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/he-IL/images/allow-microphone.png differ diff --git a/he-IL/images/background-noise-annotated.png b/he-IL/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/he-IL/images/background-noise-annotated.png and b/he-IL/images/background-noise-annotated.png differ diff --git a/he-IL/images/background-noise.png b/he-IL/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/he-IL/images/background-noise.png and b/he-IL/images/background-noise.png differ diff --git a/he-IL/images/click-train.png b/he-IL/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/he-IL/images/click-train.png and b/he-IL/images/click-train.png differ diff --git a/he-IL/images/control-alien-blocks.png b/he-IL/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/he-IL/images/control-alien-blocks.png differ diff --git a/he-IL/images/create-project.png b/he-IL/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/he-IL/images/create-project.png differ diff --git a/he-IL/images/create.png b/he-IL/images/create.png index 16d02d79..2283d747 100644 Binary files a/he-IL/images/create.png and b/he-IL/images/create.png differ diff --git a/he-IL/images/extensions-annotated.png b/he-IL/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/he-IL/images/extensions-annotated.png and b/he-IL/images/extensions-annotated.png differ diff --git a/he-IL/images/learn-test-annotated.png b/he-IL/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/he-IL/images/learn-test-annotated.png and b/he-IL/images/learn-test-annotated.png differ diff --git a/he-IL/images/left-empty-annotated.png b/he-IL/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/he-IL/images/left-empty-annotated.png and b/he-IL/images/left-empty-annotated.png differ diff --git a/he-IL/images/make-annotated.png b/he-IL/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/he-IL/images/make-annotated.png and b/he-IL/images/make-annotated.png differ diff --git a/he-IL/images/new-blocks.png b/he-IL/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/he-IL/images/new-blocks.png differ diff --git a/he-IL/images/project-train.png b/he-IL/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/he-IL/images/project-train.png differ diff --git a/he-IL/images/projects-list.png b/he-IL/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/he-IL/images/projects-list.png differ diff --git a/he-IL/images/record-button.png b/he-IL/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/he-IL/images/record-button.png differ diff --git a/he-IL/images/save-example-annotated.png b/he-IL/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/he-IL/images/save-example-annotated.png and b/he-IL/images/save-example-annotated.png differ diff --git a/he-IL/images/start-listening-annotated.png b/he-IL/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/he-IL/images/start-listening-annotated.png and b/he-IL/images/start-listening-annotated.png differ diff --git a/he-IL/images/test-your-model.png b/he-IL/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/he-IL/images/test-your-model.png differ diff --git a/he-IL/images/train-annotated.png b/he-IL/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/he-IL/images/train-annotated.png and b/he-IL/images/train-annotated.png differ diff --git a/he-IL/images/train-new-model.png b/he-IL/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/he-IL/images/train-new-model.png differ diff --git a/he-IL/images/whatyouwillmake.gif b/he-IL/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/he-IL/images/whatyouwillmake.gif differ diff --git a/he-IL/meta.yml b/he-IL/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/he-IL/meta.yml +++ b/he-IL/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/he-IL/resources/NEW Alien 1.mp4 b/he-IL/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/he-IL/resources/NEW Alien 1.mp4 differ diff --git a/he-IL/resources/NEW Alien 1.srt b/he-IL/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/he-IL/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/he-IL/resources/NEW Alien 2.mp4 b/he-IL/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/he-IL/resources/NEW Alien 2.mp4 differ diff --git a/he-IL/resources/NEW Alien 2.srt b/he-IL/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/he-IL/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/he-IL/resources/NEW Alien 3.mp4 b/he-IL/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/he-IL/resources/NEW Alien 3.mp4 differ diff --git a/he-IL/resources/NEW Alien 3.srt b/he-IL/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/he-IL/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/he-IL/resources/NEW Alien 4.mp4 b/he-IL/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/he-IL/resources/NEW Alien 4.mp4 differ diff --git a/he-IL/resources/NEW Alien 4.srt b/he-IL/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/he-IL/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/he-IL/resources/readme.txt b/he-IL/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/he-IL/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/he-IL/step_1.md b/he-IL/step_1.md index c490131c..aa0540f2 100644 --- a/he-IL/step_1.md +++ b/he-IL/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/he-IL/step_2.md b/he-IL/step_2.md index 5954228f..e6930402 100644 --- a/he-IL/step_2.md +++ b/he-IL/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/he-IL/step_3.md b/he-IL/step_3.md index 1421a334..bf9eb8ee 100644 --- a/he-IL/step_3.md +++ b/he-IL/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/he-IL/step_4.md b/he-IL/step_4.md index 1460a58b..785b11b0 100644 --- a/he-IL/step_4.md +++ b/he-IL/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/he-IL/step_5.md b/he-IL/step_5.md index ad5d0c1f..c361be8e 100644 --- a/he-IL/step_5.md +++ b/he-IL/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/he-IL/step_6.md b/he-IL/step_6.md index 0fe36309..6ca94946 100644 --- a/he-IL/step_6.md +++ b/he-IL/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/he-IL/step_7.md b/he-IL/step_7.md index 043d77a9..d4b22e96 100644 --- a/he-IL/step_7.md +++ b/he-IL/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/hi-IN/images/8-background-annotated.png b/hi-IN/images/8-background-annotated.png new file mode 100644 index 00000000..b80a56a6 Binary files /dev/null and b/hi-IN/images/8-background-annotated.png differ diff --git a/hi-IN/images/8-background.png b/hi-IN/images/8-background.png new file mode 100644 index 00000000..096d3169 Binary files /dev/null and b/hi-IN/images/8-background.png differ diff --git a/hi-IN/images/8-left.png b/hi-IN/images/8-left.png new file mode 100644 index 00000000..c8ccf98c Binary files /dev/null and b/hi-IN/images/8-left.png differ diff --git a/hi-IN/images/8-right-annotated.png b/hi-IN/images/8-right-annotated.png new file mode 100644 index 00000000..daef8333 Binary files /dev/null and b/hi-IN/images/8-right-annotated.png differ diff --git a/hi-IN/images/8-right.png b/hi-IN/images/8-right.png new file mode 100644 index 00000000..10cda4e0 Binary files /dev/null and b/hi-IN/images/8-right.png differ diff --git a/hi-IN/images/S-to-T-blocks-test.png b/hi-IN/images/S-to-T-blocks-test.png new file mode 100644 index 00000000..9584d082 Binary files /dev/null and b/hi-IN/images/S-to-T-blocks-test.png differ diff --git a/hi-IN/images/S-to-T-blocks.png b/hi-IN/images/S-to-T-blocks.png new file mode 100644 index 00000000..3abaa355 Binary files /dev/null and b/hi-IN/images/S-to-T-blocks.png differ diff --git a/hi-IN/images/add-example-annotated.png b/hi-IN/images/add-example-annotated.png new file mode 100644 index 00000000..81291957 Binary files /dev/null and b/hi-IN/images/add-example-annotated.png differ diff --git a/hi-IN/images/add-example.png b/hi-IN/images/add-example.png new file mode 100644 index 00000000..0fa70ce6 Binary files /dev/null and b/hi-IN/images/add-example.png differ diff --git a/hi-IN/images/add-new-blocks.png b/hi-IN/images/add-new-blocks.png new file mode 100644 index 00000000..a00e4d4c Binary files /dev/null and b/hi-IN/images/add-new-blocks.png differ diff --git a/hi-IN/images/alien-language.png b/hi-IN/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/hi-IN/images/alien-language.png differ diff --git a/hi-IN/images/allow-microphone.png b/hi-IN/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/hi-IN/images/allow-microphone.png differ diff --git a/hi-IN/images/background-noise-annotated.png b/hi-IN/images/background-noise-annotated.png new file mode 100644 index 00000000..ad50c670 Binary files /dev/null and b/hi-IN/images/background-noise-annotated.png differ diff --git a/hi-IN/images/background-noise.png b/hi-IN/images/background-noise.png new file mode 100644 index 00000000..3a740f3f Binary files /dev/null and b/hi-IN/images/background-noise.png differ diff --git a/hi-IN/images/banner.png b/hi-IN/images/banner.png new file mode 100644 index 00000000..a54fe151 Binary files /dev/null and b/hi-IN/images/banner.png differ diff --git a/hi-IN/images/click-train.png b/hi-IN/images/click-train.png new file mode 100644 index 00000000..78243ae3 Binary files /dev/null and b/hi-IN/images/click-train.png differ diff --git a/hi-IN/images/control-alien-blocks.png b/hi-IN/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/hi-IN/images/control-alien-blocks.png differ diff --git a/hi-IN/images/create-project.png b/hi-IN/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/hi-IN/images/create-project.png differ diff --git a/hi-IN/images/create.png b/hi-IN/images/create.png new file mode 100644 index 00000000..16d02d79 Binary files /dev/null and b/hi-IN/images/create.png differ diff --git a/hi-IN/images/extensions-annotated.png b/hi-IN/images/extensions-annotated.png new file mode 100644 index 00000000..14c15c8c Binary files /dev/null and b/hi-IN/images/extensions-annotated.png differ diff --git a/hi-IN/images/extensions.png b/hi-IN/images/extensions.png new file mode 100644 index 00000000..8882fb15 Binary files /dev/null and b/hi-IN/images/extensions.png differ diff --git a/hi-IN/images/journey.gif b/hi-IN/images/journey.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/hi-IN/images/journey.gif differ diff --git a/hi-IN/images/learn-test-annotated.png b/hi-IN/images/learn-test-annotated.png new file mode 100644 index 00000000..3bf8142d Binary files /dev/null and b/hi-IN/images/learn-test-annotated.png differ diff --git a/hi-IN/images/learn-test.png b/hi-IN/images/learn-test.png new file mode 100644 index 00000000..f337b368 Binary files /dev/null and b/hi-IN/images/learn-test.png differ diff --git a/hi-IN/images/left-empty-annotated.png b/hi-IN/images/left-empty-annotated.png new file mode 100644 index 00000000..1c6c200b Binary files /dev/null and b/hi-IN/images/left-empty-annotated.png differ diff --git a/hi-IN/images/left-empty.png b/hi-IN/images/left-empty.png new file mode 100644 index 00000000..07a87aea Binary files /dev/null and b/hi-IN/images/left-empty.png differ diff --git a/hi-IN/images/make-annotated.png b/hi-IN/images/make-annotated.png new file mode 100644 index 00000000..9f9e2f5a Binary files /dev/null and b/hi-IN/images/make-annotated.png differ diff --git a/hi-IN/images/make.png b/hi-IN/images/make.png new file mode 100644 index 00000000..f337b368 Binary files /dev/null and b/hi-IN/images/make.png differ diff --git a/hi-IN/images/new-blocks.png b/hi-IN/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/hi-IN/images/new-blocks.png differ diff --git a/hi-IN/images/project-train.png b/hi-IN/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/hi-IN/images/project-train.png differ diff --git a/hi-IN/images/projects-list.png b/hi-IN/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/hi-IN/images/projects-list.png differ diff --git a/hi-IN/images/record-button.png b/hi-IN/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/hi-IN/images/record-button.png differ diff --git a/hi-IN/images/save-example-annotated.png b/hi-IN/images/save-example-annotated.png new file mode 100644 index 00000000..50276042 Binary files /dev/null and b/hi-IN/images/save-example-annotated.png differ diff --git a/hi-IN/images/save-example.png b/hi-IN/images/save-example.png new file mode 100644 index 00000000..0d1a1d48 Binary files /dev/null and b/hi-IN/images/save-example.png differ diff --git a/hi-IN/images/start-listening-annotated.png b/hi-IN/images/start-listening-annotated.png new file mode 100644 index 00000000..2c33da25 Binary files /dev/null and b/hi-IN/images/start-listening-annotated.png differ diff --git a/hi-IN/images/start-listening.png b/hi-IN/images/start-listening.png new file mode 100644 index 00000000..db113d03 Binary files /dev/null and b/hi-IN/images/start-listening.png differ diff --git a/hi-IN/images/test-new-blocks.png b/hi-IN/images/test-new-blocks.png new file mode 100644 index 00000000..5c4260bc Binary files /dev/null and b/hi-IN/images/test-new-blocks.png differ diff --git a/hi-IN/images/test-your-model.png b/hi-IN/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/hi-IN/images/test-your-model.png differ diff --git a/hi-IN/images/train-annotated.png b/hi-IN/images/train-annotated.png new file mode 100644 index 00000000..e932f6b9 Binary files /dev/null and b/hi-IN/images/train-annotated.png differ diff --git a/hi-IN/images/train-new-model.png b/hi-IN/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/hi-IN/images/train-new-model.png differ diff --git a/hi-IN/images/train.png b/hi-IN/images/train.png new file mode 100644 index 00000000..ba8882af Binary files /dev/null and b/hi-IN/images/train.png differ diff --git a/hi-IN/images/whatyouwillmake.gif b/hi-IN/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/hi-IN/images/whatyouwillmake.gif differ diff --git a/hi-IN/meta.yml b/hi-IN/meta.yml new file mode 100644 index 00000000..38612230 --- /dev/null +++ b/hi-IN/meta.yml @@ -0,0 +1,31 @@ +--- +title: एलियन भाषा +hero_image: images/banner.png +description: Sprite को हिलाने के लिए अपनी स्वयं की एलियन भाषा बनाएं +theme: नारंगी +listed: true +copyedit: true +technologies: scratch +software: scratch +version: 4.0.0 +last_tested: '2019-06-04' +steps: + - + title: आप क्या बनाएँगे + - + title: Set up the project + - + title: Invent two words + completion: + - engaged + - + title: Train the model + - + title: Control the alien + completion: + - internal + - + title: 'Challenge' + challenge: true + completion: + - external diff --git a/hi-IN/resources/NEW Alien 1.mp4 b/hi-IN/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/hi-IN/resources/NEW Alien 1.mp4 differ diff --git a/hi-IN/resources/NEW Alien 1.srt b/hi-IN/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/hi-IN/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/hi-IN/resources/NEW Alien 2.mp4 b/hi-IN/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/hi-IN/resources/NEW Alien 2.mp4 differ diff --git a/hi-IN/resources/NEW Alien 2.srt b/hi-IN/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/hi-IN/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/hi-IN/resources/NEW Alien 3.mp4 b/hi-IN/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/hi-IN/resources/NEW Alien 3.mp4 differ diff --git a/hi-IN/resources/NEW Alien 3.srt b/hi-IN/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/hi-IN/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/hi-IN/resources/NEW Alien 4.mp4 b/hi-IN/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/hi-IN/resources/NEW Alien 4.mp4 differ diff --git a/hi-IN/resources/NEW Alien 4.srt b/hi-IN/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/hi-IN/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/hi-IN/resources/readme.txt b/hi-IN/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/hi-IN/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/hi-IN/step_1.md b/hi-IN/step_1.md new file mode 100644 index 00000000..a3eb6213 --- /dev/null +++ b/hi-IN/step_1.md @@ -0,0 +1,44 @@ +## आप क्या बनाएँगे + +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. + +You will need a **microphone**. + +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) + +--- collapse --- + +--- +title: Where are my voice recordings stored? +--- + +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). + +--- /collapse --- + +--- collapse --- +--- +title: No YouTube? Download the videos! +--- + +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. + + +--- /collapse --- + +--- collapse --- +--- +title: License +--- + +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. + +हम इस परियोजना पर machinelearningforkids.co.uk से डेल को अपने सभी काम के लिए धन्यवाद देना चाहते हैं। + +--- /collapse --- + + + + + diff --git a/hi-IN/step_2.md b/hi-IN/step_2.md new file mode 100644 index 00000000..e6930402 --- /dev/null +++ b/hi-IN/step_2.md @@ -0,0 +1,42 @@ +## Set up the project + + +
+ +
+ + +--- task --- + ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. + ++ Click on **Get started**. + ++ Click on **Try it now**. + +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- + + + diff --git a/hi-IN/step_3.md b/hi-IN/step_3.md new file mode 100644 index 00000000..bf9eb8ee --- /dev/null +++ b/hi-IN/step_3.md @@ -0,0 +1,49 @@ +## Invent two words + + +
+ +
+ + +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. + +--- task --- + ++ Click the **+ Add example** button in **background noise**. + ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) + ++ Click the **Add** button to save your recording. + +--- /task --- + +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/hi-IN/step_4.md b/hi-IN/step_4.md new file mode 100644 index 00000000..785b11b0 --- /dev/null +++ b/hi-IN/step_4.md @@ -0,0 +1,36 @@ +## Train the model + + +
+ +
+ + +You have gathered the examples you need, now you will use these examples to train your machine learning model. + +--- task --- + ++ Click on **Back to project** in the top left-hand corner. + ++ Click on **Learn & Test**. + ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) + +--- /task --- + +Once the training has finished, you can test how well your model recognises the alien words you have invented. + +--- task --- + ++ Click the **Start listening** button, then say your alien word for "left". + +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) + ++ Test whether the model recognises your alien word for "right" as well. + +--- /task --- + +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. + + + diff --git a/hi-IN/step_5.md b/hi-IN/step_5.md new file mode 100644 index 00000000..c361be8e --- /dev/null +++ b/hi-IN/step_5.md @@ -0,0 +1,50 @@ +## Control the alien + + +
+ +
+ + +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. + +--- task --- + ++ Click on the **< Back to project** link. + ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- + + + + + diff --git a/hi-IN/step_6.md b/hi-IN/step_6.md new file mode 100644 index 00000000..6ca94946 --- /dev/null +++ b/hi-IN/step_6.md @@ -0,0 +1,11 @@ +## Challenge + +--- challenge --- + +--- task --- + +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. + +--- /task --- + +--- /challenge --- diff --git a/hi-IN/step_7.md b/hi-IN/step_7.md new file mode 100644 index 00000000..d4b22e96 --- /dev/null +++ b/hi-IN/step_7.md @@ -0,0 +1,3 @@ +## What can you do now? + +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/hi-IN/step_8.md b/hi-IN/step_8.md new file mode 100644 index 00000000..579296d7 --- /dev/null +++ b/hi-IN/step_8.md @@ -0,0 +1,7 @@ +## आगे क्या? + +यदि आपने पहले से ही ये नहीं किया है, तोह हमारे अन्य Scratch के साथ मशीन लर्निंग परियोजनाओं को सीखने की कोशिश कीजिए। + +[स्मार्ट क्लासरूम](https://projects.raspberrypi.org/en/projects/smart-classroom) + +[स्कूल का सफर](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file diff --git a/hu-HU/images/8-background-annotated.png b/hu-HU/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/hu-HU/images/8-background-annotated.png and b/hu-HU/images/8-background-annotated.png differ diff --git a/hu-HU/images/8-background.png b/hu-HU/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/hu-HU/images/8-background.png and b/hu-HU/images/8-background.png differ diff --git a/hu-HU/images/8-left.png b/hu-HU/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/hu-HU/images/8-left.png and b/hu-HU/images/8-left.png differ diff --git a/hu-HU/images/8-right-annotated.png b/hu-HU/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/hu-HU/images/8-right-annotated.png and b/hu-HU/images/8-right-annotated.png differ diff --git a/hu-HU/images/8-right.png b/hu-HU/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/hu-HU/images/8-right.png and b/hu-HU/images/8-right.png differ diff --git a/hu-HU/images/add-example-annotated.png b/hu-HU/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/hu-HU/images/add-example-annotated.png and b/hu-HU/images/add-example-annotated.png differ diff --git a/hu-HU/images/alien-language.png b/hu-HU/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/hu-HU/images/alien-language.png differ diff --git a/hu-HU/images/allow-microphone.png b/hu-HU/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/hu-HU/images/allow-microphone.png differ diff --git a/hu-HU/images/background-noise-annotated.png b/hu-HU/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/hu-HU/images/background-noise-annotated.png and b/hu-HU/images/background-noise-annotated.png differ diff --git a/hu-HU/images/background-noise.png b/hu-HU/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/hu-HU/images/background-noise.png and b/hu-HU/images/background-noise.png differ diff --git a/hu-HU/images/click-train.png b/hu-HU/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/hu-HU/images/click-train.png and b/hu-HU/images/click-train.png differ diff --git a/hu-HU/images/control-alien-blocks.png b/hu-HU/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/hu-HU/images/control-alien-blocks.png differ diff --git a/hu-HU/images/create-project.png b/hu-HU/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/hu-HU/images/create-project.png differ diff --git a/hu-HU/images/create.png b/hu-HU/images/create.png index 16d02d79..2283d747 100644 Binary files a/hu-HU/images/create.png and b/hu-HU/images/create.png differ diff --git a/hu-HU/images/extensions-annotated.png b/hu-HU/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/hu-HU/images/extensions-annotated.png and b/hu-HU/images/extensions-annotated.png differ diff --git a/hu-HU/images/learn-test-annotated.png b/hu-HU/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/hu-HU/images/learn-test-annotated.png and b/hu-HU/images/learn-test-annotated.png differ diff --git a/hu-HU/images/left-empty-annotated.png b/hu-HU/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/hu-HU/images/left-empty-annotated.png and b/hu-HU/images/left-empty-annotated.png differ diff --git a/hu-HU/images/make-annotated.png b/hu-HU/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/hu-HU/images/make-annotated.png and b/hu-HU/images/make-annotated.png differ diff --git a/hu-HU/images/new-blocks.png b/hu-HU/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/hu-HU/images/new-blocks.png differ diff --git a/hu-HU/images/project-train.png b/hu-HU/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/hu-HU/images/project-train.png differ diff --git a/hu-HU/images/projects-list.png b/hu-HU/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/hu-HU/images/projects-list.png differ diff --git a/hu-HU/images/record-button.png b/hu-HU/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/hu-HU/images/record-button.png differ diff --git a/hu-HU/images/save-example-annotated.png b/hu-HU/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/hu-HU/images/save-example-annotated.png and b/hu-HU/images/save-example-annotated.png differ diff --git a/hu-HU/images/start-listening-annotated.png b/hu-HU/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/hu-HU/images/start-listening-annotated.png and b/hu-HU/images/start-listening-annotated.png differ diff --git a/hu-HU/images/test-your-model.png b/hu-HU/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/hu-HU/images/test-your-model.png differ diff --git a/hu-HU/images/train-annotated.png b/hu-HU/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/hu-HU/images/train-annotated.png and b/hu-HU/images/train-annotated.png differ diff --git a/hu-HU/images/train-new-model.png b/hu-HU/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/hu-HU/images/train-new-model.png differ diff --git a/hu-HU/images/whatyouwillmake.gif b/hu-HU/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/hu-HU/images/whatyouwillmake.gif differ diff --git a/hu-HU/meta.yml b/hu-HU/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/hu-HU/meta.yml +++ b/hu-HU/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/hu-HU/resources/NEW Alien 1.mp4 b/hu-HU/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/hu-HU/resources/NEW Alien 1.mp4 differ diff --git a/hu-HU/resources/NEW Alien 1.srt b/hu-HU/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/hu-HU/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/hu-HU/resources/NEW Alien 2.mp4 b/hu-HU/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/hu-HU/resources/NEW Alien 2.mp4 differ diff --git a/hu-HU/resources/NEW Alien 2.srt b/hu-HU/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/hu-HU/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/hu-HU/resources/NEW Alien 3.mp4 b/hu-HU/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/hu-HU/resources/NEW Alien 3.mp4 differ diff --git a/hu-HU/resources/NEW Alien 3.srt b/hu-HU/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/hu-HU/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/hu-HU/resources/NEW Alien 4.mp4 b/hu-HU/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/hu-HU/resources/NEW Alien 4.mp4 differ diff --git a/hu-HU/resources/NEW Alien 4.srt b/hu-HU/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/hu-HU/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/hu-HU/resources/readme.txt b/hu-HU/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/hu-HU/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/hu-HU/step_1.md b/hu-HU/step_1.md index c490131c..aa0540f2 100644 --- a/hu-HU/step_1.md +++ b/hu-HU/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/hu-HU/step_2.md b/hu-HU/step_2.md index 5954228f..e6930402 100644 --- a/hu-HU/step_2.md +++ b/hu-HU/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/hu-HU/step_3.md b/hu-HU/step_3.md index 1421a334..bf9eb8ee 100644 --- a/hu-HU/step_3.md +++ b/hu-HU/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/hu-HU/step_4.md b/hu-HU/step_4.md index 1460a58b..785b11b0 100644 --- a/hu-HU/step_4.md +++ b/hu-HU/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/hu-HU/step_5.md b/hu-HU/step_5.md index ad5d0c1f..c361be8e 100644 --- a/hu-HU/step_5.md +++ b/hu-HU/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/hu-HU/step_6.md b/hu-HU/step_6.md index 0fe36309..6ca94946 100644 --- a/hu-HU/step_6.md +++ b/hu-HU/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/hu-HU/step_7.md b/hu-HU/step_7.md index 043d77a9..d4b22e96 100644 --- a/hu-HU/step_7.md +++ b/hu-HU/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/it-IT/images/8-background-annotated.png b/it-IT/images/8-background-annotated.png index b80a56a6..1244344b 100644 Binary files a/it-IT/images/8-background-annotated.png and b/it-IT/images/8-background-annotated.png differ diff --git a/it-IT/images/8-background.png b/it-IT/images/8-background.png index 096d3169..86c209b5 100644 Binary files a/it-IT/images/8-background.png and b/it-IT/images/8-background.png differ diff --git a/it-IT/images/8-left.png b/it-IT/images/8-left.png index c8ccf98c..757ae80d 100644 Binary files a/it-IT/images/8-left.png and b/it-IT/images/8-left.png differ diff --git a/it-IT/images/8-right-annotated.png b/it-IT/images/8-right-annotated.png index daef8333..32e0d38f 100644 Binary files a/it-IT/images/8-right-annotated.png and b/it-IT/images/8-right-annotated.png differ diff --git a/it-IT/images/8-right.png b/it-IT/images/8-right.png index 10cda4e0..2d721753 100644 Binary files a/it-IT/images/8-right.png and b/it-IT/images/8-right.png differ diff --git a/it-IT/images/S-to-T-blocks-test.png b/it-IT/images/S-to-T-blocks-test.png index 9584d082..2b63fb22 100644 Binary files a/it-IT/images/S-to-T-blocks-test.png and b/it-IT/images/S-to-T-blocks-test.png differ diff --git a/it-IT/images/S-to-T-blocks.png b/it-IT/images/S-to-T-blocks.png index 3abaa355..a5ded357 100644 Binary files a/it-IT/images/S-to-T-blocks.png and b/it-IT/images/S-to-T-blocks.png differ diff --git a/it-IT/images/add-example-annotated.png b/it-IT/images/add-example-annotated.png index 81291957..0a8b1412 100644 Binary files a/it-IT/images/add-example-annotated.png and b/it-IT/images/add-example-annotated.png differ diff --git a/it-IT/images/add-example.png b/it-IT/images/add-example.png index 0fa70ce6..595fc471 100644 Binary files a/it-IT/images/add-example.png and b/it-IT/images/add-example.png differ diff --git a/it-IT/images/add-new-blocks.png b/it-IT/images/add-new-blocks.png index a00e4d4c..e4cfefba 100644 Binary files a/it-IT/images/add-new-blocks.png and b/it-IT/images/add-new-blocks.png differ diff --git a/it-IT/images/alien-language.png b/it-IT/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/it-IT/images/alien-language.png differ diff --git a/it-IT/images/allow-microphone.png b/it-IT/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/it-IT/images/allow-microphone.png differ diff --git a/it-IT/images/background-noise-annotated.png b/it-IT/images/background-noise-annotated.png index ad50c670..f7324e5b 100644 Binary files a/it-IT/images/background-noise-annotated.png and b/it-IT/images/background-noise-annotated.png differ diff --git a/it-IT/images/background-noise.png b/it-IT/images/background-noise.png index 3a740f3f..78b200e5 100644 Binary files a/it-IT/images/background-noise.png and b/it-IT/images/background-noise.png differ diff --git a/it-IT/images/click-train.png b/it-IT/images/click-train.png index 78243ae3..38283f05 100644 Binary files a/it-IT/images/click-train.png and b/it-IT/images/click-train.png differ diff --git a/it-IT/images/control-alien-blocks.png b/it-IT/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/it-IT/images/control-alien-blocks.png differ diff --git a/it-IT/images/create-project.png b/it-IT/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/it-IT/images/create-project.png differ diff --git a/it-IT/images/create.png b/it-IT/images/create.png index 16d02d79..7c70ee00 100644 Binary files a/it-IT/images/create.png and b/it-IT/images/create.png differ diff --git a/it-IT/images/extensions-annotated.png b/it-IT/images/extensions-annotated.png index 14c15c8c..71412588 100644 Binary files a/it-IT/images/extensions-annotated.png and b/it-IT/images/extensions-annotated.png differ diff --git a/it-IT/images/extensions.png b/it-IT/images/extensions.png index 8882fb15..c927348f 100644 Binary files a/it-IT/images/extensions.png and b/it-IT/images/extensions.png differ diff --git a/it-IT/images/learn-test-annotated.png b/it-IT/images/learn-test-annotated.png index 3bf8142d..ce23355e 100644 Binary files a/it-IT/images/learn-test-annotated.png and b/it-IT/images/learn-test-annotated.png differ diff --git a/it-IT/images/learn-test.png b/it-IT/images/learn-test.png index f337b368..989d3dd9 100644 Binary files a/it-IT/images/learn-test.png and b/it-IT/images/learn-test.png differ diff --git a/it-IT/images/left-empty-annotated.png b/it-IT/images/left-empty-annotated.png index 1c6c200b..d78e916b 100644 Binary files a/it-IT/images/left-empty-annotated.png and b/it-IT/images/left-empty-annotated.png differ diff --git a/it-IT/images/left-empty.png b/it-IT/images/left-empty.png index 07a87aea..d691cdf4 100644 Binary files a/it-IT/images/left-empty.png and b/it-IT/images/left-empty.png differ diff --git a/it-IT/images/make-annotated.png b/it-IT/images/make-annotated.png index 9f9e2f5a..3a0c3f38 100644 Binary files a/it-IT/images/make-annotated.png and b/it-IT/images/make-annotated.png differ diff --git a/it-IT/images/make.png b/it-IT/images/make.png index f337b368..886cc86e 100644 Binary files a/it-IT/images/make.png and b/it-IT/images/make.png differ diff --git a/it-IT/images/new-blocks.png b/it-IT/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/it-IT/images/new-blocks.png differ diff --git a/it-IT/images/project-train.png b/it-IT/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/it-IT/images/project-train.png differ diff --git a/it-IT/images/projects-list.png b/it-IT/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/it-IT/images/projects-list.png differ diff --git a/it-IT/images/record-button.png b/it-IT/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/it-IT/images/record-button.png differ diff --git a/it-IT/images/save-example-annotated.png b/it-IT/images/save-example-annotated.png index 50276042..eb3b3352 100644 Binary files a/it-IT/images/save-example-annotated.png and b/it-IT/images/save-example-annotated.png differ diff --git a/it-IT/images/save-example.png b/it-IT/images/save-example.png index 0d1a1d48..c0082ccb 100644 Binary files a/it-IT/images/save-example.png and b/it-IT/images/save-example.png differ diff --git a/it-IT/images/start-listening-annotated.png b/it-IT/images/start-listening-annotated.png index 2c33da25..2d30615c 100644 Binary files a/it-IT/images/start-listening-annotated.png and b/it-IT/images/start-listening-annotated.png differ diff --git a/it-IT/images/start-listening.png b/it-IT/images/start-listening.png index db113d03..a670e73e 100644 Binary files a/it-IT/images/start-listening.png and b/it-IT/images/start-listening.png differ diff --git a/it-IT/images/test-new-blocks.png b/it-IT/images/test-new-blocks.png index 5c4260bc..8f53b6e4 100644 Binary files a/it-IT/images/test-new-blocks.png and b/it-IT/images/test-new-blocks.png differ diff --git a/it-IT/images/test-your-model.png b/it-IT/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/it-IT/images/test-your-model.png differ diff --git a/it-IT/images/train-annotated.png b/it-IT/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/it-IT/images/train-annotated.png and b/it-IT/images/train-annotated.png differ diff --git a/it-IT/images/train-new-model.png b/it-IT/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/it-IT/images/train-new-model.png differ diff --git a/it-IT/images/train.png b/it-IT/images/train.png index ba8882af..7a197094 100644 Binary files a/it-IT/images/train.png and b/it-IT/images/train.png differ diff --git a/it-IT/images/whatyouwillmake.gif b/it-IT/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/it-IT/images/whatyouwillmake.gif differ diff --git a/it-IT/meta.yml b/it-IT/meta.yml index 5e7aa1ea..c3c9beed 100644 --- a/it-IT/meta.yml +++ b/it-IT/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: Lingua straniera hero_image: images/banner.png -description: Create your own alien language to move a sprite +description: Crea la tua lingua aliena per spostare uno sprite theme: orange listed: true copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: Che cosa creerai - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/it-IT/resources/NEW Alien 1.mp4 b/it-IT/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/it-IT/resources/NEW Alien 1.mp4 differ diff --git a/it-IT/resources/NEW Alien 1.srt b/it-IT/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/it-IT/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/it-IT/resources/NEW Alien 2.mp4 b/it-IT/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/it-IT/resources/NEW Alien 2.mp4 differ diff --git a/it-IT/resources/NEW Alien 2.srt b/it-IT/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/it-IT/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/it-IT/resources/NEW Alien 3.mp4 b/it-IT/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/it-IT/resources/NEW Alien 3.mp4 differ diff --git a/it-IT/resources/NEW Alien 3.srt b/it-IT/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/it-IT/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/it-IT/resources/NEW Alien 4.mp4 b/it-IT/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/it-IT/resources/NEW Alien 4.mp4 differ diff --git a/it-IT/resources/NEW Alien 4.srt b/it-IT/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/it-IT/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/it-IT/resources/readme.txt b/it-IT/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/it-IT/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/it-IT/step_1.md b/it-IT/step_1.md index c490131c..93d19cdf 100644 --- a/it-IT/step_1.md +++ b/it-IT/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## Che cosa creerai -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +Vorremmo ringraziare Dale di machinelearningforkids.co.uk per tutto il suo lavoro su questo progetto. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/it-IT/step_2.md b/it-IT/step_2.md index 5954228f..e6930402 100644 --- a/it-IT/step_2.md +++ b/it-IT/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/it-IT/step_3.md b/it-IT/step_3.md index 1421a334..bf9eb8ee 100644 --- a/it-IT/step_3.md +++ b/it-IT/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/it-IT/step_4.md b/it-IT/step_4.md index 1460a58b..785b11b0 100644 --- a/it-IT/step_4.md +++ b/it-IT/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/it-IT/step_5.md b/it-IT/step_5.md index ad5d0c1f..c361be8e 100644 --- a/it-IT/step_5.md +++ b/it-IT/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/it-IT/step_6.md b/it-IT/step_6.md index 0fe36309..6ca94946 100644 --- a/it-IT/step_6.md +++ b/it-IT/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/it-IT/step_7.md b/it-IT/step_7.md index 043d77a9..d4b22e96 100644 --- a/it-IT/step_7.md +++ b/it-IT/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/it-IT/step_8.md b/it-IT/step_8.md index 0b7653d3..31483dc4 100644 --- a/it-IT/step_8.md +++ b/it-IT/step_8.md @@ -1,7 +1,7 @@ -## What next? +## E adesso? -If you haven't already, try our other machine learning with Scratch projects. +Se non l'hai già fatto, prova gli altri nostri progetti di apprendimento automatico con Scratch. -[Smart Classroom](https://projects.raspberrypi.org/en/projects/smart-classroom) +[Aula intelligente](https://projects.raspberrypi.org/en/projects/smart-classroom) -[Journey to school](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file +[Viaggio a scuola](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file diff --git a/ja-JP/images/8-background-annotated.png b/ja-JP/images/8-background-annotated.png index b80a56a6..ab47bf3d 100644 Binary files a/ja-JP/images/8-background-annotated.png and b/ja-JP/images/8-background-annotated.png differ diff --git a/ja-JP/images/8-background.png b/ja-JP/images/8-background.png index 096d3169..529effa7 100644 Binary files a/ja-JP/images/8-background.png and b/ja-JP/images/8-background.png differ diff --git a/ja-JP/images/8-left.png b/ja-JP/images/8-left.png index c8ccf98c..6869d1a8 100644 Binary files a/ja-JP/images/8-left.png and b/ja-JP/images/8-left.png differ diff --git a/ja-JP/images/8-right-annotated.png b/ja-JP/images/8-right-annotated.png index daef8333..7a4c88d7 100644 Binary files a/ja-JP/images/8-right-annotated.png and b/ja-JP/images/8-right-annotated.png differ diff --git a/ja-JP/images/8-right.png b/ja-JP/images/8-right.png index 10cda4e0..10816c45 100644 Binary files a/ja-JP/images/8-right.png and b/ja-JP/images/8-right.png differ diff --git a/ja-JP/images/S-to-T-blocks-test.png b/ja-JP/images/S-to-T-blocks-test.png index 9584d082..187ab801 100644 Binary files a/ja-JP/images/S-to-T-blocks-test.png and b/ja-JP/images/S-to-T-blocks-test.png differ diff --git a/ja-JP/images/S-to-T-blocks.png b/ja-JP/images/S-to-T-blocks.png index 3abaa355..c0a48398 100644 Binary files a/ja-JP/images/S-to-T-blocks.png and b/ja-JP/images/S-to-T-blocks.png differ diff --git a/ja-JP/images/add-example-annotated.png b/ja-JP/images/add-example-annotated.png index 81291957..3c0acea4 100644 Binary files a/ja-JP/images/add-example-annotated.png and b/ja-JP/images/add-example-annotated.png differ diff --git a/ja-JP/images/add-example.png b/ja-JP/images/add-example.png index 0fa70ce6..3b380f6d 100644 Binary files a/ja-JP/images/add-example.png and b/ja-JP/images/add-example.png differ diff --git a/ja-JP/images/add-new-blocks.png b/ja-JP/images/add-new-blocks.png index a00e4d4c..4e238e4e 100644 Binary files a/ja-JP/images/add-new-blocks.png and b/ja-JP/images/add-new-blocks.png differ diff --git a/ja-JP/images/alien-language.png b/ja-JP/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/ja-JP/images/alien-language.png differ diff --git a/ja-JP/images/allow-microphone.png b/ja-JP/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/ja-JP/images/allow-microphone.png differ diff --git a/ja-JP/images/background-noise-annotated.png b/ja-JP/images/background-noise-annotated.png index ad50c670..12a80a65 100644 Binary files a/ja-JP/images/background-noise-annotated.png and b/ja-JP/images/background-noise-annotated.png differ diff --git a/ja-JP/images/background-noise.png b/ja-JP/images/background-noise.png index 3a740f3f..771239cb 100644 Binary files a/ja-JP/images/background-noise.png and b/ja-JP/images/background-noise.png differ diff --git a/ja-JP/images/click-train.png b/ja-JP/images/click-train.png index 78243ae3..f31c66f5 100644 Binary files a/ja-JP/images/click-train.png and b/ja-JP/images/click-train.png differ diff --git a/ja-JP/images/control-alien-blocks.png b/ja-JP/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/ja-JP/images/control-alien-blocks.png differ diff --git a/ja-JP/images/create-project.png b/ja-JP/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/ja-JP/images/create-project.png differ diff --git a/ja-JP/images/create.png b/ja-JP/images/create.png index 16d02d79..fcb485ed 100644 Binary files a/ja-JP/images/create.png and b/ja-JP/images/create.png differ diff --git a/ja-JP/images/extensions-annotated.png b/ja-JP/images/extensions-annotated.png index 14c15c8c..2e8f870b 100644 Binary files a/ja-JP/images/extensions-annotated.png and b/ja-JP/images/extensions-annotated.png differ diff --git a/ja-JP/images/extensions.png b/ja-JP/images/extensions.png index 8882fb15..7a9dedee 100644 Binary files a/ja-JP/images/extensions.png and b/ja-JP/images/extensions.png differ diff --git a/ja-JP/images/learn-test-annotated.png b/ja-JP/images/learn-test-annotated.png index 3bf8142d..b21f247d 100644 Binary files a/ja-JP/images/learn-test-annotated.png and b/ja-JP/images/learn-test-annotated.png differ diff --git a/ja-JP/images/learn-test.png b/ja-JP/images/learn-test.png index f337b368..1cb2097c 100644 Binary files a/ja-JP/images/learn-test.png and b/ja-JP/images/learn-test.png differ diff --git a/ja-JP/images/left-empty-annotated.png b/ja-JP/images/left-empty-annotated.png index 1c6c200b..7aecb123 100644 Binary files a/ja-JP/images/left-empty-annotated.png and b/ja-JP/images/left-empty-annotated.png differ diff --git a/ja-JP/images/left-empty.png b/ja-JP/images/left-empty.png index 07a87aea..fae1d82f 100644 Binary files a/ja-JP/images/left-empty.png and b/ja-JP/images/left-empty.png differ diff --git a/ja-JP/images/make-annotated.png b/ja-JP/images/make-annotated.png index 9f9e2f5a..54e02439 100644 Binary files a/ja-JP/images/make-annotated.png and b/ja-JP/images/make-annotated.png differ diff --git a/ja-JP/images/make.png b/ja-JP/images/make.png index f337b368..1cb2097c 100644 Binary files a/ja-JP/images/make.png and b/ja-JP/images/make.png differ diff --git a/ja-JP/images/new-blocks.png b/ja-JP/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/ja-JP/images/new-blocks.png differ diff --git a/ja-JP/images/project-train.png b/ja-JP/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/ja-JP/images/project-train.png differ diff --git a/ja-JP/images/projects-list.png b/ja-JP/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/ja-JP/images/projects-list.png differ diff --git a/ja-JP/images/record-button.png b/ja-JP/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/ja-JP/images/record-button.png differ diff --git a/ja-JP/images/save-example-annotated.png b/ja-JP/images/save-example-annotated.png index 50276042..56b65d81 100644 Binary files a/ja-JP/images/save-example-annotated.png and b/ja-JP/images/save-example-annotated.png differ diff --git a/ja-JP/images/save-example.png b/ja-JP/images/save-example.png index 0d1a1d48..7791196a 100644 Binary files a/ja-JP/images/save-example.png and b/ja-JP/images/save-example.png differ diff --git a/ja-JP/images/start-listening-annotated.png b/ja-JP/images/start-listening-annotated.png index 2c33da25..a68fc599 100644 Binary files a/ja-JP/images/start-listening-annotated.png and b/ja-JP/images/start-listening-annotated.png differ diff --git a/ja-JP/images/start-listening.png b/ja-JP/images/start-listening.png index db113d03..76478a9b 100644 Binary files a/ja-JP/images/start-listening.png and b/ja-JP/images/start-listening.png differ diff --git a/ja-JP/images/test-new-blocks.png b/ja-JP/images/test-new-blocks.png index 5c4260bc..bb7154d3 100644 Binary files a/ja-JP/images/test-new-blocks.png and b/ja-JP/images/test-new-blocks.png differ diff --git a/ja-JP/images/test-your-model.png b/ja-JP/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/ja-JP/images/test-your-model.png differ diff --git a/ja-JP/images/train-annotated.png b/ja-JP/images/train-annotated.png index e932f6b9..9161eb12 100644 Binary files a/ja-JP/images/train-annotated.png and b/ja-JP/images/train-annotated.png differ diff --git a/ja-JP/images/train-new-model.png b/ja-JP/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/ja-JP/images/train-new-model.png differ diff --git a/ja-JP/images/train.png b/ja-JP/images/train.png index ba8882af..055be985 100644 Binary files a/ja-JP/images/train.png and b/ja-JP/images/train.png differ diff --git a/ja-JP/images/whatyouwillmake.gif b/ja-JP/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/ja-JP/images/whatyouwillmake.gif differ diff --git a/ja-JP/meta.yml b/ja-JP/meta.yml index 5e7aa1ea..abe61bf7 100644 --- a/ja-JP/meta.yml +++ b/ja-JP/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: エイリアン語 hero_image: images/banner.png -description: Create your own alien language to move a sprite +description: 自分だけのエイリアン語でスプライトを動かそう theme: orange listed: true copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: 作るもの - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/ja-JP/resources/NEW Alien 1.mp4 b/ja-JP/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/ja-JP/resources/NEW Alien 1.mp4 differ diff --git a/ja-JP/resources/NEW Alien 1.srt b/ja-JP/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/ja-JP/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/ja-JP/resources/NEW Alien 2.mp4 b/ja-JP/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/ja-JP/resources/NEW Alien 2.mp4 differ diff --git a/ja-JP/resources/NEW Alien 2.srt b/ja-JP/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/ja-JP/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/ja-JP/resources/NEW Alien 3.mp4 b/ja-JP/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/ja-JP/resources/NEW Alien 3.mp4 differ diff --git a/ja-JP/resources/NEW Alien 3.srt b/ja-JP/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/ja-JP/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/ja-JP/resources/NEW Alien 4.mp4 b/ja-JP/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/ja-JP/resources/NEW Alien 4.mp4 differ diff --git a/ja-JP/resources/NEW Alien 4.srt b/ja-JP/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/ja-JP/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/ja-JP/resources/readme.txt b/ja-JP/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/ja-JP/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/ja-JP/step_1.md b/ja-JP/step_1.md index c490131c..73a809c5 100644 --- a/ja-JP/step_1.md +++ b/ja-JP/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## 作るもの -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +このプロジェクトに関するすべてに対して machinelearningforkids.co.uk の Dale 氏に感謝します。 + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/ja-JP/step_2.md b/ja-JP/step_2.md index 5954228f..e6930402 100644 --- a/ja-JP/step_2.md +++ b/ja-JP/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/ja-JP/step_3.md b/ja-JP/step_3.md index 1421a334..bf9eb8ee 100644 --- a/ja-JP/step_3.md +++ b/ja-JP/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/ja-JP/step_4.md b/ja-JP/step_4.md index 1460a58b..785b11b0 100644 --- a/ja-JP/step_4.md +++ b/ja-JP/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/ja-JP/step_5.md b/ja-JP/step_5.md index ad5d0c1f..c361be8e 100644 --- a/ja-JP/step_5.md +++ b/ja-JP/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/ja-JP/step_6.md b/ja-JP/step_6.md index 0fe36309..6ca94946 100644 --- a/ja-JP/step_6.md +++ b/ja-JP/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/ja-JP/step_7.md b/ja-JP/step_7.md index 043d77a9..d4b22e96 100644 --- a/ja-JP/step_7.md +++ b/ja-JP/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/ja-JP/step_8.md b/ja-JP/step_8.md index 0b7653d3..ca73396d 100644 --- a/ja-JP/step_8.md +++ b/ja-JP/step_8.md @@ -1,7 +1,7 @@ -## What next? +## 次は何をしましょうか? -If you haven't already, try our other machine learning with Scratch projects. +まだしていない場合は、Scratch を使った他の機械学習プロジェクトをやってみましょう。 -[Smart Classroom](https://projects.raspberrypi.org/en/projects/smart-classroom) +[スマート教室](https://projects.raspberrypi.org/en/projects/smart-classroom) -[Journey to school](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file +[学校への道のり](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file diff --git a/ko-KR/images/8-background-annotated.png b/ko-KR/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/ko-KR/images/8-background-annotated.png and b/ko-KR/images/8-background-annotated.png differ diff --git a/ko-KR/images/8-background.png b/ko-KR/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/ko-KR/images/8-background.png and b/ko-KR/images/8-background.png differ diff --git a/ko-KR/images/8-left.png b/ko-KR/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/ko-KR/images/8-left.png and b/ko-KR/images/8-left.png differ diff --git a/ko-KR/images/8-right-annotated.png b/ko-KR/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/ko-KR/images/8-right-annotated.png and b/ko-KR/images/8-right-annotated.png differ diff --git a/ko-KR/images/8-right.png b/ko-KR/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/ko-KR/images/8-right.png and b/ko-KR/images/8-right.png differ diff --git a/ko-KR/images/add-example-annotated.png b/ko-KR/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/ko-KR/images/add-example-annotated.png and b/ko-KR/images/add-example-annotated.png differ diff --git a/ko-KR/images/alien-language.png b/ko-KR/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/ko-KR/images/alien-language.png differ diff --git a/ko-KR/images/allow-microphone.png b/ko-KR/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/ko-KR/images/allow-microphone.png differ diff --git a/ko-KR/images/background-noise-annotated.png b/ko-KR/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/ko-KR/images/background-noise-annotated.png and b/ko-KR/images/background-noise-annotated.png differ diff --git a/ko-KR/images/background-noise.png b/ko-KR/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/ko-KR/images/background-noise.png and b/ko-KR/images/background-noise.png differ diff --git a/ko-KR/images/click-train.png b/ko-KR/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/ko-KR/images/click-train.png and b/ko-KR/images/click-train.png differ diff --git a/ko-KR/images/control-alien-blocks.png b/ko-KR/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/ko-KR/images/control-alien-blocks.png differ diff --git a/ko-KR/images/create-project.png b/ko-KR/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/ko-KR/images/create-project.png differ diff --git a/ko-KR/images/create.png b/ko-KR/images/create.png index 16d02d79..2283d747 100644 Binary files a/ko-KR/images/create.png and b/ko-KR/images/create.png differ diff --git a/ko-KR/images/extensions-annotated.png b/ko-KR/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/ko-KR/images/extensions-annotated.png and b/ko-KR/images/extensions-annotated.png differ diff --git a/ko-KR/images/learn-test-annotated.png b/ko-KR/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/ko-KR/images/learn-test-annotated.png and b/ko-KR/images/learn-test-annotated.png differ diff --git a/ko-KR/images/left-empty-annotated.png b/ko-KR/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/ko-KR/images/left-empty-annotated.png and b/ko-KR/images/left-empty-annotated.png differ diff --git a/ko-KR/images/make-annotated.png b/ko-KR/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/ko-KR/images/make-annotated.png and b/ko-KR/images/make-annotated.png differ diff --git a/ko-KR/images/new-blocks.png b/ko-KR/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/ko-KR/images/new-blocks.png differ diff --git a/ko-KR/images/project-train.png b/ko-KR/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/ko-KR/images/project-train.png differ diff --git a/ko-KR/images/projects-list.png b/ko-KR/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/ko-KR/images/projects-list.png differ diff --git a/ko-KR/images/record-button.png b/ko-KR/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/ko-KR/images/record-button.png differ diff --git a/ko-KR/images/save-example-annotated.png b/ko-KR/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/ko-KR/images/save-example-annotated.png and b/ko-KR/images/save-example-annotated.png differ diff --git a/ko-KR/images/start-listening-annotated.png b/ko-KR/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/ko-KR/images/start-listening-annotated.png and b/ko-KR/images/start-listening-annotated.png differ diff --git a/ko-KR/images/test-your-model.png b/ko-KR/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/ko-KR/images/test-your-model.png differ diff --git a/ko-KR/images/train-annotated.png b/ko-KR/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/ko-KR/images/train-annotated.png and b/ko-KR/images/train-annotated.png differ diff --git a/ko-KR/images/train-new-model.png b/ko-KR/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/ko-KR/images/train-new-model.png differ diff --git a/ko-KR/images/whatyouwillmake.gif b/ko-KR/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/ko-KR/images/whatyouwillmake.gif differ diff --git a/ko-KR/meta.yml b/ko-KR/meta.yml index 5e7aa1ea..9c241cb8 100644 --- a/ko-KR/meta.yml +++ b/ko-KR/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: 외계인 언어 hero_image: images/banner.png -description: Create your own alien language to move a sprite +description: 스프라이트를 움직일 수있는 나만의 외국어 만들기 theme: orange listed: true copyedit: true -technologies: scratch +technologies: 스크래치 software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: 만들 작품 - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/ko-KR/resources/NEW Alien 1.mp4 b/ko-KR/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/ko-KR/resources/NEW Alien 1.mp4 differ diff --git a/ko-KR/resources/NEW Alien 1.srt b/ko-KR/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/ko-KR/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/ko-KR/resources/NEW Alien 2.mp4 b/ko-KR/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/ko-KR/resources/NEW Alien 2.mp4 differ diff --git a/ko-KR/resources/NEW Alien 2.srt b/ko-KR/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/ko-KR/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/ko-KR/resources/NEW Alien 3.mp4 b/ko-KR/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/ko-KR/resources/NEW Alien 3.mp4 differ diff --git a/ko-KR/resources/NEW Alien 3.srt b/ko-KR/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/ko-KR/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/ko-KR/resources/NEW Alien 4.mp4 b/ko-KR/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/ko-KR/resources/NEW Alien 4.mp4 differ diff --git a/ko-KR/resources/NEW Alien 4.srt b/ko-KR/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/ko-KR/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/ko-KR/resources/readme.txt b/ko-KR/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/ko-KR/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/ko-KR/step_1.md b/ko-KR/step_1.md index c490131c..29addabc 100644 --- a/ko-KR/step_1.md +++ b/ko-KR/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## 만들 작품 -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +이 프로젝트에 대한 그의 모든 작업에 대해 machinelearningforkids.co.uk의 Dale에게 감사의 말씀을 전합니다. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/ko-KR/step_2.md b/ko-KR/step_2.md index 5954228f..e6930402 100644 --- a/ko-KR/step_2.md +++ b/ko-KR/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/ko-KR/step_3.md b/ko-KR/step_3.md index 1421a334..bf9eb8ee 100644 --- a/ko-KR/step_3.md +++ b/ko-KR/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/ko-KR/step_4.md b/ko-KR/step_4.md index 1460a58b..785b11b0 100644 --- a/ko-KR/step_4.md +++ b/ko-KR/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/ko-KR/step_5.md b/ko-KR/step_5.md index ad5d0c1f..c361be8e 100644 --- a/ko-KR/step_5.md +++ b/ko-KR/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/ko-KR/step_6.md b/ko-KR/step_6.md index 0fe36309..6ca94946 100644 --- a/ko-KR/step_6.md +++ b/ko-KR/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/ko-KR/step_7.md b/ko-KR/step_7.md index 043d77a9..d4b22e96 100644 --- a/ko-KR/step_7.md +++ b/ko-KR/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/ko-KR/step_8.md b/ko-KR/step_8.md index 0b7653d3..08e8a5db 100644 --- a/ko-KR/step_8.md +++ b/ko-KR/step_8.md @@ -1,7 +1,7 @@ -## What next? +## 더 나아가기 -If you haven't already, try our other machine learning with Scratch projects. +아직 못했다면, 스크래치 프로젝트로 다른 머신 러닝을 시도해보십시오. -[Smart Classroom](https://projects.raspberrypi.org/en/projects/smart-classroom) +[스마트 교실](https://projects.raspberrypi.org/en/projects/smart-classroom) -[Journey to school](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file +[학교로의 여정](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file diff --git a/nl-NL/images/8-background-annotated.png b/nl-NL/images/8-background-annotated.png index b80a56a6..6bf622dd 100644 Binary files a/nl-NL/images/8-background-annotated.png and b/nl-NL/images/8-background-annotated.png differ diff --git a/nl-NL/images/8-background.png b/nl-NL/images/8-background.png index 096d3169..f95c31f2 100644 Binary files a/nl-NL/images/8-background.png and b/nl-NL/images/8-background.png differ diff --git a/nl-NL/images/8-left.png b/nl-NL/images/8-left.png index c8ccf98c..6002f8fc 100644 Binary files a/nl-NL/images/8-left.png and b/nl-NL/images/8-left.png differ diff --git a/nl-NL/images/8-right-annotated.png b/nl-NL/images/8-right-annotated.png index daef8333..ba0c4445 100644 Binary files a/nl-NL/images/8-right-annotated.png and b/nl-NL/images/8-right-annotated.png differ diff --git a/nl-NL/images/8-right.png b/nl-NL/images/8-right.png index 10cda4e0..0cf1c60e 100644 Binary files a/nl-NL/images/8-right.png and b/nl-NL/images/8-right.png differ diff --git a/nl-NL/images/S-to-T-blocks-test.png b/nl-NL/images/S-to-T-blocks-test.png index 9584d082..5176ff24 100644 Binary files a/nl-NL/images/S-to-T-blocks-test.png and b/nl-NL/images/S-to-T-blocks-test.png differ diff --git a/nl-NL/images/S-to-T-blocks.png b/nl-NL/images/S-to-T-blocks.png index 3abaa355..14a9f16c 100644 Binary files a/nl-NL/images/S-to-T-blocks.png and b/nl-NL/images/S-to-T-blocks.png differ diff --git a/nl-NL/images/add-example-annotated.png b/nl-NL/images/add-example-annotated.png index 81291957..cffe26a8 100644 Binary files a/nl-NL/images/add-example-annotated.png and b/nl-NL/images/add-example-annotated.png differ diff --git a/nl-NL/images/add-example.png b/nl-NL/images/add-example.png index 0fa70ce6..6e48e704 100644 Binary files a/nl-NL/images/add-example.png and b/nl-NL/images/add-example.png differ diff --git a/nl-NL/images/add-new-blocks.png b/nl-NL/images/add-new-blocks.png index a00e4d4c..8c5d26ad 100644 Binary files a/nl-NL/images/add-new-blocks.png and b/nl-NL/images/add-new-blocks.png differ diff --git a/nl-NL/images/alien-language.png b/nl-NL/images/alien-language.png new file mode 100644 index 00000000..e25edefa Binary files /dev/null and b/nl-NL/images/alien-language.png differ diff --git a/nl-NL/images/allow-microphone.png b/nl-NL/images/allow-microphone.png new file mode 100644 index 00000000..dadb4ef2 Binary files /dev/null and b/nl-NL/images/allow-microphone.png differ diff --git a/nl-NL/images/background-noise-annotated.png b/nl-NL/images/background-noise-annotated.png index ad50c670..f156b977 100644 Binary files a/nl-NL/images/background-noise-annotated.png and b/nl-NL/images/background-noise-annotated.png differ diff --git a/nl-NL/images/background-noise.png b/nl-NL/images/background-noise.png index 3a740f3f..d144ae98 100644 Binary files a/nl-NL/images/background-noise.png and b/nl-NL/images/background-noise.png differ diff --git a/nl-NL/images/click-train.png b/nl-NL/images/click-train.png index 78243ae3..efc090c7 100644 Binary files a/nl-NL/images/click-train.png and b/nl-NL/images/click-train.png differ diff --git a/nl-NL/images/control-alien-blocks.png b/nl-NL/images/control-alien-blocks.png new file mode 100644 index 00000000..2ccbf8f5 Binary files /dev/null and b/nl-NL/images/control-alien-blocks.png differ diff --git a/nl-NL/images/create-project.png b/nl-NL/images/create-project.png new file mode 100644 index 00000000..f438c376 Binary files /dev/null and b/nl-NL/images/create-project.png differ diff --git a/nl-NL/images/create.png b/nl-NL/images/create.png index 16d02d79..a32be2e7 100644 Binary files a/nl-NL/images/create.png and b/nl-NL/images/create.png differ diff --git a/nl-NL/images/extensions-annotated.png b/nl-NL/images/extensions-annotated.png index 14c15c8c..b4ae1b29 100644 Binary files a/nl-NL/images/extensions-annotated.png and b/nl-NL/images/extensions-annotated.png differ diff --git a/nl-NL/images/extensions.png b/nl-NL/images/extensions.png index 8882fb15..6e1337c7 100644 Binary files a/nl-NL/images/extensions.png and b/nl-NL/images/extensions.png differ diff --git a/nl-NL/images/learn-test-annotated.png b/nl-NL/images/learn-test-annotated.png index 3bf8142d..aa61ee71 100644 Binary files a/nl-NL/images/learn-test-annotated.png and b/nl-NL/images/learn-test-annotated.png differ diff --git a/nl-NL/images/learn-test.png b/nl-NL/images/learn-test.png index f337b368..d31d02a6 100644 Binary files a/nl-NL/images/learn-test.png and b/nl-NL/images/learn-test.png differ diff --git a/nl-NL/images/left-empty-annotated.png b/nl-NL/images/left-empty-annotated.png index 1c6c200b..8751517a 100644 Binary files a/nl-NL/images/left-empty-annotated.png and b/nl-NL/images/left-empty-annotated.png differ diff --git a/nl-NL/images/left-empty.png b/nl-NL/images/left-empty.png index 07a87aea..947f24f2 100644 Binary files a/nl-NL/images/left-empty.png and b/nl-NL/images/left-empty.png differ diff --git a/nl-NL/images/make-annotated.png b/nl-NL/images/make-annotated.png index 9f9e2f5a..98dac199 100644 Binary files a/nl-NL/images/make-annotated.png and b/nl-NL/images/make-annotated.png differ diff --git a/nl-NL/images/make.png b/nl-NL/images/make.png index f337b368..3934ee69 100644 Binary files a/nl-NL/images/make.png and b/nl-NL/images/make.png differ diff --git a/nl-NL/images/new-blocks.png b/nl-NL/images/new-blocks.png new file mode 100644 index 00000000..8afb9da2 Binary files /dev/null and b/nl-NL/images/new-blocks.png differ diff --git a/nl-NL/images/project-train.png b/nl-NL/images/project-train.png new file mode 100644 index 00000000..c8978103 Binary files /dev/null and b/nl-NL/images/project-train.png differ diff --git a/nl-NL/images/projects-list.png b/nl-NL/images/projects-list.png new file mode 100644 index 00000000..875333a9 Binary files /dev/null and b/nl-NL/images/projects-list.png differ diff --git a/nl-NL/images/record-button.png b/nl-NL/images/record-button.png new file mode 100644 index 00000000..0ef0ff53 Binary files /dev/null and b/nl-NL/images/record-button.png differ diff --git a/nl-NL/images/save-example-annotated.png b/nl-NL/images/save-example-annotated.png index 50276042..7a85ebdd 100644 Binary files a/nl-NL/images/save-example-annotated.png and b/nl-NL/images/save-example-annotated.png differ diff --git a/nl-NL/images/save-example.png b/nl-NL/images/save-example.png index 0d1a1d48..b706977d 100644 Binary files a/nl-NL/images/save-example.png and b/nl-NL/images/save-example.png differ diff --git a/nl-NL/images/start-listening-annotated.png b/nl-NL/images/start-listening-annotated.png index 2c33da25..a1412281 100644 Binary files a/nl-NL/images/start-listening-annotated.png and b/nl-NL/images/start-listening-annotated.png differ diff --git a/nl-NL/images/start-listening.png b/nl-NL/images/start-listening.png index db113d03..3c5efb5d 100644 Binary files a/nl-NL/images/start-listening.png and b/nl-NL/images/start-listening.png differ diff --git a/nl-NL/images/test-new-blocks.png b/nl-NL/images/test-new-blocks.png index 5c4260bc..9fd61a4f 100644 Binary files a/nl-NL/images/test-new-blocks.png and b/nl-NL/images/test-new-blocks.png differ diff --git a/nl-NL/images/test-your-model.png b/nl-NL/images/test-your-model.png new file mode 100644 index 00000000..3640f137 Binary files /dev/null and b/nl-NL/images/test-your-model.png differ diff --git a/nl-NL/images/train-annotated.png b/nl-NL/images/train-annotated.png index e932f6b9..70243222 100644 Binary files a/nl-NL/images/train-annotated.png and b/nl-NL/images/train-annotated.png differ diff --git a/nl-NL/images/train-new-model.png b/nl-NL/images/train-new-model.png new file mode 100644 index 00000000..ad602f9b Binary files /dev/null and b/nl-NL/images/train-new-model.png differ diff --git a/nl-NL/images/train.png b/nl-NL/images/train.png index ba8882af..76623abc 100644 Binary files a/nl-NL/images/train.png and b/nl-NL/images/train.png differ diff --git a/nl-NL/images/whatyouwillmake.gif b/nl-NL/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/nl-NL/images/whatyouwillmake.gif differ diff --git a/nl-NL/meta.yml b/nl-NL/meta.yml index 5e7aa1ea..a7c24277 100644 --- a/nl-NL/meta.yml +++ b/nl-NL/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: Buitenaardse taal hero_image: images/banner.png -description: Create your own alien language to move a sprite -theme: orange +description: Maak je eigen buitenaardse taal om een sprite te verplaatsen +theme: oranje listed: true copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: Wat ga je maken - - title: Use a pretrained model + title: Het project opzetten - - title: Create a new project + title: Verzin twee woorden + completion: + - engaged - - title: Create alien words + title: Train het model - - title: Train a new machine learning model + title: Bestuur het buitenaardse wezen + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Uitdaging' challenge: true - - - title: What next? + completion: + - external diff --git a/nl-NL/resources/NEW Alien 1.mp4 b/nl-NL/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/nl-NL/resources/NEW Alien 1.mp4 differ diff --git a/nl-NL/resources/NEW Alien 1.srt b/nl-NL/resources/NEW Alien 1.srt new file mode 100644 index 00000000..47613ceb --- /dev/null +++ b/nl-NL/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Ga naar rpf.io/ml4k en klik op 'Begin'. + +2 +00:00:11,520 --> 00:00:15,560 +Klik op 'Probeer nu'. + +3 +00:00:15,560 --> 00:00:20,560 +Voeg een nieuw project toe met de naam 'Buitenaardse taal. + +4 +00:00:20,560 --> 00:00:28,280 +Stel het projecttype in op 'herkenning sounds', +en de opslag op 'in your webbrowser'. + +5 +00:00:28,280 --> 00:00:34,840 +Creëer het project en klik +vervolgens op de projecttitel. + +6 +00:00:34,840 --> 00:00:40,000 +Klik nu op 'Train'. + diff --git a/nl-NL/resources/NEW Alien 2.mp4 b/nl-NL/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/nl-NL/resources/NEW Alien 2.mp4 differ diff --git a/nl-NL/resources/NEW Alien 2.srt b/nl-NL/resources/NEW Alien 2.srt new file mode 100644 index 00000000..98bbac3d --- /dev/null +++ b/nl-NL/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Geef de site toegang tot jouw microfoon +als daarom wordt gevraagd. + +2 +00:00:07,160 --> 00:00:12,440 +Maak een opname van achtergrond- +geluid - zeg dus niets. + +3 +00:00:12,440 --> 00:00:17,800 +Herhaal dit totdat je acht samples +van achtergrondgeluiden hebt. + +4 +00:00:17,800 --> 00:00:27,040 +Voeg een label voor links toe en neem het door jou +verzonnen buitenaardse woord voor links acht keer op. + +5 +00:00:27,040 --> 00:00:38,120 +Voeg vervolgens een label voor rechts toe en maak +acht keer een opname van een ander zelfbedacht woord. + diff --git a/nl-NL/resources/NEW Alien 3.mp4 b/nl-NL/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/nl-NL/resources/NEW Alien 3.mp4 differ diff --git a/nl-NL/resources/NEW Alien 3.srt b/nl-NL/resources/NEW Alien 3.srt new file mode 100644 index 00000000..4bfa01a9 --- /dev/null +++ b/nl-NL/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Klik op 'Terug' en klik vervolgens op 'Leer & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +Nu ga je je model trainen! + +3 +00:00:15,520 --> 00:00:19,160 +Test het model door een van je woorden te zeggen: + +4 +00:00:19,160 --> 00:00:27,520 +Bloep! + diff --git a/nl-NL/resources/NEW Alien 4.mp4 b/nl-NL/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/nl-NL/resources/NEW Alien 4.mp4 differ diff --git a/nl-NL/resources/NEW Alien 4.srt b/nl-NL/resources/NEW Alien 4.srt new file mode 100644 index 00000000..17dab8b2 --- /dev/null +++ b/nl-NL/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Klik nu opnieuw op 'Terug' en +kies ditmaal voor 'Maak'. + +2 +00:00:08,640 --> 00:00:14,160 +Laten we het model in Scratch gebruiken! + +3 +00:00:14,160 --> 00:00:21,920 +Ga naar 'Project templates' en selecteer +het sjabloon voor 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Er is al wat code voor je toegevoegd. + +5 +00:00:24,360 --> 00:00:29,960 +Versleep de codeblokken zodat +de alien beweegt als je praat. + +6 +00:00:36,800 --> 00:00:40,800 +Laten we het eens proberen. + +7 +00:00:40,800 --> 00:00:43,840 +Bloep! + +8 +00:00:43,840 --> 00:00:50,200 +Wauw! + diff --git a/nl-NL/resources/readme.txt b/nl-NL/resources/readme.txt new file mode 100644 index 00000000..f5f90aa9 --- /dev/null +++ b/nl-NL/resources/readme.txt @@ -0,0 +1 @@ +Om een video met ondertiteling te bekijken op VLC (videolan.org), zorg ervoor dat het videobestand en het ondertitelingsbestand in dezelfde map zitten en exact dezelfde naam hebben (bijv. video.mp4 en video.srt). Open de video in VLC, dan wordt de ondertiteling automatisch geladen. Als de ondertiteling niet verschijnt, klik dan met de rechtermuisknop op het videoscherm, ga naar **Subtitle**, dan **Add Subtitle File**, en selecteer het juiste .srt-bestand. Veel kijkplezier met de ondertiteling! \ No newline at end of file diff --git a/nl-NL/step_1.md b/nl-NL/step_1.md index c490131c..7aea74c9 100644 --- a/nl-NL/step_1.md +++ b/nl-NL/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## Wat ga je maken -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train een machine learning-model om een buitenaardse taal te herkennen en gebruik dit in Scratch om een buitenaards wezen te besturen. -### What you will make +Je hebt een **microfoon** nodig. -\--- no-print \--- +![Alien beweegt links en rechts door nieuwe woorden, Eek en Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Waar worden mijn spraakopnames opgeslagen? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- Dit project maakt gebruik van een technologie genaamd 'machine learning'. Machine learning-systemen worden getraind met behulp van een grote hoeveelheid data. +- Voor dit project hoef je geen account aan te maken of in te loggen. Voor dit project worden de voorbeelden die je gebruikt om het model te maken tijdelijk opgeslagen in je browser (alleen op je machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: Geen YouTube? Download de video's! --- -+ A computer with a microphone +Je kunt [alle video's voor dit project downloaden](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: Licentie --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +Dit project heeft een dubbele licentie onder zowel een [Creative Commons Attribution Non-Commercial Share-Alike-licentie](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} en een [Apache-licentie versie 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -\--- collapse \--- ---- -title: Additional information for educators ---- +We willen Dale van machinelearningforkids.co.uk graag bedanken voor al zijn werk aan dit project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/nl-NL/step_2.md b/nl-NL/step_2.md index 5954228f..ee568f7e 100644 --- a/nl-NL/step_2.md +++ b/nl-NL/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Het project opzetten -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Ga naar [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in een webbrowser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Klik op **Begin**. -\--- /task \--- ++ Klik op **Probeer nu**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Klik op **Projecten** in de menubalk bovenaan. + ++ Klik op de knop **+ Voeg een nieuw project toe**. + ++ Geef je project de naam `Buitenaardse taal` en stel het in om geluiden te leren herkennen **** en sla gegevens op **in je webbrowser**. Klik vervolgens op **Creëer**. ![Een project maken](images/create-project.png) + ++ Je zou nu 'Buitenaardse taal' in de projectenlijst moeten zien. Klik op dit project. ![Projectlijst met vermelding van buitenaardse taal](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Klik op de knop **Train**. ![Project hoofdmenu met een pijl naar de train-knop](images/project-train.png) + ++ Als je een pop-upbericht ziet met de vraag om de microfoon te gebruiken, klik dan op **Toestaan bij elk bezoek**. + +![Pop-up waarin je wordt gevraagd de microfoon toe te staan, met een pijl die wijst toestaan bij elk bezoek](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/nl-NL/step_3.md b/nl-NL/step_3.md index 1421a334..02f6487d 100644 --- a/nl-NL/step_3.md +++ b/nl-NL/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Verzin twee woorden -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +Eerst verzamel je voorbeelden van achtergrondgeluiden. Dit helpt je machine learning-model om het verschil te horen tussen de geluiden die je zult gebruiken om te herkennen en het achtergrondgeluid van waar je bent. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Klik op de **+ Voeg een voorbeeld toe** knop in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Klik op de microfoon, maar zeg niets. Neem 2 seconden achtergrondgeluid op. ![Pijl wijzend naar microfoonknop](images/record-button.png) -+ Click the **Add a new project** button. ++ Klik op de knop **VOEG TOE** om jouw opname op te slaan. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Herhaal deze stappen totdat je **minimaal acht voorbeelden** van achtergrondgeluiden hebt. ![Container gevuld met 8 achtergrond voorbeelden](images/8-background.png) + +--- /task --- + +Bedenk twee buitenaardse woorden: een woord dat "links" betekent en een woord dat "rechts" betekent. + +Nu ga je acht voorbeelden van elk woord vastleggen, zodat jouw machine learning-model deze kan leren herkennen. + +--- task --- + ++ Klik rechtsboven in het scherm op **+ Voeg een nieuw label toe** en voeg een label toe met de naam `links`. + +--- /task --- + +--- task --- + ++ Klik op **+ Voeg een voorbeeld toe** in het vak voor het nieuwe `links` label en neem jezelf op terwijl je jouw buitenaards woord voor "links" zegt. + ++ Herhaal dit totdat je **minstens acht voorbeelden** hebt opgenomen. + +--- /task --- + +--- task --- + ++ Klik op **+ Voeg een nieuw label toe** om een ander label te maken met de naam `rechts` en neem acht voorbeelden van jouw buitenaardse woord voor "rechts" op. + +--- /task --- diff --git a/nl-NL/step_4.md b/nl-NL/step_4.md index 1460a58b..bfd6f0da 100644 --- a/nl-NL/step_4.md +++ b/nl-NL/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train het model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +Je hebt de voorbeelden verzameld die je nodig hebt, nu ga je deze gebruiken om jouw machine learning model te trainen. -\--- /task \--- +--- task --- -\--- task \--- ++ Klik op **Terug naar project** in de linkerbovenhoek. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Klik op **Leer & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Klik op de knop met het label **Train nieuw machine learning model**. Dit kan enkele minuten duren. ![Pijl die naar de knop wijst met de tekst Train nieuw machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Zodra het trainen is voltooid, kun je testen hoe goed jouw model jouw zelfbedachte buitenaardse woorden herkent. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Klik op de knop **Begin met luisteren** en zeg vervolgens het buitenaardse woord voor "links". -\--- task \--- +Als je machine learning model dit herkent, wordt weergegeven wat het model voorspelt dat jij hebt gezegd. ![Pijl die naar de knop 'Start listening' wijst](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test of het model ook jouw buitenaardse woord voor "rechts" herkent. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +Als je niet tevreden bent met hoe het model werkt, ga dan terug naar de **Train** pagina en voeg meer voorbeelden toe, en train daarna je model opnieuw. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/nl-NL/step_5.md b/nl-NL/step_5.md index ad5d0c1f..74402416 100644 --- a/nl-NL/step_5.md +++ b/nl-NL/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Bestuur het buitenaardse wezen -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Nu je model verschillende woorden kan onderscheiden, kun je het gebruiken in een Scratch-programma om een buitenaards wezen te besturen. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Klik op de link **Terug naar project** in de linkerbovenhoek. -\--- /task \--- ++ Klik op **Maak**. + ++ Klik op **Scratch 3**. + ++ Klik op **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Klik bovenaan op **Project templates** en selecteer het project 'Alien language' om de Alien sprite te laden, waaraan al wat code is toegevoegd. + +![Het project 'Alien language' is geselecteerd in de Scratch sjablonen](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids heeft een paar speciale blokken aan Scratch toegevoegd om het model dat je net hebt getraind te kunnen gebruiken. Dit projectsjabloon bevat ook speciale blokken 'loop naar links' en 'loop naar rechts' in 'Mijn blokken'. Je vindt ze onderaan de lijst met blokken. + +![Buitenaardse taal-blokken worden weergegeven in het menu onder Mijn blokken en Afbeeldingen](images/new-blocks.png) + +--- task --- + ++ Zorg ervoor dat je de sprite **Alien** hebt geselecteerd en klik vervolgens op het tabblad **Code** en voeg deze code toe. (Behoud de code die er al is!) ![Voeg code toe om de alien te besturen: Wanneer op groene vlag wordt geklikt start listening. Als ik links hoor, zeg dan links en loop naar links. Als ik rechts hoor, zeg dan rechts en loop naar rechts.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Klik op de **groene vlag** en zeg jouw buitenaardse woorden voor "links" en "rechts". Controleer of de Alien beweegt zoals je verwacht. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/nl-NL/step_6.md b/nl-NL/step_6.md index 0fe36309..afa7af86 100644 --- a/nl-NL/step_6.md +++ b/nl-NL/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Uitdaging -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Omhoog en omlaag bewegen**: Ga terug naar je model en voeg nog twee labels toe voor "omhoog" en "omlaag". Pas vervolgens je Scratch code aan zodat je de alien in alle vier de richtingen kunt bewegen. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/nl-NL/step_7.md b/nl-NL/step_7.md index 043d77a9..4b65a0c6 100644 --- a/nl-NL/step_7.md +++ b/nl-NL/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## Wat kun je verder nog doen? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +Er zijn nog veel meer machine learning en AI-projecten in het [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning)-pad. diff --git a/nl-NL/step_8.md b/nl-NL/step_8.md index 0b7653d3..a832cef7 100644 --- a/nl-NL/step_8.md +++ b/nl-NL/step_8.md @@ -1,7 +1,7 @@ -## What next? +## Wat kun je verder nog doen? -If you haven't already, try our other machine learning with Scratch projects. +Probeer onze andere machine learning met Scratch-projecten als je dat nog niet hebt gedaan. -[Smart Classroom](https://projects.raspberrypi.org/en/projects/smart-classroom) +[Slim klaslokaal](https://projects.raspberrypi.org/en/projects/smart-classroom) -[Journey to school](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file +[Reis naar school](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file diff --git a/no-NO/images/8-background-annotated.png b/no-NO/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/no-NO/images/8-background-annotated.png and b/no-NO/images/8-background-annotated.png differ diff --git a/no-NO/images/8-background.png b/no-NO/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/no-NO/images/8-background.png and b/no-NO/images/8-background.png differ diff --git a/no-NO/images/8-left.png b/no-NO/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/no-NO/images/8-left.png and b/no-NO/images/8-left.png differ diff --git a/no-NO/images/8-right-annotated.png b/no-NO/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/no-NO/images/8-right-annotated.png and b/no-NO/images/8-right-annotated.png differ diff --git a/no-NO/images/8-right.png b/no-NO/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/no-NO/images/8-right.png and b/no-NO/images/8-right.png differ diff --git a/no-NO/images/add-example-annotated.png b/no-NO/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/no-NO/images/add-example-annotated.png and b/no-NO/images/add-example-annotated.png differ diff --git a/no-NO/images/alien-language.png b/no-NO/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/no-NO/images/alien-language.png differ diff --git a/no-NO/images/allow-microphone.png b/no-NO/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/no-NO/images/allow-microphone.png differ diff --git a/no-NO/images/background-noise-annotated.png b/no-NO/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/no-NO/images/background-noise-annotated.png and b/no-NO/images/background-noise-annotated.png differ diff --git a/no-NO/images/background-noise.png b/no-NO/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/no-NO/images/background-noise.png and b/no-NO/images/background-noise.png differ diff --git a/no-NO/images/click-train.png b/no-NO/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/no-NO/images/click-train.png and b/no-NO/images/click-train.png differ diff --git a/no-NO/images/control-alien-blocks.png b/no-NO/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/no-NO/images/control-alien-blocks.png differ diff --git a/no-NO/images/create-project.png b/no-NO/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/no-NO/images/create-project.png differ diff --git a/no-NO/images/create.png b/no-NO/images/create.png index 16d02d79..2283d747 100644 Binary files a/no-NO/images/create.png and b/no-NO/images/create.png differ diff --git a/no-NO/images/extensions-annotated.png b/no-NO/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/no-NO/images/extensions-annotated.png and b/no-NO/images/extensions-annotated.png differ diff --git a/no-NO/images/learn-test-annotated.png b/no-NO/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/no-NO/images/learn-test-annotated.png and b/no-NO/images/learn-test-annotated.png differ diff --git a/no-NO/images/left-empty-annotated.png b/no-NO/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/no-NO/images/left-empty-annotated.png and b/no-NO/images/left-empty-annotated.png differ diff --git a/no-NO/images/make-annotated.png b/no-NO/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/no-NO/images/make-annotated.png and b/no-NO/images/make-annotated.png differ diff --git a/no-NO/images/new-blocks.png b/no-NO/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/no-NO/images/new-blocks.png differ diff --git a/no-NO/images/project-train.png b/no-NO/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/no-NO/images/project-train.png differ diff --git a/no-NO/images/projects-list.png b/no-NO/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/no-NO/images/projects-list.png differ diff --git a/no-NO/images/record-button.png b/no-NO/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/no-NO/images/record-button.png differ diff --git a/no-NO/images/save-example-annotated.png b/no-NO/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/no-NO/images/save-example-annotated.png and b/no-NO/images/save-example-annotated.png differ diff --git a/no-NO/images/start-listening-annotated.png b/no-NO/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/no-NO/images/start-listening-annotated.png and b/no-NO/images/start-listening-annotated.png differ diff --git a/no-NO/images/test-your-model.png b/no-NO/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/no-NO/images/test-your-model.png differ diff --git a/no-NO/images/train-annotated.png b/no-NO/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/no-NO/images/train-annotated.png and b/no-NO/images/train-annotated.png differ diff --git a/no-NO/images/train-new-model.png b/no-NO/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/no-NO/images/train-new-model.png differ diff --git a/no-NO/images/whatyouwillmake.gif b/no-NO/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/no-NO/images/whatyouwillmake.gif differ diff --git a/no-NO/meta.yml b/no-NO/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/no-NO/meta.yml +++ b/no-NO/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/no-NO/resources/NEW Alien 1.mp4 b/no-NO/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/no-NO/resources/NEW Alien 1.mp4 differ diff --git a/no-NO/resources/NEW Alien 1.srt b/no-NO/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/no-NO/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/no-NO/resources/NEW Alien 2.mp4 b/no-NO/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/no-NO/resources/NEW Alien 2.mp4 differ diff --git a/no-NO/resources/NEW Alien 2.srt b/no-NO/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/no-NO/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/no-NO/resources/NEW Alien 3.mp4 b/no-NO/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/no-NO/resources/NEW Alien 3.mp4 differ diff --git a/no-NO/resources/NEW Alien 3.srt b/no-NO/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/no-NO/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/no-NO/resources/NEW Alien 4.mp4 b/no-NO/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/no-NO/resources/NEW Alien 4.mp4 differ diff --git a/no-NO/resources/NEW Alien 4.srt b/no-NO/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/no-NO/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/no-NO/resources/readme.txt b/no-NO/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/no-NO/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/no-NO/step_1.md b/no-NO/step_1.md index c490131c..aa0540f2 100644 --- a/no-NO/step_1.md +++ b/no-NO/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/no-NO/step_2.md b/no-NO/step_2.md index 5954228f..e6930402 100644 --- a/no-NO/step_2.md +++ b/no-NO/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/no-NO/step_3.md b/no-NO/step_3.md index 1421a334..bf9eb8ee 100644 --- a/no-NO/step_3.md +++ b/no-NO/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/no-NO/step_4.md b/no-NO/step_4.md index 1460a58b..785b11b0 100644 --- a/no-NO/step_4.md +++ b/no-NO/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/no-NO/step_5.md b/no-NO/step_5.md index ad5d0c1f..c361be8e 100644 --- a/no-NO/step_5.md +++ b/no-NO/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/no-NO/step_6.md b/no-NO/step_6.md index 0fe36309..6ca94946 100644 --- a/no-NO/step_6.md +++ b/no-NO/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/no-NO/step_7.md b/no-NO/step_7.md index 043d77a9..d4b22e96 100644 --- a/no-NO/step_7.md +++ b/no-NO/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/pl-PL/images/8-background-annotated.png b/pl-PL/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/pl-PL/images/8-background-annotated.png and b/pl-PL/images/8-background-annotated.png differ diff --git a/pl-PL/images/8-background.png b/pl-PL/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/pl-PL/images/8-background.png and b/pl-PL/images/8-background.png differ diff --git a/pl-PL/images/8-left.png b/pl-PL/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/pl-PL/images/8-left.png and b/pl-PL/images/8-left.png differ diff --git a/pl-PL/images/8-right-annotated.png b/pl-PL/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/pl-PL/images/8-right-annotated.png and b/pl-PL/images/8-right-annotated.png differ diff --git a/pl-PL/images/8-right.png b/pl-PL/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/pl-PL/images/8-right.png and b/pl-PL/images/8-right.png differ diff --git a/pl-PL/images/add-example-annotated.png b/pl-PL/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/pl-PL/images/add-example-annotated.png and b/pl-PL/images/add-example-annotated.png differ diff --git a/pl-PL/images/alien-language.png b/pl-PL/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/pl-PL/images/alien-language.png differ diff --git a/pl-PL/images/allow-microphone.png b/pl-PL/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/pl-PL/images/allow-microphone.png differ diff --git a/pl-PL/images/background-noise-annotated.png b/pl-PL/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/pl-PL/images/background-noise-annotated.png and b/pl-PL/images/background-noise-annotated.png differ diff --git a/pl-PL/images/background-noise.png b/pl-PL/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/pl-PL/images/background-noise.png and b/pl-PL/images/background-noise.png differ diff --git a/pl-PL/images/click-train.png b/pl-PL/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/pl-PL/images/click-train.png and b/pl-PL/images/click-train.png differ diff --git a/pl-PL/images/control-alien-blocks.png b/pl-PL/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/pl-PL/images/control-alien-blocks.png differ diff --git a/pl-PL/images/create-project.png b/pl-PL/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/pl-PL/images/create-project.png differ diff --git a/pl-PL/images/create.png b/pl-PL/images/create.png index 16d02d79..2283d747 100644 Binary files a/pl-PL/images/create.png and b/pl-PL/images/create.png differ diff --git a/pl-PL/images/extensions-annotated.png b/pl-PL/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/pl-PL/images/extensions-annotated.png and b/pl-PL/images/extensions-annotated.png differ diff --git a/pl-PL/images/learn-test-annotated.png b/pl-PL/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/pl-PL/images/learn-test-annotated.png and b/pl-PL/images/learn-test-annotated.png differ diff --git a/pl-PL/images/left-empty-annotated.png b/pl-PL/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/pl-PL/images/left-empty-annotated.png and b/pl-PL/images/left-empty-annotated.png differ diff --git a/pl-PL/images/make-annotated.png b/pl-PL/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/pl-PL/images/make-annotated.png and b/pl-PL/images/make-annotated.png differ diff --git a/pl-PL/images/new-blocks.png b/pl-PL/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/pl-PL/images/new-blocks.png differ diff --git a/pl-PL/images/project-train.png b/pl-PL/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/pl-PL/images/project-train.png differ diff --git a/pl-PL/images/projects-list.png b/pl-PL/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/pl-PL/images/projects-list.png differ diff --git a/pl-PL/images/record-button.png b/pl-PL/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/pl-PL/images/record-button.png differ diff --git a/pl-PL/images/save-example-annotated.png b/pl-PL/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/pl-PL/images/save-example-annotated.png and b/pl-PL/images/save-example-annotated.png differ diff --git a/pl-PL/images/start-listening-annotated.png b/pl-PL/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/pl-PL/images/start-listening-annotated.png and b/pl-PL/images/start-listening-annotated.png differ diff --git a/pl-PL/images/test-your-model.png b/pl-PL/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/pl-PL/images/test-your-model.png differ diff --git a/pl-PL/images/train-annotated.png b/pl-PL/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/pl-PL/images/train-annotated.png and b/pl-PL/images/train-annotated.png differ diff --git a/pl-PL/images/train-new-model.png b/pl-PL/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/pl-PL/images/train-new-model.png differ diff --git a/pl-PL/images/whatyouwillmake.gif b/pl-PL/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/pl-PL/images/whatyouwillmake.gif differ diff --git a/pl-PL/meta.yml b/pl-PL/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/pl-PL/meta.yml +++ b/pl-PL/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/pl-PL/resources/NEW Alien 1.mp4 b/pl-PL/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/pl-PL/resources/NEW Alien 1.mp4 differ diff --git a/pl-PL/resources/NEW Alien 1.srt b/pl-PL/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/pl-PL/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/pl-PL/resources/NEW Alien 2.mp4 b/pl-PL/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/pl-PL/resources/NEW Alien 2.mp4 differ diff --git a/pl-PL/resources/NEW Alien 2.srt b/pl-PL/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/pl-PL/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/pl-PL/resources/NEW Alien 3.mp4 b/pl-PL/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/pl-PL/resources/NEW Alien 3.mp4 differ diff --git a/pl-PL/resources/NEW Alien 3.srt b/pl-PL/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/pl-PL/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/pl-PL/resources/NEW Alien 4.mp4 b/pl-PL/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/pl-PL/resources/NEW Alien 4.mp4 differ diff --git a/pl-PL/resources/NEW Alien 4.srt b/pl-PL/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/pl-PL/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/pl-PL/resources/readme.txt b/pl-PL/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/pl-PL/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/pl-PL/step_1.md b/pl-PL/step_1.md index c490131c..aa0540f2 100644 --- a/pl-PL/step_1.md +++ b/pl-PL/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/pl-PL/step_2.md b/pl-PL/step_2.md index 5954228f..e6930402 100644 --- a/pl-PL/step_2.md +++ b/pl-PL/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/pl-PL/step_3.md b/pl-PL/step_3.md index 1421a334..bf9eb8ee 100644 --- a/pl-PL/step_3.md +++ b/pl-PL/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/pl-PL/step_4.md b/pl-PL/step_4.md index 1460a58b..785b11b0 100644 --- a/pl-PL/step_4.md +++ b/pl-PL/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/pl-PL/step_5.md b/pl-PL/step_5.md index ad5d0c1f..c361be8e 100644 --- a/pl-PL/step_5.md +++ b/pl-PL/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/pl-PL/step_6.md b/pl-PL/step_6.md index 0fe36309..6ca94946 100644 --- a/pl-PL/step_6.md +++ b/pl-PL/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/pl-PL/step_7.md b/pl-PL/step_7.md index 043d77a9..d4b22e96 100644 --- a/pl-PL/step_7.md +++ b/pl-PL/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/pt-BR/images/8-background-annotated.png b/pt-BR/images/8-background-annotated.png index b80a56a6..3c0def2f 100644 Binary files a/pt-BR/images/8-background-annotated.png and b/pt-BR/images/8-background-annotated.png differ diff --git a/pt-BR/images/8-background.png b/pt-BR/images/8-background.png index 096d3169..98c8b7cd 100644 Binary files a/pt-BR/images/8-background.png and b/pt-BR/images/8-background.png differ diff --git a/pt-BR/images/8-left.png b/pt-BR/images/8-left.png index c8ccf98c..8ca624e2 100644 Binary files a/pt-BR/images/8-left.png and b/pt-BR/images/8-left.png differ diff --git a/pt-BR/images/8-right-annotated.png b/pt-BR/images/8-right-annotated.png index daef8333..f6b05e2e 100644 Binary files a/pt-BR/images/8-right-annotated.png and b/pt-BR/images/8-right-annotated.png differ diff --git a/pt-BR/images/8-right.png b/pt-BR/images/8-right.png index 10cda4e0..734f5909 100644 Binary files a/pt-BR/images/8-right.png and b/pt-BR/images/8-right.png differ diff --git a/pt-BR/images/S-to-T-blocks-test.png b/pt-BR/images/S-to-T-blocks-test.png index 9584d082..4f3fa7cc 100644 Binary files a/pt-BR/images/S-to-T-blocks-test.png and b/pt-BR/images/S-to-T-blocks-test.png differ diff --git a/pt-BR/images/S-to-T-blocks.png b/pt-BR/images/S-to-T-blocks.png index 3abaa355..4acfadef 100644 Binary files a/pt-BR/images/S-to-T-blocks.png and b/pt-BR/images/S-to-T-blocks.png differ diff --git a/pt-BR/images/add-example-annotated.png b/pt-BR/images/add-example-annotated.png index 81291957..f7da3af5 100644 Binary files a/pt-BR/images/add-example-annotated.png and b/pt-BR/images/add-example-annotated.png differ diff --git a/pt-BR/images/add-example.png b/pt-BR/images/add-example.png index 0fa70ce6..c50d5058 100644 Binary files a/pt-BR/images/add-example.png and b/pt-BR/images/add-example.png differ diff --git a/pt-BR/images/add-new-blocks.png b/pt-BR/images/add-new-blocks.png index a00e4d4c..0d2b5426 100644 Binary files a/pt-BR/images/add-new-blocks.png and b/pt-BR/images/add-new-blocks.png differ diff --git a/pt-BR/images/alien-language.png b/pt-BR/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/pt-BR/images/alien-language.png differ diff --git a/pt-BR/images/allow-microphone.png b/pt-BR/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/pt-BR/images/allow-microphone.png differ diff --git a/pt-BR/images/background-noise-annotated.png b/pt-BR/images/background-noise-annotated.png index ad50c670..d3b00788 100644 Binary files a/pt-BR/images/background-noise-annotated.png and b/pt-BR/images/background-noise-annotated.png differ diff --git a/pt-BR/images/background-noise.png b/pt-BR/images/background-noise.png index 3a740f3f..35363f5e 100644 Binary files a/pt-BR/images/background-noise.png and b/pt-BR/images/background-noise.png differ diff --git a/pt-BR/images/click-train.png b/pt-BR/images/click-train.png index 78243ae3..30609e6c 100644 Binary files a/pt-BR/images/click-train.png and b/pt-BR/images/click-train.png differ diff --git a/pt-BR/images/control-alien-blocks.png b/pt-BR/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/pt-BR/images/control-alien-blocks.png differ diff --git a/pt-BR/images/create-project.png b/pt-BR/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/pt-BR/images/create-project.png differ diff --git a/pt-BR/images/create.png b/pt-BR/images/create.png index 16d02d79..f204cde9 100644 Binary files a/pt-BR/images/create.png and b/pt-BR/images/create.png differ diff --git a/pt-BR/images/extensions-annotated.png b/pt-BR/images/extensions-annotated.png index 14c15c8c..d9367d8e 100644 Binary files a/pt-BR/images/extensions-annotated.png and b/pt-BR/images/extensions-annotated.png differ diff --git a/pt-BR/images/extensions.png b/pt-BR/images/extensions.png index 8882fb15..bc3ab386 100644 Binary files a/pt-BR/images/extensions.png and b/pt-BR/images/extensions.png differ diff --git a/pt-BR/images/learn-test-annotated.png b/pt-BR/images/learn-test-annotated.png index 3bf8142d..32563708 100644 Binary files a/pt-BR/images/learn-test-annotated.png and b/pt-BR/images/learn-test-annotated.png differ diff --git a/pt-BR/images/learn-test.png b/pt-BR/images/learn-test.png index f337b368..ea700a82 100644 Binary files a/pt-BR/images/learn-test.png and b/pt-BR/images/learn-test.png differ diff --git a/pt-BR/images/left-empty-annotated.png b/pt-BR/images/left-empty-annotated.png index 1c6c200b..65a715d9 100644 Binary files a/pt-BR/images/left-empty-annotated.png and b/pt-BR/images/left-empty-annotated.png differ diff --git a/pt-BR/images/left-empty.png b/pt-BR/images/left-empty.png index 07a87aea..1fb40a74 100644 Binary files a/pt-BR/images/left-empty.png and b/pt-BR/images/left-empty.png differ diff --git a/pt-BR/images/make-annotated.png b/pt-BR/images/make-annotated.png index 9f9e2f5a..e55a8cec 100644 Binary files a/pt-BR/images/make-annotated.png and b/pt-BR/images/make-annotated.png differ diff --git a/pt-BR/images/make.png b/pt-BR/images/make.png index f337b368..924a1712 100644 Binary files a/pt-BR/images/make.png and b/pt-BR/images/make.png differ diff --git a/pt-BR/images/new-blocks.png b/pt-BR/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/pt-BR/images/new-blocks.png differ diff --git a/pt-BR/images/project-train.png b/pt-BR/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/pt-BR/images/project-train.png differ diff --git a/pt-BR/images/projects-list.png b/pt-BR/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/pt-BR/images/projects-list.png differ diff --git a/pt-BR/images/record-button.png b/pt-BR/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/pt-BR/images/record-button.png differ diff --git a/pt-BR/images/save-example-annotated.png b/pt-BR/images/save-example-annotated.png index 50276042..76f81a90 100644 Binary files a/pt-BR/images/save-example-annotated.png and b/pt-BR/images/save-example-annotated.png differ diff --git a/pt-BR/images/save-example.png b/pt-BR/images/save-example.png index 0d1a1d48..b3b1838a 100644 Binary files a/pt-BR/images/save-example.png and b/pt-BR/images/save-example.png differ diff --git a/pt-BR/images/start-listening-annotated.png b/pt-BR/images/start-listening-annotated.png index 2c33da25..fa79b215 100644 Binary files a/pt-BR/images/start-listening-annotated.png and b/pt-BR/images/start-listening-annotated.png differ diff --git a/pt-BR/images/start-listening.png b/pt-BR/images/start-listening.png index db113d03..240a1bce 100644 Binary files a/pt-BR/images/start-listening.png and b/pt-BR/images/start-listening.png differ diff --git a/pt-BR/images/test-new-blocks.png b/pt-BR/images/test-new-blocks.png index 5c4260bc..f5ed17b4 100644 Binary files a/pt-BR/images/test-new-blocks.png and b/pt-BR/images/test-new-blocks.png differ diff --git a/pt-BR/images/test-your-model.png b/pt-BR/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/pt-BR/images/test-your-model.png differ diff --git a/pt-BR/images/train-annotated.png b/pt-BR/images/train-annotated.png index e932f6b9..c727bf0a 100644 Binary files a/pt-BR/images/train-annotated.png and b/pt-BR/images/train-annotated.png differ diff --git a/pt-BR/images/train-new-model.png b/pt-BR/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/pt-BR/images/train-new-model.png differ diff --git a/pt-BR/images/train.png b/pt-BR/images/train.png index ba8882af..5cb665e3 100644 Binary files a/pt-BR/images/train.png and b/pt-BR/images/train.png differ diff --git a/pt-BR/images/whatyouwillmake.gif b/pt-BR/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/pt-BR/images/whatyouwillmake.gif differ diff --git a/pt-BR/meta.yml b/pt-BR/meta.yml index 5e7aa1ea..70c4a1a3 100644 --- a/pt-BR/meta.yml +++ b/pt-BR/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: Linguagem alienígena hero_image: images/banner.png -description: Create your own alien language to move a sprite -theme: orange +description: Crie sua própria linguagem alienígena para mover um ator +theme: laranja listed: true copyedit: true technologies: scratch software: scratch -version: 4.0.0 -last_tested: "2019-06-04" +version: 3 +last_tested: '2019-06-04' steps: - - title: Introduction + title: O que você vai fazer - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/pt-BR/resources/NEW Alien 1.mp4 b/pt-BR/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/pt-BR/resources/NEW Alien 1.mp4 differ diff --git a/pt-BR/resources/NEW Alien 1.srt b/pt-BR/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/pt-BR/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/pt-BR/resources/NEW Alien 2.mp4 b/pt-BR/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/pt-BR/resources/NEW Alien 2.mp4 differ diff --git a/pt-BR/resources/NEW Alien 2.srt b/pt-BR/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/pt-BR/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/pt-BR/resources/NEW Alien 3.mp4 b/pt-BR/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/pt-BR/resources/NEW Alien 3.mp4 differ diff --git a/pt-BR/resources/NEW Alien 3.srt b/pt-BR/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/pt-BR/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/pt-BR/resources/NEW Alien 4.mp4 b/pt-BR/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/pt-BR/resources/NEW Alien 4.mp4 differ diff --git a/pt-BR/resources/NEW Alien 4.srt b/pt-BR/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/pt-BR/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/pt-BR/resources/readme.txt b/pt-BR/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/pt-BR/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/pt-BR/step_1.md b/pt-BR/step_1.md index c490131c..91e50046 100644 --- a/pt-BR/step_1.md +++ b/pt-BR/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## O que você vai fazer -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +Gostaríamos de agradecer a Dale do machinelearningforkids.co.uk por todo o seu trabalho neste projeto. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/pt-BR/step_2.md b/pt-BR/step_2.md index 5954228f..e6930402 100644 --- a/pt-BR/step_2.md +++ b/pt-BR/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/pt-BR/step_3.md b/pt-BR/step_3.md index 1421a334..bf9eb8ee 100644 --- a/pt-BR/step_3.md +++ b/pt-BR/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/pt-BR/step_4.md b/pt-BR/step_4.md index 1460a58b..785b11b0 100644 --- a/pt-BR/step_4.md +++ b/pt-BR/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/pt-BR/step_5.md b/pt-BR/step_5.md index ad5d0c1f..5ff322c9 100644 --- a/pt-BR/step_5.md +++ b/pt-BR/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/pt-BR/step_6.md b/pt-BR/step_6.md index 0fe36309..6ca94946 100644 --- a/pt-BR/step_6.md +++ b/pt-BR/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/pt-BR/step_7.md b/pt-BR/step_7.md index 043d77a9..d4b22e96 100644 --- a/pt-BR/step_7.md +++ b/pt-BR/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/pt-BR/step_8.md b/pt-BR/step_8.md index 0b7653d3..2845d439 100644 --- a/pt-BR/step_8.md +++ b/pt-BR/step_8.md @@ -1,7 +1,7 @@ -## What next? +## O que vem a seguir? -If you haven't already, try our other machine learning with Scratch projects. +Se ainda não o fez, experimente nosso outro aprendizado de máquina com projetos Scratch. -[Smart Classroom](https://projects.raspberrypi.org/en/projects/smart-classroom) +[Sala de aula inteligente](https://projects.raspberrypi.org/en/projects/smart-classroom) -[Journey to school](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file +[Viagem à escola](https://projects.raspberrypi.org/en/projects/journey-to-school) \ No newline at end of file diff --git a/pt-PT/images/8-background-annotated.png b/pt-PT/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/pt-PT/images/8-background-annotated.png and b/pt-PT/images/8-background-annotated.png differ diff --git a/pt-PT/images/8-background.png b/pt-PT/images/8-background.png index 096d3169..37e3d1ae 100644 Binary files a/pt-PT/images/8-background.png and b/pt-PT/images/8-background.png differ diff --git a/pt-PT/images/8-left.png b/pt-PT/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/pt-PT/images/8-left.png and b/pt-PT/images/8-left.png differ diff --git a/pt-PT/images/8-right-annotated.png b/pt-PT/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/pt-PT/images/8-right-annotated.png and b/pt-PT/images/8-right-annotated.png differ diff --git a/pt-PT/images/8-right.png b/pt-PT/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/pt-PT/images/8-right.png and b/pt-PT/images/8-right.png differ diff --git a/pt-PT/images/add-example-annotated.png b/pt-PT/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/pt-PT/images/add-example-annotated.png and b/pt-PT/images/add-example-annotated.png differ diff --git a/pt-PT/images/alien-language.png b/pt-PT/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/pt-PT/images/alien-language.png differ diff --git a/pt-PT/images/allow-microphone.png b/pt-PT/images/allow-microphone.png new file mode 100644 index 00000000..616f506a Binary files /dev/null and b/pt-PT/images/allow-microphone.png differ diff --git a/pt-PT/images/background-noise-annotated.png b/pt-PT/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/pt-PT/images/background-noise-annotated.png and b/pt-PT/images/background-noise-annotated.png differ diff --git a/pt-PT/images/background-noise.png b/pt-PT/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/pt-PT/images/background-noise.png and b/pt-PT/images/background-noise.png differ diff --git a/pt-PT/images/click-train.png b/pt-PT/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/pt-PT/images/click-train.png and b/pt-PT/images/click-train.png differ diff --git a/pt-PT/images/control-alien-blocks.png b/pt-PT/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/pt-PT/images/control-alien-blocks.png differ diff --git a/pt-PT/images/create-project.png b/pt-PT/images/create-project.png new file mode 100644 index 00000000..46e3d20f Binary files /dev/null and b/pt-PT/images/create-project.png differ diff --git a/pt-PT/images/create.png b/pt-PT/images/create.png index 16d02d79..2283d747 100644 Binary files a/pt-PT/images/create.png and b/pt-PT/images/create.png differ diff --git a/pt-PT/images/extensions-annotated.png b/pt-PT/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/pt-PT/images/extensions-annotated.png and b/pt-PT/images/extensions-annotated.png differ diff --git a/pt-PT/images/learn-test-annotated.png b/pt-PT/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/pt-PT/images/learn-test-annotated.png and b/pt-PT/images/learn-test-annotated.png differ diff --git a/pt-PT/images/left-empty-annotated.png b/pt-PT/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/pt-PT/images/left-empty-annotated.png and b/pt-PT/images/left-empty-annotated.png differ diff --git a/pt-PT/images/make-annotated.png b/pt-PT/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/pt-PT/images/make-annotated.png and b/pt-PT/images/make-annotated.png differ diff --git a/pt-PT/images/new-blocks.png b/pt-PT/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/pt-PT/images/new-blocks.png differ diff --git a/pt-PT/images/project-train.png b/pt-PT/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/pt-PT/images/project-train.png differ diff --git a/pt-PT/images/projects-list.png b/pt-PT/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/pt-PT/images/projects-list.png differ diff --git a/pt-PT/images/record-button.png b/pt-PT/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/pt-PT/images/record-button.png differ diff --git a/pt-PT/images/save-example-annotated.png b/pt-PT/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/pt-PT/images/save-example-annotated.png and b/pt-PT/images/save-example-annotated.png differ diff --git a/pt-PT/images/start-listening-annotated.png b/pt-PT/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/pt-PT/images/start-listening-annotated.png and b/pt-PT/images/start-listening-annotated.png differ diff --git a/pt-PT/images/test-your-model.png b/pt-PT/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/pt-PT/images/test-your-model.png differ diff --git a/pt-PT/images/train-annotated.png b/pt-PT/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/pt-PT/images/train-annotated.png and b/pt-PT/images/train-annotated.png differ diff --git a/pt-PT/images/train-new-model.png b/pt-PT/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/pt-PT/images/train-new-model.png differ diff --git a/pt-PT/images/whatyouwillmake.gif b/pt-PT/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/pt-PT/images/whatyouwillmake.gif differ diff --git a/pt-PT/meta.yml b/pt-PT/meta.yml index 5e7aa1ea..b4e616ce 100644 --- a/pt-PT/meta.yml +++ b/pt-PT/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: Linguagem extraterrestre hero_image: images/banner.png -description: Create your own alien language to move a sprite +description: Cria a tua própria linguagem extraterrestre para mover um ator theme: orange listed: true copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: O que vais fazer - - title: Use a pretrained model + title: Prepara o teu projeto - - title: Create a new project + title: Inventa duas palavras + completion: + - engaged - - title: Create alien words + title: Treina o modelo - - title: Train a new machine learning model + title: Controla o extraterrestre + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Desafio' challenge: true - - - title: What next? + completion: + - external diff --git a/pt-PT/resources/NEW Alien 1.mp4 b/pt-PT/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/pt-PT/resources/NEW Alien 1.mp4 differ diff --git a/pt-PT/resources/NEW Alien 1.srt b/pt-PT/resources/NEW Alien 1.srt new file mode 100644 index 00000000..5e19fa21 --- /dev/null +++ b/pt-PT/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Clica em "Experimente agora". + +3 +00:00:15,560 --> 00:00:20,560 +Adiciona um novo projeto com o nome "Linguagem Extraterrestre". + +4 +00:00:20,560 --> 00:00:28,280 +Define o tipo de projeto para "reconhecer sons", +e armazenar "no teu navegador". + +5 +00:00:28,280 --> 00:00:34,840 +Cria o projeto, depois +clica no título do projeto. + +6 +00:00:34,840 --> 00:00:40,000 +Agora, clica em "Treinar". + diff --git a/pt-PT/resources/NEW Alien 2.mp4 b/pt-PT/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/pt-PT/resources/NEW Alien 2.mp4 differ diff --git a/pt-PT/resources/NEW Alien 2.srt b/pt-PT/resources/NEW Alien 2.srt new file mode 100644 index 00000000..dd1e3a48 --- /dev/null +++ b/pt-PT/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Permite que o site aceda +ao teu microfone, se este te pedir. + +2 +00:00:07,160 --> 00:00:12,440 +Grava uma amostra do ruído +de fundo - basicamente, não digas nada. + +3 +00:00:12,440 --> 00:00:17,800 +Agora, repete isso até teres +oito amostras de ruído de fundo. + +4 +00:00:17,800 --> 00:00:27,040 +Adiciona um rótulo para "esquerda", e grava a tua +palavra extraterrestre inventada para "esquerda", oito vezes. + +5 +00:00:27,040 --> 00:00:38,120 +De seguida, adiciona um rótulo para "direita", e grava +outra palavra inventada, oito vezes. + diff --git a/pt-PT/resources/NEW Alien 3.mp4 b/pt-PT/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/pt-PT/resources/NEW Alien 3.mp4 differ diff --git a/pt-PT/resources/NEW Alien 3.srt b/pt-PT/resources/NEW Alien 3.srt new file mode 100644 index 00000000..6d69080d --- /dev/null +++ b/pt-PT/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Clica em "Voltar" e depois clica em "Aprendizagem & Teste". + +2 +00:00:11,320 --> 00:00:15,520 +Está na hora de treinar o teu modelo! + +3 +00:00:15,520 --> 00:00:19,160 +Testa o modelo ao dizer uma das tuas palavras: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/pt-PT/resources/NEW Alien 4.mp4 b/pt-PT/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/pt-PT/resources/NEW Alien 4.mp4 differ diff --git a/pt-PT/resources/NEW Alien 4.srt b/pt-PT/resources/NEW Alien 4.srt new file mode 100644 index 00000000..7fd8ea69 --- /dev/null +++ b/pt-PT/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Agora clica em "Voltar" outra vez, e +desta vez escolhe "Fazer". + +2 +00:00:08,640 --> 00:00:14,160 +Vamos usar o modelo no Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Acede a "Project templates" e seleciona +o template para "Linguagem Extraterrestre". + +4 +00:00:21,920 --> 00:00:24,360 +Algum código foi adicionado para ti. + +5 +00:00:24,360 --> 00:00:29,960 +Arrasta os blocos de código para fazer +com que o extraterrestre se mova quando falas. + +6 +00:00:36,800 --> 00:00:40,800 +Vamos testar. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Uau! + diff --git a/pt-PT/resources/readme.txt b/pt-PT/resources/readme.txt new file mode 100644 index 00000000..6da75e7a --- /dev/null +++ b/pt-PT/resources/readme.txt @@ -0,0 +1 @@ +Para assistir a um vídeo com legendas no VLC (videolan.org), certifica-te de que o arquivo do vídeo e o ficheiro das legendas está na mesma pasta e que tenham o mesmo nome (por ex.: video.mp4 e video.srt). Abre o vídeo no VLC, que ele vai carregar automaticamente as legendas. Se as legendas não aparecerem, clica com o lado direito do rato na tela do vídeo, vai a **Legendas**, depois **Adicionar Ficheiro de Legenda**, e seleciona o ficheiro .srt correto. Diverte-te a assistir com legendas! \ No newline at end of file diff --git a/pt-PT/step_1.md b/pt-PT/step_1.md index c490131c..044e45f5 100644 --- a/pt-PT/step_1.md +++ b/pt-PT/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## O que vais fazer -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Treina um modelo de machine learning para reconhecer linguagem extraterrestre e usá-la no Scratch para controlar um extraterrestre. -### What you will make +Vais precisar de um **microfone**. -\--- no-print \--- +![Um extraterrestre a mover-se para a esquerda e para a direita com os comandos Eek e Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Onde ficam guardadas as minhas gravações de voz? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- Este projeto usa uma tecnologia chamada 'machine learning'. Os sistemas de machine learning são treinados com uma grande quantidade de dados. +- Este projeto não exige que cries uma conta ou faças login. Para este projeto, os exemplos que usas para fazer o modelo são armazenados temporariamente no teu navegador (apenas na tua máquina). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: Não tens Youtube? Descarrega estes vídeos! --- -+ A computer with a microphone +Podes [descarregar todos os vídeos para este projeto](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: Licença --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +Este projeto possui uma licença dupla abrigo da [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} e da [Apache License Versão 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +Gostaríamos de agradecer a Dale da machinelearningforkids.co.uk por todo o seu trabalho neste projeto. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/pt-PT/step_2.md b/pt-PT/step_2.md index 5954228f..7e204d37 100644 --- a/pt-PT/step_2.md +++ b/pt-PT/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Prepara o teu projeto -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Vai para [https://machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} num navegador web. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Clica em **Começar**. -\--- /task \--- ++ Clica em **Experimente agora**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Clica em **Projetos** na barra do menu na parte superior. + ++ Clica no botão **+ Adicionar um novo projeto**. + ++ Dá nome ao teu projeto `Linguagem extraterrestre` e configura-o para aprender a reconhecer **sons**, e armazenar os dados **no teu navegador web**. E clica em **Criar**. ![Criar um projeto](images/create-project.png) + ++ Agora, deves ver 'Linguagem Extraterrestre' na tua lista de projetos. Clica no projeto. ![Lista de projetos com linguagem extraterrestre publicada](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Clica no botão **Treinar**. ![Menu principal do projeto com uma seta a apontar para o botão de treinar](images/project-train.png) + ++ Se vires uma mensagem pop-up a pedir permissão para usar o microfone, clica em **Permitir em todas as visitas**. + +![Pop-up a pedir que dês permissão ao microfone, com uma seta a apontar para permitir em todas as visitas](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/pt-PT/step_3.md b/pt-PT/step_3.md index 1421a334..672cb834 100644 --- a/pt-PT/step_3.md +++ b/pt-PT/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Inventa duas palavras -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +Primeiro, vais recolher amostras do ruído de fundo. Isto vai ajudar o teu modelo de machine learning a distinguir entre os sons que o vais treinar a reconhecer e o ruído de fundo do local onde estás. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Clica no botão **+ Adicionar exemplos** em **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Clica no microfone, mas não digas nada. Grava 2 segundos de ruído de fundo. ![Seta a apontar para o botão do microfone](images/record-button.png) -+ Click the **Add a new project** button. ++ Clica no botão **Adicionar** para guardar a tua gravação. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repete estes passos até teres **pelo menos 8 exemplos** de ruído de fundo. ![Balde cheio com 8 exemplos de ruído de fundo](images/8-background.png) + +--- /task --- + +Inventa duas palavras extraterrestres — uma palavra que signifique "esquerda" e outra palavra que signifique "direita". + +Agora vais gravar oito exemplos de cada palavra para que o teu modelo de machine learning possa aprender a reconhecê-las. + +--- task --- + ++ Clica em **+ Adicionar um novo rótulo** no canto superior direito do ecrã e adiciona um rótulo chamado `esquerda`. + +--- /task --- + +--- task --- + ++ Clica em **+ Adicionar exemplos** na caixa para o novo rótulo `esquerda`, e grava-te a dizer a tua palavra extraterrestre para "esquerda". + ++ Repete até teres registado **pelo menos oito exemplos**. + +--- /task --- + +--- task --- + ++ Clica em **+ Adicionar um novo rótulo** para criar outro rótulo chamado `direita` e regista oito exemplos da tua palavra extraterrestre para "direita". + +--- /task --- diff --git a/pt-PT/step_4.md b/pt-PT/step_4.md index 1460a58b..09543033 100644 --- a/pt-PT/step_4.md +++ b/pt-PT/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Treina o modelo -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +Reuniste os exemplos de que precisas, e agora vais usar estes exemplos para treinar o teu modelo de machine learning. -\--- /task \--- +--- task --- -\--- task \--- ++ Clica em **< Voltar para o projeto** no canto superior esquerdo. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Clica em **Aprender & Testar**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Clica no botão chamado **Treinar um novo modelo de Machine Learning**. Isto pode levar alguns minutos até terminar. ![Seta que aponta para um botão a dizer Treinar um novo modelo de Machine Learning](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Quando o treino acabar, podes testar o quão bem o teu modelo reconhece as palavras extraterrestres que inventaste. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Clica no botão **Começar a ouvir** e diz a tua palavra extraterrestre para "esquerda". -\--- task \--- +Se o teu modelo de machine learning a reconhecer, vai exibir a previsão do que disseste. ![Seta que aponta para o botão de começar a ouvir](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Testa se o modelo também reconhece a tua palavra extraterrestre para "direita". -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +Se não ficares satisfeito com o funcionamento do modelo, volta à página **Treinar** e adiciona mais exemplos, depois treina o modelo outra vez. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/pt-PT/step_5.md b/pt-PT/step_5.md index ad5d0c1f..9430ebef 100644 --- a/pt-PT/step_5.md +++ b/pt-PT/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Controla o extraterrestre -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Agora que o teu modelo consegue distinguir as palavras, podes usá-lo no programa Scratch para movimentar o extraterrestre. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Clica no link **< Voltar para o projeto**. -\--- /task \--- ++ Clica em **Fazer**. + ++ Clica em **Scratch 3**. + ++ Clica em **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Clica em **Project templates** na parte superior e seleciona o projeto 'Alien language' para carregar o ator extraterrestre, que já tem algum código adicionado. + +![O projeto de linguagem extraterrestre é selecionado nos "templates" do Scratch](images/alien-language.png) + +--- /task --- + +Machine learning for Kids adicionou alguns blocos especiais ao Scratch para permitir que utilizes o modelo que acabaste de treinar. Este modelo de projeto contém também blocos especiais 'walk left' e 'walk right' dentro de "Os Meus Blocos". Encontras ambos na última parte da lista de blocos. + +![Os blocos da linguagem extraterrestre estão presentes no menu, abaixo de Os meus Blocos e Imagens](images/new-blocks.png) + +--- task --- + ++ Certifica-te que tens o ator **Extraterrestre** selecionado, depois clica no separador **Código** e adiciona este código. (Mantém o código que já existe!) ![Adiciona código para controlar o extraterrestre: Quando a bandeira for clicada, começa a ouvir. Quando eu ouvir "esquerda", diz "esquerda" e anda para a esquerda. Quando eu ouvir "direita", diz "direita" e anda para a direita.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Clica na **bandeira verde** e diz as tuas palavras extraterrestres para "esquerda" e "direita". Verifica se o extraterrestre se move na direção que estás à espera. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/pt-PT/step_6.md b/pt-PT/step_6.md index 0fe36309..0f23f6d1 100644 --- a/pt-PT/step_6.md +++ b/pt-PT/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Desafio -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move para cima e para baixo**: Volta ao teu modelo e adiciona mais dois rótulos para "cima" e "baixo", depois modifica o teu código Scratch, para que possas mover o extraterrestre em todas as quatro direções. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/pt-PT/step_7.md b/pt-PT/step_7.md index 043d77a9..0e0cb72b 100644 --- a/pt-PT/step_7.md +++ b/pt-PT/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## O que se segue? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +Existem muitos outros projetos de machine learning e IA em [Machine learning com Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning). diff --git a/ro-RO/images/8-background-annotated.png b/ro-RO/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/ro-RO/images/8-background-annotated.png and b/ro-RO/images/8-background-annotated.png differ diff --git a/ro-RO/images/8-background.png b/ro-RO/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/ro-RO/images/8-background.png and b/ro-RO/images/8-background.png differ diff --git a/ro-RO/images/8-left.png b/ro-RO/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/ro-RO/images/8-left.png and b/ro-RO/images/8-left.png differ diff --git a/ro-RO/images/8-right-annotated.png b/ro-RO/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/ro-RO/images/8-right-annotated.png and b/ro-RO/images/8-right-annotated.png differ diff --git a/ro-RO/images/8-right.png b/ro-RO/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/ro-RO/images/8-right.png and b/ro-RO/images/8-right.png differ diff --git a/ro-RO/images/add-example-annotated.png b/ro-RO/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/ro-RO/images/add-example-annotated.png and b/ro-RO/images/add-example-annotated.png differ diff --git a/ro-RO/images/alien-language.png b/ro-RO/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/ro-RO/images/alien-language.png differ diff --git a/ro-RO/images/allow-microphone.png b/ro-RO/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/ro-RO/images/allow-microphone.png differ diff --git a/ro-RO/images/background-noise-annotated.png b/ro-RO/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/ro-RO/images/background-noise-annotated.png and b/ro-RO/images/background-noise-annotated.png differ diff --git a/ro-RO/images/background-noise.png b/ro-RO/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/ro-RO/images/background-noise.png and b/ro-RO/images/background-noise.png differ diff --git a/ro-RO/images/click-train.png b/ro-RO/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/ro-RO/images/click-train.png and b/ro-RO/images/click-train.png differ diff --git a/ro-RO/images/control-alien-blocks.png b/ro-RO/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/ro-RO/images/control-alien-blocks.png differ diff --git a/ro-RO/images/create-project.png b/ro-RO/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/ro-RO/images/create-project.png differ diff --git a/ro-RO/images/create.png b/ro-RO/images/create.png index 16d02d79..2283d747 100644 Binary files a/ro-RO/images/create.png and b/ro-RO/images/create.png differ diff --git a/ro-RO/images/extensions-annotated.png b/ro-RO/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/ro-RO/images/extensions-annotated.png and b/ro-RO/images/extensions-annotated.png differ diff --git a/ro-RO/images/learn-test-annotated.png b/ro-RO/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/ro-RO/images/learn-test-annotated.png and b/ro-RO/images/learn-test-annotated.png differ diff --git a/ro-RO/images/left-empty-annotated.png b/ro-RO/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/ro-RO/images/left-empty-annotated.png and b/ro-RO/images/left-empty-annotated.png differ diff --git a/ro-RO/images/make-annotated.png b/ro-RO/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/ro-RO/images/make-annotated.png and b/ro-RO/images/make-annotated.png differ diff --git a/ro-RO/images/new-blocks.png b/ro-RO/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/ro-RO/images/new-blocks.png differ diff --git a/ro-RO/images/project-train.png b/ro-RO/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/ro-RO/images/project-train.png differ diff --git a/ro-RO/images/projects-list.png b/ro-RO/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/ro-RO/images/projects-list.png differ diff --git a/ro-RO/images/record-button.png b/ro-RO/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/ro-RO/images/record-button.png differ diff --git a/ro-RO/images/save-example-annotated.png b/ro-RO/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/ro-RO/images/save-example-annotated.png and b/ro-RO/images/save-example-annotated.png differ diff --git a/ro-RO/images/start-listening-annotated.png b/ro-RO/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/ro-RO/images/start-listening-annotated.png and b/ro-RO/images/start-listening-annotated.png differ diff --git a/ro-RO/images/test-your-model.png b/ro-RO/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/ro-RO/images/test-your-model.png differ diff --git a/ro-RO/images/train-annotated.png b/ro-RO/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/ro-RO/images/train-annotated.png and b/ro-RO/images/train-annotated.png differ diff --git a/ro-RO/images/train-new-model.png b/ro-RO/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/ro-RO/images/train-new-model.png differ diff --git a/ro-RO/images/whatyouwillmake.gif b/ro-RO/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/ro-RO/images/whatyouwillmake.gif differ diff --git a/ro-RO/meta.yml b/ro-RO/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/ro-RO/meta.yml +++ b/ro-RO/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/ro-RO/resources/NEW Alien 1.mp4 b/ro-RO/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/ro-RO/resources/NEW Alien 1.mp4 differ diff --git a/ro-RO/resources/NEW Alien 1.srt b/ro-RO/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/ro-RO/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/ro-RO/resources/NEW Alien 2.mp4 b/ro-RO/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/ro-RO/resources/NEW Alien 2.mp4 differ diff --git a/ro-RO/resources/NEW Alien 2.srt b/ro-RO/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/ro-RO/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/ro-RO/resources/NEW Alien 3.mp4 b/ro-RO/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/ro-RO/resources/NEW Alien 3.mp4 differ diff --git a/ro-RO/resources/NEW Alien 3.srt b/ro-RO/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/ro-RO/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/ro-RO/resources/NEW Alien 4.mp4 b/ro-RO/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/ro-RO/resources/NEW Alien 4.mp4 differ diff --git a/ro-RO/resources/NEW Alien 4.srt b/ro-RO/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/ro-RO/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/ro-RO/resources/readme.txt b/ro-RO/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/ro-RO/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/ro-RO/step_1.md b/ro-RO/step_1.md index c490131c..aa0540f2 100644 --- a/ro-RO/step_1.md +++ b/ro-RO/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/ro-RO/step_2.md b/ro-RO/step_2.md index 5954228f..e6930402 100644 --- a/ro-RO/step_2.md +++ b/ro-RO/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/ro-RO/step_3.md b/ro-RO/step_3.md index 1421a334..bf9eb8ee 100644 --- a/ro-RO/step_3.md +++ b/ro-RO/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/ro-RO/step_4.md b/ro-RO/step_4.md index 1460a58b..785b11b0 100644 --- a/ro-RO/step_4.md +++ b/ro-RO/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/ro-RO/step_5.md b/ro-RO/step_5.md index ad5d0c1f..c361be8e 100644 --- a/ro-RO/step_5.md +++ b/ro-RO/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/ro-RO/step_6.md b/ro-RO/step_6.md index 0fe36309..6ca94946 100644 --- a/ro-RO/step_6.md +++ b/ro-RO/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/ro-RO/step_7.md b/ro-RO/step_7.md index 043d77a9..d4b22e96 100644 --- a/ro-RO/step_7.md +++ b/ro-RO/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/ru-RU/images/8-background-annotated.png b/ru-RU/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/ru-RU/images/8-background-annotated.png and b/ru-RU/images/8-background-annotated.png differ diff --git a/ru-RU/images/8-background.png b/ru-RU/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/ru-RU/images/8-background.png and b/ru-RU/images/8-background.png differ diff --git a/ru-RU/images/8-left.png b/ru-RU/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/ru-RU/images/8-left.png and b/ru-RU/images/8-left.png differ diff --git a/ru-RU/images/8-right-annotated.png b/ru-RU/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/ru-RU/images/8-right-annotated.png and b/ru-RU/images/8-right-annotated.png differ diff --git a/ru-RU/images/8-right.png b/ru-RU/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/ru-RU/images/8-right.png and b/ru-RU/images/8-right.png differ diff --git a/ru-RU/images/add-example-annotated.png b/ru-RU/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/ru-RU/images/add-example-annotated.png and b/ru-RU/images/add-example-annotated.png differ diff --git a/ru-RU/images/alien-language.png b/ru-RU/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/ru-RU/images/alien-language.png differ diff --git a/ru-RU/images/allow-microphone.png b/ru-RU/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/ru-RU/images/allow-microphone.png differ diff --git a/ru-RU/images/background-noise-annotated.png b/ru-RU/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/ru-RU/images/background-noise-annotated.png and b/ru-RU/images/background-noise-annotated.png differ diff --git a/ru-RU/images/background-noise.png b/ru-RU/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/ru-RU/images/background-noise.png and b/ru-RU/images/background-noise.png differ diff --git a/ru-RU/images/click-train.png b/ru-RU/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/ru-RU/images/click-train.png and b/ru-RU/images/click-train.png differ diff --git a/ru-RU/images/control-alien-blocks.png b/ru-RU/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/ru-RU/images/control-alien-blocks.png differ diff --git a/ru-RU/images/create-project.png b/ru-RU/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/ru-RU/images/create-project.png differ diff --git a/ru-RU/images/create.png b/ru-RU/images/create.png index 16d02d79..2283d747 100644 Binary files a/ru-RU/images/create.png and b/ru-RU/images/create.png differ diff --git a/ru-RU/images/extensions-annotated.png b/ru-RU/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/ru-RU/images/extensions-annotated.png and b/ru-RU/images/extensions-annotated.png differ diff --git a/ru-RU/images/learn-test-annotated.png b/ru-RU/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/ru-RU/images/learn-test-annotated.png and b/ru-RU/images/learn-test-annotated.png differ diff --git a/ru-RU/images/left-empty-annotated.png b/ru-RU/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/ru-RU/images/left-empty-annotated.png and b/ru-RU/images/left-empty-annotated.png differ diff --git a/ru-RU/images/make-annotated.png b/ru-RU/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/ru-RU/images/make-annotated.png and b/ru-RU/images/make-annotated.png differ diff --git a/ru-RU/images/new-blocks.png b/ru-RU/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/ru-RU/images/new-blocks.png differ diff --git a/ru-RU/images/project-train.png b/ru-RU/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/ru-RU/images/project-train.png differ diff --git a/ru-RU/images/projects-list.png b/ru-RU/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/ru-RU/images/projects-list.png differ diff --git a/ru-RU/images/record-button.png b/ru-RU/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/ru-RU/images/record-button.png differ diff --git a/ru-RU/images/save-example-annotated.png b/ru-RU/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/ru-RU/images/save-example-annotated.png and b/ru-RU/images/save-example-annotated.png differ diff --git a/ru-RU/images/start-listening-annotated.png b/ru-RU/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/ru-RU/images/start-listening-annotated.png and b/ru-RU/images/start-listening-annotated.png differ diff --git a/ru-RU/images/test-your-model.png b/ru-RU/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/ru-RU/images/test-your-model.png differ diff --git a/ru-RU/images/train-annotated.png b/ru-RU/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/ru-RU/images/train-annotated.png and b/ru-RU/images/train-annotated.png differ diff --git a/ru-RU/images/train-new-model.png b/ru-RU/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/ru-RU/images/train-new-model.png differ diff --git a/ru-RU/images/whatyouwillmake.gif b/ru-RU/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/ru-RU/images/whatyouwillmake.gif differ diff --git a/ru-RU/meta.yml b/ru-RU/meta.yml index 5e7aa1ea..d319a52e 100644 --- a/ru-RU/meta.yml +++ b/ru-RU/meta.yml @@ -8,22 +8,26 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - title: What next? + title: What can you do now? + completion: + - external diff --git a/ru-RU/resources/NEW Alien 1.mp4 b/ru-RU/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/ru-RU/resources/NEW Alien 1.mp4 differ diff --git a/ru-RU/resources/NEW Alien 1.srt b/ru-RU/resources/NEW Alien 1.srt new file mode 100644 index 00000000..d7f69ddd --- /dev/null +++ b/ru-RU/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ML4K and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/ru-RU/resources/NEW Alien 2.mp4 b/ru-RU/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/ru-RU/resources/NEW Alien 2.mp4 differ diff --git a/ru-RU/resources/NEW Alien 2.srt b/ru-RU/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/ru-RU/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/ru-RU/resources/NEW Alien 3.mp4 b/ru-RU/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/ru-RU/resources/NEW Alien 3.mp4 differ diff --git a/ru-RU/resources/NEW Alien 3.srt b/ru-RU/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/ru-RU/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/ru-RU/resources/NEW Alien 4.mp4 b/ru-RU/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/ru-RU/resources/NEW Alien 4.mp4 differ diff --git a/ru-RU/resources/NEW Alien 4.srt b/ru-RU/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/ru-RU/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/ru-RU/resources/readme.txt b/ru-RU/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/ru-RU/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/ru-RU/step_1.md b/ru-RU/step_1.md index c490131c..aa0540f2 100644 --- a/ru-RU/step_1.md +++ b/ru-RU/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/ru-RU/step_2.md b/ru-RU/step_2.md index 5954228f..21547d7a 100644 --- a/ru-RU/step_2.md +++ b/ru-RU/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/ru-RU/step_3.md b/ru-RU/step_3.md index 1421a334..bf9eb8ee 100644 --- a/ru-RU/step_3.md +++ b/ru-RU/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/ru-RU/step_4.md b/ru-RU/step_4.md index 1460a58b..785b11b0 100644 --- a/ru-RU/step_4.md +++ b/ru-RU/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/ru-RU/step_5.md b/ru-RU/step_5.md index ad5d0c1f..c361be8e 100644 --- a/ru-RU/step_5.md +++ b/ru-RU/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/ru-RU/step_6.md b/ru-RU/step_6.md index 0fe36309..6ca94946 100644 --- a/ru-RU/step_6.md +++ b/ru-RU/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/ru-RU/step_7.md b/ru-RU/step_7.md index 043d77a9..d4b22e96 100644 --- a/ru-RU/step_7.md +++ b/ru-RU/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/sr-SP/images/8-background-annotated.png b/sr-SP/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/sr-SP/images/8-background-annotated.png and b/sr-SP/images/8-background-annotated.png differ diff --git a/sr-SP/images/8-background.png b/sr-SP/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/sr-SP/images/8-background.png and b/sr-SP/images/8-background.png differ diff --git a/sr-SP/images/8-left.png b/sr-SP/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/sr-SP/images/8-left.png and b/sr-SP/images/8-left.png differ diff --git a/sr-SP/images/8-right-annotated.png b/sr-SP/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/sr-SP/images/8-right-annotated.png and b/sr-SP/images/8-right-annotated.png differ diff --git a/sr-SP/images/8-right.png b/sr-SP/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/sr-SP/images/8-right.png and b/sr-SP/images/8-right.png differ diff --git a/sr-SP/images/add-example-annotated.png b/sr-SP/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/sr-SP/images/add-example-annotated.png and b/sr-SP/images/add-example-annotated.png differ diff --git a/sr-SP/images/alien-language.png b/sr-SP/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/sr-SP/images/alien-language.png differ diff --git a/sr-SP/images/allow-microphone.png b/sr-SP/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/sr-SP/images/allow-microphone.png differ diff --git a/sr-SP/images/background-noise-annotated.png b/sr-SP/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/sr-SP/images/background-noise-annotated.png and b/sr-SP/images/background-noise-annotated.png differ diff --git a/sr-SP/images/background-noise.png b/sr-SP/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/sr-SP/images/background-noise.png and b/sr-SP/images/background-noise.png differ diff --git a/sr-SP/images/click-train.png b/sr-SP/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/sr-SP/images/click-train.png and b/sr-SP/images/click-train.png differ diff --git a/sr-SP/images/control-alien-blocks.png b/sr-SP/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/sr-SP/images/control-alien-blocks.png differ diff --git a/sr-SP/images/create-project.png b/sr-SP/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/sr-SP/images/create-project.png differ diff --git a/sr-SP/images/create.png b/sr-SP/images/create.png index 16d02d79..2283d747 100644 Binary files a/sr-SP/images/create.png and b/sr-SP/images/create.png differ diff --git a/sr-SP/images/extensions-annotated.png b/sr-SP/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/sr-SP/images/extensions-annotated.png and b/sr-SP/images/extensions-annotated.png differ diff --git a/sr-SP/images/learn-test-annotated.png b/sr-SP/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/sr-SP/images/learn-test-annotated.png and b/sr-SP/images/learn-test-annotated.png differ diff --git a/sr-SP/images/left-empty-annotated.png b/sr-SP/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/sr-SP/images/left-empty-annotated.png and b/sr-SP/images/left-empty-annotated.png differ diff --git a/sr-SP/images/make-annotated.png b/sr-SP/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/sr-SP/images/make-annotated.png and b/sr-SP/images/make-annotated.png differ diff --git a/sr-SP/images/new-blocks.png b/sr-SP/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/sr-SP/images/new-blocks.png differ diff --git a/sr-SP/images/project-train.png b/sr-SP/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/sr-SP/images/project-train.png differ diff --git a/sr-SP/images/projects-list.png b/sr-SP/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/sr-SP/images/projects-list.png differ diff --git a/sr-SP/images/record-button.png b/sr-SP/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/sr-SP/images/record-button.png differ diff --git a/sr-SP/images/save-example-annotated.png b/sr-SP/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/sr-SP/images/save-example-annotated.png and b/sr-SP/images/save-example-annotated.png differ diff --git a/sr-SP/images/start-listening-annotated.png b/sr-SP/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/sr-SP/images/start-listening-annotated.png and b/sr-SP/images/start-listening-annotated.png differ diff --git a/sr-SP/images/test-your-model.png b/sr-SP/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/sr-SP/images/test-your-model.png differ diff --git a/sr-SP/images/train-annotated.png b/sr-SP/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/sr-SP/images/train-annotated.png and b/sr-SP/images/train-annotated.png differ diff --git a/sr-SP/images/train-new-model.png b/sr-SP/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/sr-SP/images/train-new-model.png differ diff --git a/sr-SP/images/whatyouwillmake.gif b/sr-SP/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/sr-SP/images/whatyouwillmake.gif differ diff --git a/sr-SP/meta.yml b/sr-SP/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/sr-SP/meta.yml +++ b/sr-SP/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/sr-SP/resources/NEW Alien 1.mp4 b/sr-SP/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/sr-SP/resources/NEW Alien 1.mp4 differ diff --git a/sr-SP/resources/NEW Alien 1.srt b/sr-SP/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/sr-SP/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/sr-SP/resources/NEW Alien 2.mp4 b/sr-SP/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/sr-SP/resources/NEW Alien 2.mp4 differ diff --git a/sr-SP/resources/NEW Alien 2.srt b/sr-SP/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/sr-SP/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/sr-SP/resources/NEW Alien 3.mp4 b/sr-SP/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/sr-SP/resources/NEW Alien 3.mp4 differ diff --git a/sr-SP/resources/NEW Alien 3.srt b/sr-SP/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/sr-SP/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/sr-SP/resources/NEW Alien 4.mp4 b/sr-SP/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/sr-SP/resources/NEW Alien 4.mp4 differ diff --git a/sr-SP/resources/NEW Alien 4.srt b/sr-SP/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/sr-SP/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/sr-SP/resources/readme.txt b/sr-SP/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/sr-SP/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/sr-SP/step_1.md b/sr-SP/step_1.md index c490131c..aa0540f2 100644 --- a/sr-SP/step_1.md +++ b/sr-SP/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/sr-SP/step_2.md b/sr-SP/step_2.md index 5954228f..e6930402 100644 --- a/sr-SP/step_2.md +++ b/sr-SP/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/sr-SP/step_3.md b/sr-SP/step_3.md index 1421a334..bf9eb8ee 100644 --- a/sr-SP/step_3.md +++ b/sr-SP/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/sr-SP/step_4.md b/sr-SP/step_4.md index 1460a58b..785b11b0 100644 --- a/sr-SP/step_4.md +++ b/sr-SP/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/sr-SP/step_5.md b/sr-SP/step_5.md index ad5d0c1f..c361be8e 100644 --- a/sr-SP/step_5.md +++ b/sr-SP/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/sr-SP/step_6.md b/sr-SP/step_6.md index 0fe36309..6ca94946 100644 --- a/sr-SP/step_6.md +++ b/sr-SP/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/sr-SP/step_7.md b/sr-SP/step_7.md index 043d77a9..d4b22e96 100644 --- a/sr-SP/step_7.md +++ b/sr-SP/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/sv-SE/images/8-background-annotated.png b/sv-SE/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/sv-SE/images/8-background-annotated.png and b/sv-SE/images/8-background-annotated.png differ diff --git a/sv-SE/images/8-background.png b/sv-SE/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/sv-SE/images/8-background.png and b/sv-SE/images/8-background.png differ diff --git a/sv-SE/images/8-left.png b/sv-SE/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/sv-SE/images/8-left.png and b/sv-SE/images/8-left.png differ diff --git a/sv-SE/images/8-right-annotated.png b/sv-SE/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/sv-SE/images/8-right-annotated.png and b/sv-SE/images/8-right-annotated.png differ diff --git a/sv-SE/images/8-right.png b/sv-SE/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/sv-SE/images/8-right.png and b/sv-SE/images/8-right.png differ diff --git a/sv-SE/images/add-example-annotated.png b/sv-SE/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/sv-SE/images/add-example-annotated.png and b/sv-SE/images/add-example-annotated.png differ diff --git a/sv-SE/images/alien-language.png b/sv-SE/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/sv-SE/images/alien-language.png differ diff --git a/sv-SE/images/allow-microphone.png b/sv-SE/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/sv-SE/images/allow-microphone.png differ diff --git a/sv-SE/images/background-noise-annotated.png b/sv-SE/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/sv-SE/images/background-noise-annotated.png and b/sv-SE/images/background-noise-annotated.png differ diff --git a/sv-SE/images/background-noise.png b/sv-SE/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/sv-SE/images/background-noise.png and b/sv-SE/images/background-noise.png differ diff --git a/sv-SE/images/click-train.png b/sv-SE/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/sv-SE/images/click-train.png and b/sv-SE/images/click-train.png differ diff --git a/sv-SE/images/control-alien-blocks.png b/sv-SE/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/sv-SE/images/control-alien-blocks.png differ diff --git a/sv-SE/images/create-project.png b/sv-SE/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/sv-SE/images/create-project.png differ diff --git a/sv-SE/images/create.png b/sv-SE/images/create.png index 16d02d79..2283d747 100644 Binary files a/sv-SE/images/create.png and b/sv-SE/images/create.png differ diff --git a/sv-SE/images/extensions-annotated.png b/sv-SE/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/sv-SE/images/extensions-annotated.png and b/sv-SE/images/extensions-annotated.png differ diff --git a/sv-SE/images/learn-test-annotated.png b/sv-SE/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/sv-SE/images/learn-test-annotated.png and b/sv-SE/images/learn-test-annotated.png differ diff --git a/sv-SE/images/left-empty-annotated.png b/sv-SE/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/sv-SE/images/left-empty-annotated.png and b/sv-SE/images/left-empty-annotated.png differ diff --git a/sv-SE/images/make-annotated.png b/sv-SE/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/sv-SE/images/make-annotated.png and b/sv-SE/images/make-annotated.png differ diff --git a/sv-SE/images/new-blocks.png b/sv-SE/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/sv-SE/images/new-blocks.png differ diff --git a/sv-SE/images/project-train.png b/sv-SE/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/sv-SE/images/project-train.png differ diff --git a/sv-SE/images/projects-list.png b/sv-SE/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/sv-SE/images/projects-list.png differ diff --git a/sv-SE/images/record-button.png b/sv-SE/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/sv-SE/images/record-button.png differ diff --git a/sv-SE/images/save-example-annotated.png b/sv-SE/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/sv-SE/images/save-example-annotated.png and b/sv-SE/images/save-example-annotated.png differ diff --git a/sv-SE/images/start-listening-annotated.png b/sv-SE/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/sv-SE/images/start-listening-annotated.png and b/sv-SE/images/start-listening-annotated.png differ diff --git a/sv-SE/images/test-your-model.png b/sv-SE/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/sv-SE/images/test-your-model.png differ diff --git a/sv-SE/images/train-annotated.png b/sv-SE/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/sv-SE/images/train-annotated.png and b/sv-SE/images/train-annotated.png differ diff --git a/sv-SE/images/train-new-model.png b/sv-SE/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/sv-SE/images/train-new-model.png differ diff --git a/sv-SE/images/whatyouwillmake.gif b/sv-SE/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/sv-SE/images/whatyouwillmake.gif differ diff --git a/sv-SE/meta.yml b/sv-SE/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/sv-SE/meta.yml +++ b/sv-SE/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/sv-SE/resources/NEW Alien 1.mp4 b/sv-SE/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/sv-SE/resources/NEW Alien 1.mp4 differ diff --git a/sv-SE/resources/NEW Alien 1.srt b/sv-SE/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/sv-SE/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/sv-SE/resources/NEW Alien 2.mp4 b/sv-SE/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/sv-SE/resources/NEW Alien 2.mp4 differ diff --git a/sv-SE/resources/NEW Alien 2.srt b/sv-SE/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/sv-SE/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/sv-SE/resources/NEW Alien 3.mp4 b/sv-SE/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/sv-SE/resources/NEW Alien 3.mp4 differ diff --git a/sv-SE/resources/NEW Alien 3.srt b/sv-SE/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/sv-SE/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/sv-SE/resources/NEW Alien 4.mp4 b/sv-SE/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/sv-SE/resources/NEW Alien 4.mp4 differ diff --git a/sv-SE/resources/NEW Alien 4.srt b/sv-SE/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/sv-SE/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/sv-SE/resources/readme.txt b/sv-SE/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/sv-SE/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/sv-SE/step_1.md b/sv-SE/step_1.md index c490131c..aa0540f2 100644 --- a/sv-SE/step_1.md +++ b/sv-SE/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/sv-SE/step_2.md b/sv-SE/step_2.md index 5954228f..e6930402 100644 --- a/sv-SE/step_2.md +++ b/sv-SE/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/sv-SE/step_3.md b/sv-SE/step_3.md index 1421a334..bf9eb8ee 100644 --- a/sv-SE/step_3.md +++ b/sv-SE/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/sv-SE/step_4.md b/sv-SE/step_4.md index 1460a58b..785b11b0 100644 --- a/sv-SE/step_4.md +++ b/sv-SE/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/sv-SE/step_5.md b/sv-SE/step_5.md index ad5d0c1f..c361be8e 100644 --- a/sv-SE/step_5.md +++ b/sv-SE/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/sv-SE/step_6.md b/sv-SE/step_6.md index 0fe36309..6ca94946 100644 --- a/sv-SE/step_6.md +++ b/sv-SE/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/sv-SE/step_7.md b/sv-SE/step_7.md index 043d77a9..d4b22e96 100644 --- a/sv-SE/step_7.md +++ b/sv-SE/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/tr-TR/images/8-background-annotated.png b/tr-TR/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/tr-TR/images/8-background-annotated.png and b/tr-TR/images/8-background-annotated.png differ diff --git a/tr-TR/images/8-background.png b/tr-TR/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/tr-TR/images/8-background.png and b/tr-TR/images/8-background.png differ diff --git a/tr-TR/images/8-left.png b/tr-TR/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/tr-TR/images/8-left.png and b/tr-TR/images/8-left.png differ diff --git a/tr-TR/images/8-right-annotated.png b/tr-TR/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/tr-TR/images/8-right-annotated.png and b/tr-TR/images/8-right-annotated.png differ diff --git a/tr-TR/images/8-right.png b/tr-TR/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/tr-TR/images/8-right.png and b/tr-TR/images/8-right.png differ diff --git a/tr-TR/images/add-example-annotated.png b/tr-TR/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/tr-TR/images/add-example-annotated.png and b/tr-TR/images/add-example-annotated.png differ diff --git a/tr-TR/images/alien-language.png b/tr-TR/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/tr-TR/images/alien-language.png differ diff --git a/tr-TR/images/allow-microphone.png b/tr-TR/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/tr-TR/images/allow-microphone.png differ diff --git a/tr-TR/images/background-noise-annotated.png b/tr-TR/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/tr-TR/images/background-noise-annotated.png and b/tr-TR/images/background-noise-annotated.png differ diff --git a/tr-TR/images/background-noise.png b/tr-TR/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/tr-TR/images/background-noise.png and b/tr-TR/images/background-noise.png differ diff --git a/tr-TR/images/click-train.png b/tr-TR/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/tr-TR/images/click-train.png and b/tr-TR/images/click-train.png differ diff --git a/tr-TR/images/control-alien-blocks.png b/tr-TR/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/tr-TR/images/control-alien-blocks.png differ diff --git a/tr-TR/images/create-project.png b/tr-TR/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/tr-TR/images/create-project.png differ diff --git a/tr-TR/images/create.png b/tr-TR/images/create.png index 16d02d79..2283d747 100644 Binary files a/tr-TR/images/create.png and b/tr-TR/images/create.png differ diff --git a/tr-TR/images/extensions-annotated.png b/tr-TR/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/tr-TR/images/extensions-annotated.png and b/tr-TR/images/extensions-annotated.png differ diff --git a/tr-TR/images/learn-test-annotated.png b/tr-TR/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/tr-TR/images/learn-test-annotated.png and b/tr-TR/images/learn-test-annotated.png differ diff --git a/tr-TR/images/left-empty-annotated.png b/tr-TR/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/tr-TR/images/left-empty-annotated.png and b/tr-TR/images/left-empty-annotated.png differ diff --git a/tr-TR/images/make-annotated.png b/tr-TR/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/tr-TR/images/make-annotated.png and b/tr-TR/images/make-annotated.png differ diff --git a/tr-TR/images/new-blocks.png b/tr-TR/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/tr-TR/images/new-blocks.png differ diff --git a/tr-TR/images/project-train.png b/tr-TR/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/tr-TR/images/project-train.png differ diff --git a/tr-TR/images/projects-list.png b/tr-TR/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/tr-TR/images/projects-list.png differ diff --git a/tr-TR/images/record-button.png b/tr-TR/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/tr-TR/images/record-button.png differ diff --git a/tr-TR/images/save-example-annotated.png b/tr-TR/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/tr-TR/images/save-example-annotated.png and b/tr-TR/images/save-example-annotated.png differ diff --git a/tr-TR/images/start-listening-annotated.png b/tr-TR/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/tr-TR/images/start-listening-annotated.png and b/tr-TR/images/start-listening-annotated.png differ diff --git a/tr-TR/images/test-your-model.png b/tr-TR/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/tr-TR/images/test-your-model.png differ diff --git a/tr-TR/images/train-annotated.png b/tr-TR/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/tr-TR/images/train-annotated.png and b/tr-TR/images/train-annotated.png differ diff --git a/tr-TR/images/train-new-model.png b/tr-TR/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/tr-TR/images/train-new-model.png differ diff --git a/tr-TR/images/whatyouwillmake.gif b/tr-TR/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/tr-TR/images/whatyouwillmake.gif differ diff --git a/tr-TR/meta.yml b/tr-TR/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/tr-TR/meta.yml +++ b/tr-TR/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/tr-TR/resources/NEW Alien 1.mp4 b/tr-TR/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/tr-TR/resources/NEW Alien 1.mp4 differ diff --git a/tr-TR/resources/NEW Alien 1.srt b/tr-TR/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/tr-TR/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/tr-TR/resources/NEW Alien 2.mp4 b/tr-TR/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/tr-TR/resources/NEW Alien 2.mp4 differ diff --git a/tr-TR/resources/NEW Alien 2.srt b/tr-TR/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/tr-TR/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/tr-TR/resources/NEW Alien 3.mp4 b/tr-TR/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/tr-TR/resources/NEW Alien 3.mp4 differ diff --git a/tr-TR/resources/NEW Alien 3.srt b/tr-TR/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/tr-TR/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/tr-TR/resources/NEW Alien 4.mp4 b/tr-TR/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/tr-TR/resources/NEW Alien 4.mp4 differ diff --git a/tr-TR/resources/NEW Alien 4.srt b/tr-TR/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/tr-TR/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/tr-TR/resources/readme.txt b/tr-TR/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/tr-TR/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/tr-TR/step_1.md b/tr-TR/step_1.md index c490131c..aa0540f2 100644 --- a/tr-TR/step_1.md +++ b/tr-TR/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/tr-TR/step_2.md b/tr-TR/step_2.md index 5954228f..e6930402 100644 --- a/tr-TR/step_2.md +++ b/tr-TR/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/tr-TR/step_3.md b/tr-TR/step_3.md index 1421a334..bf9eb8ee 100644 --- a/tr-TR/step_3.md +++ b/tr-TR/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/tr-TR/step_4.md b/tr-TR/step_4.md index 1460a58b..785b11b0 100644 --- a/tr-TR/step_4.md +++ b/tr-TR/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/tr-TR/step_5.md b/tr-TR/step_5.md index ad5d0c1f..c361be8e 100644 --- a/tr-TR/step_5.md +++ b/tr-TR/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/tr-TR/step_6.md b/tr-TR/step_6.md index 0fe36309..6ca94946 100644 --- a/tr-TR/step_6.md +++ b/tr-TR/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/tr-TR/step_7.md b/tr-TR/step_7.md index 043d77a9..d4b22e96 100644 --- a/tr-TR/step_7.md +++ b/tr-TR/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/uk-UA/images/8-background-annotated.png b/uk-UA/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/uk-UA/images/8-background-annotated.png and b/uk-UA/images/8-background-annotated.png differ diff --git a/uk-UA/images/8-background.png b/uk-UA/images/8-background.png index 096d3169..a4ca2cb0 100644 Binary files a/uk-UA/images/8-background.png and b/uk-UA/images/8-background.png differ diff --git a/uk-UA/images/8-left.png b/uk-UA/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/uk-UA/images/8-left.png and b/uk-UA/images/8-left.png differ diff --git a/uk-UA/images/8-right-annotated.png b/uk-UA/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/uk-UA/images/8-right-annotated.png and b/uk-UA/images/8-right-annotated.png differ diff --git a/uk-UA/images/8-right.png b/uk-UA/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/uk-UA/images/8-right.png and b/uk-UA/images/8-right.png differ diff --git a/uk-UA/images/add-example-annotated.png b/uk-UA/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/uk-UA/images/add-example-annotated.png and b/uk-UA/images/add-example-annotated.png differ diff --git a/uk-UA/images/alien-language.png b/uk-UA/images/alien-language.png new file mode 100644 index 00000000..a1062049 Binary files /dev/null and b/uk-UA/images/alien-language.png differ diff --git a/uk-UA/images/allow-microphone.png b/uk-UA/images/allow-microphone.png new file mode 100644 index 00000000..5e294bd5 Binary files /dev/null and b/uk-UA/images/allow-microphone.png differ diff --git a/uk-UA/images/background-noise-annotated.png b/uk-UA/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/uk-UA/images/background-noise-annotated.png and b/uk-UA/images/background-noise-annotated.png differ diff --git a/uk-UA/images/background-noise.png b/uk-UA/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/uk-UA/images/background-noise.png and b/uk-UA/images/background-noise.png differ diff --git a/uk-UA/images/click-train.png b/uk-UA/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/uk-UA/images/click-train.png and b/uk-UA/images/click-train.png differ diff --git a/uk-UA/images/control-alien-blocks.png b/uk-UA/images/control-alien-blocks.png new file mode 100644 index 00000000..e9905a8d Binary files /dev/null and b/uk-UA/images/control-alien-blocks.png differ diff --git a/uk-UA/images/create-project.png b/uk-UA/images/create-project.png new file mode 100644 index 00000000..287ce205 Binary files /dev/null and b/uk-UA/images/create-project.png differ diff --git a/uk-UA/images/create.png b/uk-UA/images/create.png index 16d02d79..2283d747 100644 Binary files a/uk-UA/images/create.png and b/uk-UA/images/create.png differ diff --git a/uk-UA/images/extensions-annotated.png b/uk-UA/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/uk-UA/images/extensions-annotated.png and b/uk-UA/images/extensions-annotated.png differ diff --git a/uk-UA/images/learn-test-annotated.png b/uk-UA/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/uk-UA/images/learn-test-annotated.png and b/uk-UA/images/learn-test-annotated.png differ diff --git a/uk-UA/images/left-empty-annotated.png b/uk-UA/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/uk-UA/images/left-empty-annotated.png and b/uk-UA/images/left-empty-annotated.png differ diff --git a/uk-UA/images/make-annotated.png b/uk-UA/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/uk-UA/images/make-annotated.png and b/uk-UA/images/make-annotated.png differ diff --git a/uk-UA/images/new-blocks.png b/uk-UA/images/new-blocks.png new file mode 100644 index 00000000..5dfd1c5a Binary files /dev/null and b/uk-UA/images/new-blocks.png differ diff --git a/uk-UA/images/project-train.png b/uk-UA/images/project-train.png new file mode 100644 index 00000000..781971d4 Binary files /dev/null and b/uk-UA/images/project-train.png differ diff --git a/uk-UA/images/projects-list.png b/uk-UA/images/projects-list.png new file mode 100644 index 00000000..97e3b59b Binary files /dev/null and b/uk-UA/images/projects-list.png differ diff --git a/uk-UA/images/record-button.png b/uk-UA/images/record-button.png new file mode 100644 index 00000000..281a02a8 Binary files /dev/null and b/uk-UA/images/record-button.png differ diff --git a/uk-UA/images/save-example-annotated.png b/uk-UA/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/uk-UA/images/save-example-annotated.png and b/uk-UA/images/save-example-annotated.png differ diff --git a/uk-UA/images/start-listening-annotated.png b/uk-UA/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/uk-UA/images/start-listening-annotated.png and b/uk-UA/images/start-listening-annotated.png differ diff --git a/uk-UA/images/test-your-model.png b/uk-UA/images/test-your-model.png new file mode 100644 index 00000000..2fa24415 Binary files /dev/null and b/uk-UA/images/test-your-model.png differ diff --git a/uk-UA/images/train-annotated.png b/uk-UA/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/uk-UA/images/train-annotated.png and b/uk-UA/images/train-annotated.png differ diff --git a/uk-UA/images/train-new-model.png b/uk-UA/images/train-new-model.png new file mode 100644 index 00000000..296dd697 Binary files /dev/null and b/uk-UA/images/train-new-model.png differ diff --git a/uk-UA/images/whatyouwillmake.gif b/uk-UA/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/uk-UA/images/whatyouwillmake.gif differ diff --git a/uk-UA/meta.yml b/uk-UA/meta.yml index 5e7aa1ea..645356e3 100644 --- a/uk-UA/meta.yml +++ b/uk-UA/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: Мова прибульців hero_image: images/banner.png -description: Create your own alien language to move a sprite +description: Створи власну інопланетну мов для переміщення спрайту theme: orange listed: true copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: Що ти зробиш - - title: Use a pretrained model + title: Створи проєкт - - title: Create a new project + title: Вигадай два слова + completion: + - engaged - - title: Create alien words + title: Натренуй модель - - title: Train a new machine learning model + title: Контролюй інопланетянина + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Додаткове завдання' challenge: true - - - title: What next? + completion: + - external diff --git a/uk-UA/resources/NEW Alien 1.mp4 b/uk-UA/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/uk-UA/resources/NEW Alien 1.mp4 differ diff --git a/uk-UA/resources/NEW Alien 1.srt b/uk-UA/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1ccb653e --- /dev/null +++ b/uk-UA/resources/NEW Alien 1.srt @@ -0,0 +1,24 @@ +1 +00:00:04,760 --> 00:00:11,520 +Перейди на сторінку rpf.io/ml4k і натисни «Почати». + +2 +00:00:11,520 --> 00:00:15,560 +Натисни «Спробувати зараз». + +3 +00:00:15,560 --> 00:00:20,560 +Додай новий проєкт з назвою «Мова інопланетян». + +4 +00:00:20,560 --> 00:00:28,280 +Обери тип проєкту recognising sound («розпізнавання звуків») та тип сховища in your browser («у твоєму браузері»). + +5 +00:00:28,280 --> 00:00:34,840 +Створи проєкт, потім натисни на назву проєкту. + +6 +00:00:34,840 --> 00:00:40,000 +Тепер натисни на кнопку «Навчити». + diff --git a/uk-UA/resources/NEW Alien 2.mp4 b/uk-UA/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/uk-UA/resources/NEW Alien 2.mp4 differ diff --git a/uk-UA/resources/NEW Alien 2.srt b/uk-UA/resources/NEW Alien 2.srt new file mode 100644 index 00000000..97e6fe87 --- /dev/null +++ b/uk-UA/resources/NEW Alien 2.srt @@ -0,0 +1,20 @@ +1 +00:00:03,600 --> 00:00:07,160 +Дозволь сайту використовувати мікрофон, якщо він запитає. + +2 +00:00:07,160 --> 00:00:12,440 +Запиши зразок фонового шуму — просто нічого не кажи. + +3 +00:00:12,440 --> 00:00:17,800 +Повторюй, поки не матимеш вісім зразків фонового шуму. + +4 +00:00:17,800 --> 00:00:27,040 +Додай мітку для слова «ліворуч» і запиши вигадане слово мовою прибульців вісім разів. + +5 +00:00:27,040 --> 00:00:38,120 +Далі додай мітку для слова «праворуч» і запиши інше вигадане слово вісім разів. + diff --git a/uk-UA/resources/NEW Alien 3.mp4 b/uk-UA/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/uk-UA/resources/NEW Alien 3.mp4 differ diff --git a/uk-UA/resources/NEW Alien 3.srt b/uk-UA/resources/NEW Alien 3.srt new file mode 100644 index 00000000..eb0e83b4 --- /dev/null +++ b/uk-UA/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Натисни «Назад до проєкту», а потім «Дізнатися та перевірити». + +2 +00:00:11,320 --> 00:00:15,520 +Час натренувати твою модель! + +3 +00:00:15,520 --> 00:00:19,160 +Перевір модель, сказавши одне з твоїх слів: + +4 +00:00:19,160 --> 00:00:27,520 +Блуп! + diff --git a/uk-UA/resources/NEW Alien 4.mp4 b/uk-UA/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/uk-UA/resources/NEW Alien 4.mp4 differ diff --git a/uk-UA/resources/NEW Alien 4.srt b/uk-UA/resources/NEW Alien 4.srt new file mode 100644 index 00000000..9ac0c608 --- /dev/null +++ b/uk-UA/resources/NEW Alien 4.srt @@ -0,0 +1,32 @@ +1 +00:00:04,680 --> 00:00:08,640 +Тепер знову натисни «Назад до проєкту» і цього разу обери «Створити». + +2 +00:00:08,640 --> 00:00:14,160 +Використаймо модель у Скретчі! + +3 +00:00:14,160 --> 00:00:21,920 +Перейди до «Шаблонів проєктів» і вибери шаблон Alien Language («Мова інопланетян»). + +4 +00:00:21,920 --> 00:00:24,360 +Ми вже додали певний код. + +5 +00:00:24,360 --> 00:00:29,960 +Перетягни блоки коду, щоби прибулець рухався, коли ти говориш. + +6 +00:00:36,800 --> 00:00:40,800 +Перевірмо його. + +7 +00:00:40,800 --> 00:00:43,840 +Блуп! + +8 +00:00:43,840 --> 00:00:50,200 +Ого! + diff --git a/uk-UA/resources/readme.txt b/uk-UA/resources/readme.txt new file mode 100644 index 00000000..663519d2 --- /dev/null +++ b/uk-UA/resources/readme.txt @@ -0,0 +1 @@ +Щоб переглянути відео із субтитрами у програмі VLC (videolan.org), переконайся, що файл відео і файл субтитрів знаходяться в одній папці та мають однакові назви (наприклад, video.mp4 і video.srt). Відкрий відео у VLC, і програма автоматично завантажить субтитри. Якщо субтитри не з’являються, клацни правою кнопкою миші по відео, вибери **Субтитри**, потім **Додати файл субтитрів** і вибери відповідний файл .srt. Приємного перегляду з субтитрами! \ No newline at end of file diff --git a/uk-UA/step_1.md b/uk-UA/step_1.md index c490131c..d7b32e04 100644 --- a/uk-UA/step_1.md +++ b/uk-UA/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## Що ти зробиш -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Натренуй модель машинного навчання для розпізнавання інопланетної мови та контролюй за її допомогою прибульця у Скретчі. -### What you will make +Тобі знадобиться **мікрофон**. -\--- no-print \--- +![Прибулець рухається вліво і вправо командами Eek і Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Де зберігатимуться записи мого голосу? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- Цей проєкт використовує технологію під назвою «машинне навчання». Системи машинного навчання тренують на великій кількості даних. +- Цей проєкт не потребує створення облікового запису або входу в наявний. Приклади, котрі ти запишеш для цього проєкту, зберігаються тимчасово у твоєму браузері (тільки на твоєму комп'ютері). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: Немає доступу до YouTube? Завантаж відео! --- -+ A computer with a microphone +Ти можеш [завантажити усі відео для цього проєкту](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: Ліцензія --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +Цей проєкт має подвійну ліцензію: [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} та [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +Ми хочемо подякувати Дейлу з machinelearningforkids.co.uk за його роботу над цим проєктом. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/uk-UA/step_2.md b/uk-UA/step_2.md index 5954228f..1cff33bb 100644 --- a/uk-UA/step_2.md +++ b/uk-UA/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Створи проєкт -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Перейди до [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} у браузері. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Натисни на **Почати**. -\--- /task \--- ++ Натисни на **Спробуйте зараз**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Натисни на **Проєкти** в меню угорі. + ++ Натисни на кнопку **+ Додати новий проєкт**. + ++ Назви свій проєкт `Мова інопланетян` і налаштуй його для **розпізнавання звуку** зі **збереженням даних у браузері**. Тепер натисни на **Створити**. ![Створення проєкту](images/create-project.png) + ++ Тепер ти маєш бачити проєкт «Мова інопланетян» у переліку. Натисни на проєкт. ![Список проєктів з «Мовою інопланетян»](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Натисни на кнопку **Навчити**. ![Головне меню проєкту зі стрілочкою, що вказує на кнопку «Навчити»](images/project-train.png) + ++ Якщо побачиш вікно із запитом на використання мікрофону, натисни **Дозволити під час кожного відвідування**. + +![Вікно, що запитує доступ до мікрофона, зі стрілочкою, яка вказує на «Дозволити під час кожного відвідування»](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/uk-UA/step_3.md b/uk-UA/step_3.md index 1421a334..815e428d 100644 --- a/uk-UA/step_3.md +++ b/uk-UA/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Вигадай два слова -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +Перш за все, ти збереш зразки фонового шуму. Це допоможе твій моделі машинного навчання відрізняти звуки, на яких ти її тренуватимеш, від фонового шуму твого місця знаходження. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Натисни на кнопку **+ Додати приклад** у панелі **background noise** (фоновий шум). -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Натисни на мікрофон, але нічого не кажи. Запиши 2 секунди фонового шуму. ![Стрілка, що вказує на кнопку з зображенням мікрофону](images/record-button.png) -+ Click the **Add a new project** button. ++ Натисни на кнопку **Додати**, щоб зберегти запис. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Повторюй ці кроки, поки не матимеш **щонайменше вісім зразків** фонового шуму. ![Група з 8 прикладами фонового шуму](images/8-background.png) + +--- /task --- + +Придумай два слова інопланетною мовою: слово на позначення «ліворуч» і слово на позначення «праворуч». + +Тепер ти запишеш приклади для кожного слова, щоб твоя модель машинного навчання могла їх розрізняти. + +--- task --- + ++ Натисни на **+ Додати нову мітку** у верхньому правому куті екрану і додай мітку з назвою `left` («ліворуч»). + +--- /task --- + +--- task --- + ++ Натисни на **+ Додати приклад** у прямокутнику з міткою `left` і запиши, як ти промовляєш своє іншопланетне слово на позначення «ліворуч». + ++ Повторюй, поки не матимеш **щонайменше вісім** зразків. + +--- /task --- + +--- task --- + ++ Натисни на **+ Додати нову мітку**, щоб створити нову мітку з назвою `right` («праворуч»), і запиши вісім зразків іншопланетного слова на позначення «праворуч». + +--- /task --- diff --git a/uk-UA/step_4.md b/uk-UA/step_4.md index 1460a58b..30089394 100644 --- a/uk-UA/step_4.md +++ b/uk-UA/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Натренуй модель -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +Необхідні зразки зібрано! Тепер ти їх використаєш, щоб натренувати модель машинного навчання. -\--- /task \--- +--- task --- -\--- task \--- ++ Натисни **Назад до проєкту** у верхньому лівому куті. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Натисни на **Навчити та перевірити**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Натисни на кнопку з написом **Навчання нової моделі машинного навчання**. Це може зайняти декілька хвилин. ![Стрілка, що вказує на кнопку з написом «Навчання нової моделі машинного навчання»](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Щойно тренування завершено, можеш перевірити, наскільки добре твоя модель розпізнає іншопланетні слова. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Натисни на кнопку **Почати слухати** і скажи своє іншопланетне слово, що означає «ліворуч». -\--- task \--- +Якщо твоя модель машинного навчання розпізнала слово, вона покаже свій прогноз щодо цього слова. ![Стрілка, що вказує на кнопку з написом «Почати слухати»](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Також перевір, чи розпізнає твоя модель іношпланетне слово, що означає «праворуч». -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +Якщо поведінка моделі не є задовільною, повернись на сторінку **Навчання** та додай більше зразків, а потім знову натренуй модель. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/uk-UA/step_5.md b/uk-UA/step_5.md index ad5d0c1f..4e145ddd 100644 --- a/uk-UA/step_5.md +++ b/uk-UA/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Контролюй інопланетянина -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Тепер твоя модель може розрізняти два слова, і ти можеш її використати у програмі Скретч для керування прибульцем. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Натисни на **Назад до проєкту**. -\--- /task \--- ++ Натисни на кнопку **Створити**. + ++ Натисни на **Scratch 3**. + ++ Натисни на **Відкрити в Scratch 3**. + +--- /task --- + +--- task --- + ++ Натисни на **Шаблони проєктів** угорі та обери проєкт Alien Language («Мова інопланетян»), щоб завантажити спрайт прибульця, до якого вже додано певний код. + +![Проєкт Alien Language («Мова інопланетян») обрано в шаблонах Скретчу](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids додали до Скретчу деякі спеціальні блоки, які дозволяють використовувати щойно навчену модель. Цей шаблон проєкту також містить спеціальні блоки walk left («йти ліворуч») та walk right («йти праворуч») у категорії «Мої блоки». Знайди їх внизу списку блоків. + +![Блоки мови прибульців у меню під категоріями «Мої блоки» та Images («Зображення»)](images/new-blocks.png) + +--- task --- + ++ Обери спрайт інопланетянина (**Alien**), потім натисни на вкладку **Код** та додай це код. (Не видаляй код, який там уже є!) ![Додай код для керування прибульцем: коли прапорець натиснуто — почни слухати. Коли я чую «ліворуч» (when I hear left), сказати «ліворуч» (say left) і йти ліворуч (walk left). Коли я чую «праворуч» (when I hear right), сказати «праворуч» (say right) і йти праворуч (walk right).](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Натисни на **зелений прапорець** і скажи свої іншопланетні слова, котрі означають «ліворуч» та «праворуч». Переконайся, що інопланетянин рухається, як треба. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/uk-UA/step_6.md b/uk-UA/step_6.md index 0fe36309..0742fc35 100644 --- a/uk-UA/step_6.md +++ b/uk-UA/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Додаткове завдання -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Рух вгору та вниз**: Повернись до своєї моделі та додай ще дві мітки: up («вгору») і down («вниз»), потім зміни свій код у Скретчі так, щоб рухати прибульця в усіх чотирьох напрямках. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/uk-UA/step_7.md b/uk-UA/step_7.md index 043d77a9..a0de5f0c 100644 --- a/uk-UA/step_7.md +++ b/uk-UA/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## Що робити далі? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +Є багато інших моделей машинного навчання і проєктів штучного інтелекту в напрямку [Машинне навчання зі Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning). diff --git a/vi-VN/images/8-background-annotated.png b/vi-VN/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/vi-VN/images/8-background-annotated.png and b/vi-VN/images/8-background-annotated.png differ diff --git a/vi-VN/images/8-background.png b/vi-VN/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/vi-VN/images/8-background.png and b/vi-VN/images/8-background.png differ diff --git a/vi-VN/images/8-left.png b/vi-VN/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/vi-VN/images/8-left.png and b/vi-VN/images/8-left.png differ diff --git a/vi-VN/images/8-right-annotated.png b/vi-VN/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/vi-VN/images/8-right-annotated.png and b/vi-VN/images/8-right-annotated.png differ diff --git a/vi-VN/images/8-right.png b/vi-VN/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/vi-VN/images/8-right.png and b/vi-VN/images/8-right.png differ diff --git a/vi-VN/images/add-example-annotated.png b/vi-VN/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/vi-VN/images/add-example-annotated.png and b/vi-VN/images/add-example-annotated.png differ diff --git a/vi-VN/images/alien-language.png b/vi-VN/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/vi-VN/images/alien-language.png differ diff --git a/vi-VN/images/allow-microphone.png b/vi-VN/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/vi-VN/images/allow-microphone.png differ diff --git a/vi-VN/images/background-noise-annotated.png b/vi-VN/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/vi-VN/images/background-noise-annotated.png and b/vi-VN/images/background-noise-annotated.png differ diff --git a/vi-VN/images/background-noise.png b/vi-VN/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/vi-VN/images/background-noise.png and b/vi-VN/images/background-noise.png differ diff --git a/vi-VN/images/click-train.png b/vi-VN/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/vi-VN/images/click-train.png and b/vi-VN/images/click-train.png differ diff --git a/vi-VN/images/control-alien-blocks.png b/vi-VN/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/vi-VN/images/control-alien-blocks.png differ diff --git a/vi-VN/images/create-project.png b/vi-VN/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/vi-VN/images/create-project.png differ diff --git a/vi-VN/images/create.png b/vi-VN/images/create.png index 16d02d79..2283d747 100644 Binary files a/vi-VN/images/create.png and b/vi-VN/images/create.png differ diff --git a/vi-VN/images/extensions-annotated.png b/vi-VN/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/vi-VN/images/extensions-annotated.png and b/vi-VN/images/extensions-annotated.png differ diff --git a/vi-VN/images/learn-test-annotated.png b/vi-VN/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/vi-VN/images/learn-test-annotated.png and b/vi-VN/images/learn-test-annotated.png differ diff --git a/vi-VN/images/left-empty-annotated.png b/vi-VN/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/vi-VN/images/left-empty-annotated.png and b/vi-VN/images/left-empty-annotated.png differ diff --git a/vi-VN/images/make-annotated.png b/vi-VN/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/vi-VN/images/make-annotated.png and b/vi-VN/images/make-annotated.png differ diff --git a/vi-VN/images/new-blocks.png b/vi-VN/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/vi-VN/images/new-blocks.png differ diff --git a/vi-VN/images/project-train.png b/vi-VN/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/vi-VN/images/project-train.png differ diff --git a/vi-VN/images/projects-list.png b/vi-VN/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/vi-VN/images/projects-list.png differ diff --git a/vi-VN/images/record-button.png b/vi-VN/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/vi-VN/images/record-button.png differ diff --git a/vi-VN/images/save-example-annotated.png b/vi-VN/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/vi-VN/images/save-example-annotated.png and b/vi-VN/images/save-example-annotated.png differ diff --git a/vi-VN/images/start-listening-annotated.png b/vi-VN/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/vi-VN/images/start-listening-annotated.png and b/vi-VN/images/start-listening-annotated.png differ diff --git a/vi-VN/images/test-your-model.png b/vi-VN/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/vi-VN/images/test-your-model.png differ diff --git a/vi-VN/images/train-annotated.png b/vi-VN/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/vi-VN/images/train-annotated.png and b/vi-VN/images/train-annotated.png differ diff --git a/vi-VN/images/train-new-model.png b/vi-VN/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/vi-VN/images/train-new-model.png differ diff --git a/vi-VN/images/whatyouwillmake.gif b/vi-VN/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/vi-VN/images/whatyouwillmake.gif differ diff --git a/vi-VN/meta.yml b/vi-VN/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/vi-VN/meta.yml +++ b/vi-VN/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/vi-VN/resources/NEW Alien 1.mp4 b/vi-VN/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/vi-VN/resources/NEW Alien 1.mp4 differ diff --git a/vi-VN/resources/NEW Alien 1.srt b/vi-VN/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/vi-VN/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/vi-VN/resources/NEW Alien 2.mp4 b/vi-VN/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/vi-VN/resources/NEW Alien 2.mp4 differ diff --git a/vi-VN/resources/NEW Alien 2.srt b/vi-VN/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/vi-VN/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/vi-VN/resources/NEW Alien 3.mp4 b/vi-VN/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/vi-VN/resources/NEW Alien 3.mp4 differ diff --git a/vi-VN/resources/NEW Alien 3.srt b/vi-VN/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/vi-VN/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/vi-VN/resources/NEW Alien 4.mp4 b/vi-VN/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/vi-VN/resources/NEW Alien 4.mp4 differ diff --git a/vi-VN/resources/NEW Alien 4.srt b/vi-VN/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/vi-VN/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/vi-VN/resources/readme.txt b/vi-VN/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/vi-VN/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/vi-VN/step_1.md b/vi-VN/step_1.md index c490131c..aa0540f2 100644 --- a/vi-VN/step_1.md +++ b/vi-VN/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/vi-VN/step_2.md b/vi-VN/step_2.md index 5954228f..e6930402 100644 --- a/vi-VN/step_2.md +++ b/vi-VN/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/vi-VN/step_3.md b/vi-VN/step_3.md index 1421a334..bf9eb8ee 100644 --- a/vi-VN/step_3.md +++ b/vi-VN/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/vi-VN/step_4.md b/vi-VN/step_4.md index 1460a58b..785b11b0 100644 --- a/vi-VN/step_4.md +++ b/vi-VN/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/vi-VN/step_5.md b/vi-VN/step_5.md index ad5d0c1f..c361be8e 100644 --- a/vi-VN/step_5.md +++ b/vi-VN/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/vi-VN/step_6.md b/vi-VN/step_6.md index 0fe36309..6ca94946 100644 --- a/vi-VN/step_6.md +++ b/vi-VN/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/vi-VN/step_7.md b/vi-VN/step_7.md index 043d77a9..d4b22e96 100644 --- a/vi-VN/step_7.md +++ b/vi-VN/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/zh-CN/images/8-background-annotated.png b/zh-CN/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/zh-CN/images/8-background-annotated.png and b/zh-CN/images/8-background-annotated.png differ diff --git a/zh-CN/images/8-background.png b/zh-CN/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/zh-CN/images/8-background.png and b/zh-CN/images/8-background.png differ diff --git a/zh-CN/images/8-left.png b/zh-CN/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/zh-CN/images/8-left.png and b/zh-CN/images/8-left.png differ diff --git a/zh-CN/images/8-right-annotated.png b/zh-CN/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/zh-CN/images/8-right-annotated.png and b/zh-CN/images/8-right-annotated.png differ diff --git a/zh-CN/images/8-right.png b/zh-CN/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/zh-CN/images/8-right.png and b/zh-CN/images/8-right.png differ diff --git a/zh-CN/images/add-example-annotated.png b/zh-CN/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/zh-CN/images/add-example-annotated.png and b/zh-CN/images/add-example-annotated.png differ diff --git a/zh-CN/images/alien-language.png b/zh-CN/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/zh-CN/images/alien-language.png differ diff --git a/zh-CN/images/allow-microphone.png b/zh-CN/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/zh-CN/images/allow-microphone.png differ diff --git a/zh-CN/images/background-noise-annotated.png b/zh-CN/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/zh-CN/images/background-noise-annotated.png and b/zh-CN/images/background-noise-annotated.png differ diff --git a/zh-CN/images/background-noise.png b/zh-CN/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/zh-CN/images/background-noise.png and b/zh-CN/images/background-noise.png differ diff --git a/zh-CN/images/click-train.png b/zh-CN/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/zh-CN/images/click-train.png and b/zh-CN/images/click-train.png differ diff --git a/zh-CN/images/control-alien-blocks.png b/zh-CN/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/zh-CN/images/control-alien-blocks.png differ diff --git a/zh-CN/images/create-project.png b/zh-CN/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/zh-CN/images/create-project.png differ diff --git a/zh-CN/images/create.png b/zh-CN/images/create.png index 16d02d79..2283d747 100644 Binary files a/zh-CN/images/create.png and b/zh-CN/images/create.png differ diff --git a/zh-CN/images/extensions-annotated.png b/zh-CN/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/zh-CN/images/extensions-annotated.png and b/zh-CN/images/extensions-annotated.png differ diff --git a/zh-CN/images/learn-test-annotated.png b/zh-CN/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/zh-CN/images/learn-test-annotated.png and b/zh-CN/images/learn-test-annotated.png differ diff --git a/zh-CN/images/left-empty-annotated.png b/zh-CN/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/zh-CN/images/left-empty-annotated.png and b/zh-CN/images/left-empty-annotated.png differ diff --git a/zh-CN/images/make-annotated.png b/zh-CN/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/zh-CN/images/make-annotated.png and b/zh-CN/images/make-annotated.png differ diff --git a/zh-CN/images/new-blocks.png b/zh-CN/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/zh-CN/images/new-blocks.png differ diff --git a/zh-CN/images/project-train.png b/zh-CN/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/zh-CN/images/project-train.png differ diff --git a/zh-CN/images/projects-list.png b/zh-CN/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/zh-CN/images/projects-list.png differ diff --git a/zh-CN/images/record-button.png b/zh-CN/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/zh-CN/images/record-button.png differ diff --git a/zh-CN/images/save-example-annotated.png b/zh-CN/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/zh-CN/images/save-example-annotated.png and b/zh-CN/images/save-example-annotated.png differ diff --git a/zh-CN/images/start-listening-annotated.png b/zh-CN/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/zh-CN/images/start-listening-annotated.png and b/zh-CN/images/start-listening-annotated.png differ diff --git a/zh-CN/images/test-your-model.png b/zh-CN/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/zh-CN/images/test-your-model.png differ diff --git a/zh-CN/images/train-annotated.png b/zh-CN/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/zh-CN/images/train-annotated.png and b/zh-CN/images/train-annotated.png differ diff --git a/zh-CN/images/train-new-model.png b/zh-CN/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/zh-CN/images/train-new-model.png differ diff --git a/zh-CN/images/whatyouwillmake.gif b/zh-CN/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/zh-CN/images/whatyouwillmake.gif differ diff --git a/zh-CN/meta.yml b/zh-CN/meta.yml index 5e7aa1ea..ae376c3a 100644 --- a/zh-CN/meta.yml +++ b/zh-CN/meta.yml @@ -8,22 +8,24 @@ copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: What you will make - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/zh-CN/resources/NEW Alien 1.mp4 b/zh-CN/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/zh-CN/resources/NEW Alien 1.mp4 differ diff --git a/zh-CN/resources/NEW Alien 1.srt b/zh-CN/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/zh-CN/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/zh-CN/resources/NEW Alien 2.mp4 b/zh-CN/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/zh-CN/resources/NEW Alien 2.mp4 differ diff --git a/zh-CN/resources/NEW Alien 2.srt b/zh-CN/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/zh-CN/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/zh-CN/resources/NEW Alien 3.mp4 b/zh-CN/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/zh-CN/resources/NEW Alien 3.mp4 differ diff --git a/zh-CN/resources/NEW Alien 3.srt b/zh-CN/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/zh-CN/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/zh-CN/resources/NEW Alien 4.mp4 b/zh-CN/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/zh-CN/resources/NEW Alien 4.mp4 differ diff --git a/zh-CN/resources/NEW Alien 4.srt b/zh-CN/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/zh-CN/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/zh-CN/resources/readme.txt b/zh-CN/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/zh-CN/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/zh-CN/step_1.md b/zh-CN/step_1.md index c490131c..aa0540f2 100644 --- a/zh-CN/step_1.md +++ b/zh-CN/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## What you will make -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/zh-CN/step_2.md b/zh-CN/step_2.md index 5954228f..e6930402 100644 --- a/zh-CN/step_2.md +++ b/zh-CN/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/zh-CN/step_3.md b/zh-CN/step_3.md index 1421a334..bf9eb8ee 100644 --- a/zh-CN/step_3.md +++ b/zh-CN/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/zh-CN/step_4.md b/zh-CN/step_4.md index 1460a58b..785b11b0 100644 --- a/zh-CN/step_4.md +++ b/zh-CN/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/zh-CN/step_5.md b/zh-CN/step_5.md index ad5d0c1f..c361be8e 100644 --- a/zh-CN/step_5.md +++ b/zh-CN/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/zh-CN/step_6.md b/zh-CN/step_6.md index 0fe36309..6ca94946 100644 --- a/zh-CN/step_6.md +++ b/zh-CN/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/zh-CN/step_7.md b/zh-CN/step_7.md index 043d77a9..d4b22e96 100644 --- a/zh-CN/step_7.md +++ b/zh-CN/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway. diff --git a/zh-TW/images/8-background-annotated.png b/zh-TW/images/8-background-annotated.png index b80a56a6..32293ac6 100644 Binary files a/zh-TW/images/8-background-annotated.png and b/zh-TW/images/8-background-annotated.png differ diff --git a/zh-TW/images/8-background.png b/zh-TW/images/8-background.png index 096d3169..d27ef20a 100644 Binary files a/zh-TW/images/8-background.png and b/zh-TW/images/8-background.png differ diff --git a/zh-TW/images/8-left.png b/zh-TW/images/8-left.png index c8ccf98c..9e4e186b 100644 Binary files a/zh-TW/images/8-left.png and b/zh-TW/images/8-left.png differ diff --git a/zh-TW/images/8-right-annotated.png b/zh-TW/images/8-right-annotated.png index daef8333..5b18dabd 100644 Binary files a/zh-TW/images/8-right-annotated.png and b/zh-TW/images/8-right-annotated.png differ diff --git a/zh-TW/images/8-right.png b/zh-TW/images/8-right.png index 10cda4e0..e984a51b 100644 Binary files a/zh-TW/images/8-right.png and b/zh-TW/images/8-right.png differ diff --git a/zh-TW/images/add-example-annotated.png b/zh-TW/images/add-example-annotated.png index 81291957..63a6c0df 100644 Binary files a/zh-TW/images/add-example-annotated.png and b/zh-TW/images/add-example-annotated.png differ diff --git a/zh-TW/images/alien-language.png b/zh-TW/images/alien-language.png new file mode 100644 index 00000000..17c4c626 Binary files /dev/null and b/zh-TW/images/alien-language.png differ diff --git a/zh-TW/images/allow-microphone.png b/zh-TW/images/allow-microphone.png new file mode 100644 index 00000000..ea434669 Binary files /dev/null and b/zh-TW/images/allow-microphone.png differ diff --git a/zh-TW/images/background-noise-annotated.png b/zh-TW/images/background-noise-annotated.png index ad50c670..68d6998c 100644 Binary files a/zh-TW/images/background-noise-annotated.png and b/zh-TW/images/background-noise-annotated.png differ diff --git a/zh-TW/images/background-noise.png b/zh-TW/images/background-noise.png index 3a740f3f..3a924b00 100644 Binary files a/zh-TW/images/background-noise.png and b/zh-TW/images/background-noise.png differ diff --git a/zh-TW/images/click-train.png b/zh-TW/images/click-train.png index 78243ae3..5e06dc4c 100644 Binary files a/zh-TW/images/click-train.png and b/zh-TW/images/click-train.png differ diff --git a/zh-TW/images/control-alien-blocks.png b/zh-TW/images/control-alien-blocks.png new file mode 100644 index 00000000..03346767 Binary files /dev/null and b/zh-TW/images/control-alien-blocks.png differ diff --git a/zh-TW/images/create-project.png b/zh-TW/images/create-project.png new file mode 100644 index 00000000..3f97c43e Binary files /dev/null and b/zh-TW/images/create-project.png differ diff --git a/zh-TW/images/create.png b/zh-TW/images/create.png index 16d02d79..2283d747 100644 Binary files a/zh-TW/images/create.png and b/zh-TW/images/create.png differ diff --git a/zh-TW/images/extensions-annotated.png b/zh-TW/images/extensions-annotated.png index 14c15c8c..47cef492 100644 Binary files a/zh-TW/images/extensions-annotated.png and b/zh-TW/images/extensions-annotated.png differ diff --git a/zh-TW/images/learn-test-annotated.png b/zh-TW/images/learn-test-annotated.png index 3bf8142d..1565d397 100644 Binary files a/zh-TW/images/learn-test-annotated.png and b/zh-TW/images/learn-test-annotated.png differ diff --git a/zh-TW/images/left-empty-annotated.png b/zh-TW/images/left-empty-annotated.png index 1c6c200b..565993b9 100644 Binary files a/zh-TW/images/left-empty-annotated.png and b/zh-TW/images/left-empty-annotated.png differ diff --git a/zh-TW/images/make-annotated.png b/zh-TW/images/make-annotated.png index 9f9e2f5a..59ba1457 100644 Binary files a/zh-TW/images/make-annotated.png and b/zh-TW/images/make-annotated.png differ diff --git a/zh-TW/images/new-blocks.png b/zh-TW/images/new-blocks.png new file mode 100644 index 00000000..2fece8f9 Binary files /dev/null and b/zh-TW/images/new-blocks.png differ diff --git a/zh-TW/images/project-train.png b/zh-TW/images/project-train.png new file mode 100644 index 00000000..1b67cd70 Binary files /dev/null and b/zh-TW/images/project-train.png differ diff --git a/zh-TW/images/projects-list.png b/zh-TW/images/projects-list.png new file mode 100644 index 00000000..a9f2320c Binary files /dev/null and b/zh-TW/images/projects-list.png differ diff --git a/zh-TW/images/record-button.png b/zh-TW/images/record-button.png new file mode 100644 index 00000000..4db43f09 Binary files /dev/null and b/zh-TW/images/record-button.png differ diff --git a/zh-TW/images/save-example-annotated.png b/zh-TW/images/save-example-annotated.png index 50276042..a857285a 100644 Binary files a/zh-TW/images/save-example-annotated.png and b/zh-TW/images/save-example-annotated.png differ diff --git a/zh-TW/images/start-listening-annotated.png b/zh-TW/images/start-listening-annotated.png index 2c33da25..2f9b96bf 100644 Binary files a/zh-TW/images/start-listening-annotated.png and b/zh-TW/images/start-listening-annotated.png differ diff --git a/zh-TW/images/test-your-model.png b/zh-TW/images/test-your-model.png new file mode 100644 index 00000000..84c66521 Binary files /dev/null and b/zh-TW/images/test-your-model.png differ diff --git a/zh-TW/images/train-annotated.png b/zh-TW/images/train-annotated.png index e932f6b9..10a4071e 100644 Binary files a/zh-TW/images/train-annotated.png and b/zh-TW/images/train-annotated.png differ diff --git a/zh-TW/images/train-new-model.png b/zh-TW/images/train-new-model.png new file mode 100644 index 00000000..62ce33f7 Binary files /dev/null and b/zh-TW/images/train-new-model.png differ diff --git a/zh-TW/images/whatyouwillmake.gif b/zh-TW/images/whatyouwillmake.gif new file mode 100644 index 00000000..daf455fb Binary files /dev/null and b/zh-TW/images/whatyouwillmake.gif differ diff --git a/zh-TW/meta.yml b/zh-TW/meta.yml index 5e7aa1ea..85acbc33 100644 --- a/zh-TW/meta.yml +++ b/zh-TW/meta.yml @@ -1,29 +1,31 @@ --- -title: Alien language +title: 外星語 hero_image: images/banner.png -description: Create your own alien language to move a sprite +description: 創建自己的外星語來移動精靈 theme: orange listed: true copyedit: true technologies: scratch software: scratch version: 4.0.0 -last_tested: "2019-06-04" +last_tested: '2019-06-04' steps: - - title: Introduction + title: 你會做出: - - title: Use a pretrained model + title: Set up the project - - title: Create a new project + title: Invent two words + completion: + - engaged - - title: Create alien words + title: Train the model - - title: Train a new machine learning model + title: Control the alien + completion: + - internal - - title: Use alien words in Scratch - - - title: "Challenge: add new commands" + title: 'Challenge' challenge: true - - - title: What next? + completion: + - external diff --git a/zh-TW/resources/NEW Alien 1.mp4 b/zh-TW/resources/NEW Alien 1.mp4 new file mode 100644 index 00000000..efdfa2c3 Binary files /dev/null and b/zh-TW/resources/NEW Alien 1.mp4 differ diff --git a/zh-TW/resources/NEW Alien 1.srt b/zh-TW/resources/NEW Alien 1.srt new file mode 100644 index 00000000..1d35e240 --- /dev/null +++ b/zh-TW/resources/NEW Alien 1.srt @@ -0,0 +1,26 @@ +1 +00:00:04,760 --> 00:00:11,520 +Go to rpf.io/ml4k and click 'Get started'. + +2 +00:00:11,520 --> 00:00:15,560 +Click 'Try it now'. + +3 +00:00:15,560 --> 00:00:20,560 +Add a new project called 'Alien language'. + +4 +00:00:20,560 --> 00:00:28,280 +Set the project type to 'recognising sound,'  +and the storage to 'in your browser'. + +5 +00:00:28,280 --> 00:00:34,840 +Create the project, then  +click on the project title. + +6 +00:00:34,840 --> 00:00:40,000 +Now click on 'Train'. + diff --git a/zh-TW/resources/NEW Alien 2.mp4 b/zh-TW/resources/NEW Alien 2.mp4 new file mode 100644 index 00000000..d03e7fd5 Binary files /dev/null and b/zh-TW/resources/NEW Alien 2.mp4 differ diff --git a/zh-TW/resources/NEW Alien 2.srt b/zh-TW/resources/NEW Alien 2.srt new file mode 100644 index 00000000..a1d756b0 --- /dev/null +++ b/zh-TW/resources/NEW Alien 2.srt @@ -0,0 +1,25 @@ +1 +00:00:03,600 --> 00:00:07,160 +Allow the site to access  +your microphone if it asks. + +2 +00:00:07,160 --> 00:00:12,440 +Record a sample of background  +noise - so just don't say anything. + +3 +00:00:12,440 --> 00:00:17,800 +Now repeat that until you have  +eight samples of background noise. + +4 +00:00:17,800 --> 00:00:27,040 +Add a label for left, and record your  +made up alien word for left, eight times. + +5 +00:00:27,040 --> 00:00:38,120 +Next, add a label for right and record  +a different made up word, eight times. + diff --git a/zh-TW/resources/NEW Alien 3.mp4 b/zh-TW/resources/NEW Alien 3.mp4 new file mode 100644 index 00000000..444ec226 Binary files /dev/null and b/zh-TW/resources/NEW Alien 3.mp4 differ diff --git a/zh-TW/resources/NEW Alien 3.srt b/zh-TW/resources/NEW Alien 3.srt new file mode 100644 index 00000000..5a822bf9 --- /dev/null +++ b/zh-TW/resources/NEW Alien 3.srt @@ -0,0 +1,16 @@ +1 +00:00:04,160 --> 00:00:11,320 +Click 'Back', then click on 'Learn & Test'. + +2 +00:00:11,320 --> 00:00:15,520 +It's time to train your model! + +3 +00:00:15,520 --> 00:00:19,160 +Test the model by saying one of your words: + +4 +00:00:19,160 --> 00:00:27,520 +Bloop! + diff --git a/zh-TW/resources/NEW Alien 4.mp4 b/zh-TW/resources/NEW Alien 4.mp4 new file mode 100644 index 00000000..8b413e9b Binary files /dev/null and b/zh-TW/resources/NEW Alien 4.mp4 differ diff --git a/zh-TW/resources/NEW Alien 4.srt b/zh-TW/resources/NEW Alien 4.srt new file mode 100644 index 00000000..4571f30d --- /dev/null +++ b/zh-TW/resources/NEW Alien 4.srt @@ -0,0 +1,35 @@ +1 +00:00:04,680 --> 00:00:08,640 +Now click 'Back' again, and  +this time choose 'Make'. + +2 +00:00:08,640 --> 00:00:14,160 +Let's use the model in Scratch! + +3 +00:00:14,160 --> 00:00:21,920 +Go to 'Project templates' and select  +the template for 'Alien language'. + +4 +00:00:21,920 --> 00:00:24,360 +Some code has been added for you. + +5 +00:00:24,360 --> 00:00:29,960 +Drag the code blocks to make  +the alien move when you speak. + +6 +00:00:36,800 --> 00:00:40,800 +Let's test it out. + +7 +00:00:40,800 --> 00:00:43,840 +Bloop! + +8 +00:00:43,840 --> 00:00:50,200 +Wow! + diff --git a/zh-TW/resources/readme.txt b/zh-TW/resources/readme.txt new file mode 100644 index 00000000..0e0956ce --- /dev/null +++ b/zh-TW/resources/readme.txt @@ -0,0 +1 @@ +To watch a video with subtitles on VLC (videolan.org), ensure the video file and subtitle file are in the same folder and have the exact same name (e.g., video.mp4 and video.srt). Open the video in VLC, and it will automatically load the subtitles. If the subtitles don’t appear, right-click the video screen, go to **Subtitle**, then **Add Subtitle File**, and select the correct .srt file. Enjoy watching with subtitles! \ No newline at end of file diff --git a/zh-TW/step_1.md b/zh-TW/step_1.md index c490131c..904290a3 100644 --- a/zh-TW/step_1.md +++ b/zh-TW/step_1.md @@ -1,53 +1,44 @@ -## Introduction +## 你會做出: -In this project, you will train the computer to understand an alien language. You will use that to control an alien character so that it can understand what you tell it to do. +Train a machine learning model to recognise an alien language and use it in Scratch to control an alien. -### What you will make +You will need a **microphone**. -\--- no-print \--- +![An alien moving left and right with the commands Eek and Bop](images/whatyouwillmake.gif) -![Alien moving left and right to new words, Eeek and Bop](images/journey.gif) +--- collapse --- -\--- /no-print \--- - -\--- print-only \--- +--- +title: Where are my voice recordings stored? +--- -![Overview of entire Scratch project](images/test-new-blocks.png) +- This project uses a technology called 'machine learning'. Machine learning systems are trained using a large amount of data. +- This project does not require you to create an account or log in. For this project, the examples you use to make the model are only stored temporarily in your browser (only on your machine). -\--- /print-only \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will need +title: No YouTube? Download the videos! --- -+ A computer with a microphone +You can [download all the videos for this project](https://rpf.io/p/en/alien-language-go){:target="_blank"}. -+ Internet access -\--- /collapse \--- +--- /collapse --- -\--- collapse \--- +--- collapse --- --- -title: What you will learn +title: License --- -+ How to use the Speech to Text extension in Scratch 3 with a pretrained model -+ How to train a machine learning model to recognise sounds -+ How to use your trained machine learning model in Scratch 3 -\--- /collapse \--- +This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"}. -\--- collapse \--- ---- -title: Additional information for educators ---- +我們要感謝 machinelearningforkids.co.uk 的 Dale 在此專案上所做的所有工作。 + +--- /collapse --- -If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/alien-language/print){:target="_blank"}. -\--- /collapse \--- -### Licence -This project is dual-licensed under both a [Creative Commons Attribution Non-Commercial Share-Alike License](http://creativecommons.org/licenses/by-nc-sa/4.0/){:target="_blank"} and an [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0){:target="_blank"} -We'd like to thank Dale from machinelearningforkids.co.uk for all his work on this project. diff --git a/zh-TW/step_2.md b/zh-TW/step_2.md index 5954228f..e6930402 100644 --- a/zh-TW/step_2.md +++ b/zh-TW/step_2.md @@ -1,22 +1,42 @@ -## Use a pretrained model +## Set up the project -\--- task \--- -+ Go to [machinelearningforkids.co.uk/scratch3](https://machinelearningforkids.co.uk/scratch3/){:target="_blank"} -\--- /task \--- + +
+ +
+ -**Warning:** This step of the project can only be completed using the Google Chrome web browser. If this browser is not available to you, please skip to [step 3: Create a new project](https://projects.raspberrypi.org/en/projects/alien-language/3) +--- task --- -\--- task \--- -+ Next, load the **Speech to Text** extension. Click the **Extensions** button in the bottom left-hand corner, and then choose **Speech to Text** from the list. **Note:** Make sure that you select the **Speech to Text** extension, not the **Text to Speech** extension. ![Arrow pointing to extensions button](images/extensions-annotated.png) ++ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"} in a web browser. -+ Use **Events** blocks, **Motions** blocks, and the new **Speech to Text** blocks to create the following scripts. ![New scripts to add](images/S-to-T-blocks.png) ++ Click on **Get started**. -\--- /task \--- ++ Click on **Try it now**. -\--- task \--- Click on the green flag to test your program. Say “left” or “right”. The Scratch cat should move in the direction that you tell it to. Use your voice to try to move the Scratch cat back and forth across the screen. Try to speak calmly and clearly. +--- /task --- + +--- task --- + ++ Click on **Projects** in the menu bar at the top. + ++ Click on the **+ Add a new project** button. + ++ Name your project `Alien language` and set it to learn to recognise **sounds**, and store data **in your web browser**. Then click on **Create**. ![Creating a project](images/create-project.png) + ++ You should now see 'Alien language' in the projects list. Click on the project. ![Project list with alien language listed](images/projects-list.png) + +--- /task --- + +--- task --- + ++ Click on the **Train** button. ![Project main menu with an arrow pointing to the train button](images/project-train.png) + ++ If you see a pop-up message asking to use the microphone, click on **Allow on every visit**. + +![Popup asking you to allow the microphone, with an arrow pointing to allow every visit](images/allow-microphone.png) + +--- /task --- -It can be difficult to get it to work. If it doesn’t work, add `say` blocks so that your script looks like the script below, to show what it thinks you are saying. ![New scripts to see what the computer thinks you are saying](images/S-to-T-blocks-test.png) \--- /task \--- -You have now used speech recognition to control a character in Scratch. -In this step, to get your program working quickly, you used a machine learning model that had already been trained for you. It is a general machine learning model that had been trained to recognise words in the English dictionary. diff --git a/zh-TW/step_3.md b/zh-TW/step_3.md index 1421a334..bf9eb8ee 100644 --- a/zh-TW/step_3.md +++ b/zh-TW/step_3.md @@ -1,20 +1,49 @@ -## Create a new project -In the next few steps, you will train a machine learning model to see how it was done. For the next part of the project, you will use your voice to control an alien character that does not understand English! You will invent two new words that would not be found in an English dictionary. Then, you will use the words to control the alien character, and train a machine learning model to recognise them. +## Invent two words -First, go to the Machine Learning for Kids website and create a project. + +
+ +
+ -\--- task \--- -+ Go to [machinelearningforkids.co.uk](https://machinelearningforkids.co.uk/){:target="_blank"}. +First, you will collect samples of background noise. This will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. -+ Click on **Get started**. +--- task --- -+ Click on **Try it now**. \--- /task \--- ++ Click the **+ Add example** button in **background noise**. -\--- task \--- -+ Click on **Projects** in the menu bar at the top of the page. ++ Click on the microphone, but don't say anything. Record 2 seconds of background noise. ![Arrow pointing to microphone button](images/record-button.png) -+ Click the **Add a new project** button. ++ Click the **Add** button to save your recording. -+ Name your project `Alien Language` and set it to learn how to recognise `sounds`. Then, click the **Create** button. ![Creating a project](images/create.png) +--- /task --- -+ You should see `Alien Language` in the projects list. Click on the `Alien Language` project. \--- /task \--- +--- task --- + ++ Repeat those steps until you have **at least eight examples** of background noise. ![Bucket filled with 8 background examples](images/8-background.png) + +--- /task --- + +Invent two alien words — a word that means "left" and a word that means "right". + +Now you will record eight examples of each word so that your machine learning model can learn to recognise them. + +--- task --- + ++ Click on **+ Add new label** on the top right of the screen and add a label called `left`. + +--- /task --- + +--- task --- + ++ Click on **+ Add example** inside the box for the new `left` label, and record yourself saying your alien word for "left". + ++ Repeat until you have recorded **at least eight examples**. + +--- /task --- + +--- task --- + ++ Click on **+ Add new label** to create another label called `right` and record eight examples of your alien word for "right". + +--- /task --- diff --git a/zh-TW/step_4.md b/zh-TW/step_4.md index 1460a58b..785b11b0 100644 --- a/zh-TW/step_4.md +++ b/zh-TW/step_4.md @@ -1,45 +1,36 @@ -## Create alien words -In this step, you will invent your alien words. +## Train the model -\--- task \--- + +
+ +
+ -You need two words — an alien word for “left” and an alien word for “right”. Invent two new words that would not be in an English dictionary. They can be random noises, as long as you can repeat them in the same way every time and they are recognisably different from each other. If you don’t want to make noises with your voice, that’s okay — you can find other ways to make noises. You can click your fingers, clap your hands, squeeze a squeaky toy, or do anything else you can think of! Just make sure that you remember your new words! +You have gathered the examples you need, now you will use these examples to train your machine learning model. -\--- /task \--- +--- task --- -\--- task \--- ++ Click on **Back to project** in the top left-hand corner. -+ Click the **Train** button to start to collect examples. ![Arrow pointing to the train button](images/click-train.png) ++ Click on **Learn & Test**. -+ Click the **Add example** button in the **background noise** bucket. Recording background noise will help your machine learning model to tell the difference between the sounds that you will train it to recognise, and the background noise where you are. ![Arrow pointing to the add example button](images/background-noise-annotated.png) ++ Click on the button labelled **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to button saying Train new machine learning model](images/train-new-model.png) -+ Click on the microphone to record 2 seconds of background noise. ![Arrow pointing to microphone button](images/add-example-annotated.png) +--- /task --- -+ Click the **Add** button to save your recording. ![Arrow pointing to add button](images/save-example-annotated.png) +Once the training has finished, you can test how well your model recognises the alien words you have invented. -+ Repeat those steps until you have **at least 8 examples** of background noise. ![bucket filled with 8 background examples](images/8-background.png) +--- task --- -\--- /task \--- ++ Click the **Start listening** button, then say your alien word for "left". -\--- task \--- +If your machine learning model recognises it, it will display what it predicts you said. ![Arrow pointing to the start listening button](images/test-your-model.png) -+ Click the **Add new label** button in the top right-hand corner, and create a new training bucket called `left`. ![Arrow pointing to the add new label button](images/8-background-annotated.png) ++ Test whether the model recognises your alien word for "right" as well. -+ Click the **Add example** button in the new **left** bucket. ![Arrow pointing to the add example button](images/left-empty-annotated.png) +--- /task --- -+ Record **at least 8 examples** of your alien word for “left”. ![bucket filled with 8 left examples](images/8-left.png) +If you are not happy with how the model is working, go back to the **Train** page and add more examples, then train your model again. -\--- /task \--- -\--- task \--- - -+ Click the **Add new label** button in the top right-hand corner again, and create a new training bucket called `right`. - -+ Click the **Add example** button in the new **right** bucket. - -+ Record **at least 8 examples** of your alien word for “right”. ![bucket filled with 8 right examples](images/8-right.png) - -+ **Note:** By the end of this step, you must have eight examples in each of the three buckets. - -\--- /task \--- diff --git a/zh-TW/step_5.md b/zh-TW/step_5.md index ad5d0c1f..c361be8e 100644 --- a/zh-TW/step_5.md +++ b/zh-TW/step_5.md @@ -1,22 +1,50 @@ -## Train a new machine learning model -In this step, you will use the examples that you collected in the last step to train the computer how to recognise your new words. +## Control the alien -\--- task \--- + +
+ +
+ -+ Click the **Back to project** link in the top left-hand corner. ![Arrow pointing to back to project button](images/8-right-annotated.png) +Now that your model can distinguish between words, you can use it in a Scratch program to control an alien. -+ Click the **Learn & Test** button. ![Arrow pointing to Learn and Test button](images/learn-test-annotated.png) +--- task --- -+ Click on **Train new machine learning model**. This may take a few minutes to complete. ![Arrow pointing to Train new machine learning model](images/train-annotated.png) ++ Click on the **< Back to project** link. -\--- /task \--- ++ Click on **Make**. + ++ Click on **Scratch 3**. + ++ Click on **Open in Scratch 3**. + +--- /task --- + +--- task --- + ++ Click on **Project templates** at the top and select the 'Alien language' project to load the alien sprite, which already has some code added. + +![Alien language project is selected in the Scratch templates](images/alien-language.png) + +--- /task --- + +Machine Learning for Kids has added some special blocks to Scratch to allow you to use the model you just trained. This project template also contains special 'walk left' and 'walk right' blocks inside "My Blocks". Find both at the bottom of the blocks list. + +![Alien language blocks shown in the menu underneath My Blocks and Images](images/new-blocks.png) + +--- task --- + ++ Make sure you have the **Alien** sprite selected, then click on the **Code** tab and add this code. (Keep the code that is already there!) ![Add code to control the alien: When flag clicked, start listening. When I hear left, say left and walk left. When I hear right, say right and walk right.](images/control-alien-blocks.png) + +--- /task --- + +--- task --- + ++ Click the **green flag** and say your alien words for "left" and "right". Check that the alien moves the way you expected. + +--- /task --- -\--- task \--- -+ Once the training has finished, click the **Start listening** button to test your machine learning model. Say one of the words (or make one of the sounds) that you have trained the computer to recognise as “left” or “right”. If your machine learning model recognises it, it will display what it thinks you said. ![Arrow pointing to what the computer thinks you did](images/start-listening-annotated.png) -+ If you are not happy with how the model is working, go back to the **Train** page and add more examples to all three training buckets. -+ When you are happy with your machine learning model, move on to the next step. -\--- /task \--- diff --git a/zh-TW/step_6.md b/zh-TW/step_6.md index 0fe36309..6ca94946 100644 --- a/zh-TW/step_6.md +++ b/zh-TW/step_6.md @@ -1,30 +1,11 @@ -## Use alien words in Scratch -In this step, you will use your new machine learning in Scratch. +## Challenge -\--- task \--- +--- challenge --- -+ Click the **Make** button. ![Arrow pointing to the make button](images/make-annotated.png) +--- task --- -+ Click the **Scratch 3** button, then click on **Open in Scratch 3**. +**Move up and down**: Go back to your model and add two more labels for "up" and "down", then modify your Scratch code so that you can move the alien in all four directions. -+ Click on **Project templates** at the top of the screen, then open the **Alien Language** project template. +--- /task --- -\--- /task \--- - -\--- task \--- - -+ Look at the scripts for the alien sprite. The scripts that are already there will put the alien sprite in the right place at the start and animate how it walks. Do not delete them. Add the script below to the alien sprite, underneath the scripts that are already there. ![New scripts to add including new buttons to use your machine learning model](images/add-new-blocks.png) - -+ Now, test your program! Click on the green flag. Say your words (or make your noises) for “left” and “right” to tell the alien which way to walk. - -\--- /task \--- - -You have now trained your own machine learning model to do speech recognition, and used that to control a character in Scratch. Unlike the pretrained model that you used earlier in the project, which had been trained to recognise tens of thousands of words, you have only trained it to recognise two different words. However, the principle is the same. - -You have also seen the importance of training the machine learning model to work with a certain background noise. - -\--- task \--- - -Can you think of an example of a system like this that you have seen before? For example, some cars use speech recognition systems that have been trained to recognise the different commands that you can give to the in-car computer. What other examples have you used? - -\--- /task \--- +--- /challenge --- diff --git a/zh-TW/step_7.md b/zh-TW/step_7.md index 043d77a9..d4b22e96 100644 --- a/zh-TW/step_7.md +++ b/zh-TW/step_7.md @@ -1,17 +1,3 @@ -## Challenge: add new commands +## What can you do now? -\--- challenge \--- - -\--- task \--- - -+ Now, you could add two more training buckets for “up” and “down”, so that you can control the alien to move in all four directions. - -\--- /task \--- - -\--- task \--- - -+ Can you think of anything else that you could use a machine learning model for? - -\--- /task \--- - -\--- /challenge \--- +There are lots of other machine learning and AI projects in the [Machine learning with Scratch](https://projects.raspberrypi.org/en/pathways/scratch-machine-learning) pathway.