Amazon S3



TranslateMe App - Using Voice Computing blocks and the Yandex Translation ServiceEstimated duration: 30 minutesAge level: Upper secondary school studentsLearning objectives, skills and competencies: Students will learn how to use voice computing functions such as TextToSpeech and SpeechRecognizer, and a Web service tool such as YandexTranslate. Activities and roles: Students: may work in pairs, and should be encouraged to trouble-shoot and problem-solve together.Teachers: could demonstrate building the app step by step on a laptop projected onto a wall screen, before the students work on it themselves. The teacher can then go around the class to provide assistance while students work with their partners. Bear in mind that collaboration should be encouraged. What do you need: You will need a laptop and an Android smartphone with the MIT AI2 Companion app downloaded from the Play Store. You will also need a Wi-Fi hotspot to connect both the laptop and the smartphone to the internet. In order to log into the MIT website and be able to save your projects and finished apps, you will need a Gmail account.Learning space: School classroomActivity description:Click on the “Create apps!” button on the MIT App Inventor website, then log in to the site with your Gmail account. Create a new project, and call it “TranslateMe” (or any other name you prefer). You should now be on the Designer editor where we will bring together all the components of our user interface.-228600301942500Add the following User Interface components to the screen: Button, Label, List Picker and a Notifier (Illustration 3.1). Illustration 3.1Add the following Media components to the screen: SpeechRecognizer, TextToSpeech and YandexTranslate (Illustration 3.2). Illustration 3.2Rename the components to: HelpButton, TranslationLabel and YandexTranslate, and change the Text Property (on the right-hand side of the screen) to “Help” for the HelpButton, and “Pick a Language” for the ListPicker1 (see illustration 3.3). Illustration 3.3Remove the Text for the TranslationLabel so that it is blank, and the component will not be visible on the screen.In the Component section, select the ListPicker1 and add the following text to the ElementsfromString Property: “es, it, de, nl, fr, ru” (Illustration 3.4). Illustration 3.4This represents the languages that can be translated: Spanish, Italian, German, Dutch, French and Russian. Now we go to the Blocks editor. We will first create a global variable called “language” to represent the language chosen through the ListPicker function (see illustrations 3.5 & 3.6). Set of illustrations 3.5We then enable the SpeechRecognizer component – this will activate the function which will listen to the speech and convert it into a text. You will not see the text, but this will be an input (a variable called “result”) for the YandexTranslate function to translate into the language selected from the ListPicker1 drop-down window.2190752225040004481830224917000 Set of illustrations 3.6523875595566500 Set of illustrations 3.7Pick the “when SpeechRecognizer1.AfterGettingText” block from the SpeechRecognizer1 component (see illustrations 3.7 & 3.8), and complete the blocks as seen in the illustration. This block will get the text result from the SpeechRecognizer and translate it into the chosen language.5943602023745003961765203327000 1524003937000 Set of illustrations 3.8Using the TextToSpeech component will allow the app to read the translated text aloud. Pick and drag the block “when YandexTranslate1.GotTranslation” into the viewer, and set the TextToSpeech language to the chosen language. Next, assign the translation (variable called “result”) to the Text Property of the TranslationLabel, so the translated text will be displayed on the screen at the same time that it is read aloud. Drag the “call TextToSpeech.Speak” block into the YandexTranslate block, and assign the variable “translation” to the “message” of the block (see illustration 3.9). Connect the project to your smartphone through the MIT AI2 Companion app, and test it.78041511112500 Set of illustrations 3.9 Illustration 3.10 Congratulations! You have now successfully created a mobile translation app! The last step is adding text to the Notifier component, so when the Help button is clicked, a short set of instructions will be displayed in a pop-up window. Refer to Illustration 3.10 for the necessary blocks.Useful resources for teachers and educators: of author: Rosanna Kurrer ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download