Pronunciation Practice App
Create a pronunciation learning app that helps users practice by reading Italian words aloud and checking their pronunciation using speech recognition.
In this tutorial, we will create a learning app that reads English words aloud and uses speech recognition to check pronunciation.
You can download the source code from the download section at the bottom of the page.
From the [Projects] menu, select [Start new project] and name it “HelloWords".
See this page for details on the Designer and Blocks Editor.
What You Will Learn in This Tutorial
- Basics of Speech Recognition
- Using Random Functions
- How to use Dictionaries
Components Used
Label, HorizontalArrangement, Spinner, Button, SpeechRecognizer, TextToSpeech
Blocks Used
Global Variable, List, if then else, Dictionaries
Designer
Set the title of Screen1 to “Pronunciation Practice App".
Add a Label from the User Interface palette to the Viewer. Its name should be “Label1″. Set the Text of “Label1" to “Let’s listen to the word and try saying it!".
Add three HorizontalArrangement components from the Layout palette, arrange them vertically on the viewer. They should be named HorizontalArrangement1, HorizontalArrangement2, and HorizontalArrangement3 in order from top to bottom.
“HorizontalArrangement1“
- From the User Interface palette, add a Label and a Spinner. They should be named “Label2" and “Spinner1" respectively.
- Set the Text of “Label2" to “Level".
- For the “Spinner1" spinner, set the ElementsFromString to “Beginner, Intermediate, Advanced," and set the selection to “Beginner."
“HorizontalArrangement2″
- From the User Interface palette, add two Labels, and rename them to “Label3" and “wordLabel" respectively.
- Set the Text of “Label3" to “Practice Word:".
- Set the Text of “wordLabel" to a blank.
“HorizontalArrangement3“
- From the User Interface palette, add two Labels. They should be named “Label4" and “Label5" respectively.
- Set the Text of “Label3" to “Recognized Word:".
- Set the Text of “Label5" to a blank.
“Play Word"
- From the User Interface palette, add a button between “HorizontalArrangement2” and “HorizontalArrangement3”. It should be named “Button1“, and set its Text to “Play Word".
“Practice Pronunciation"
- From the User Interface palette, add a button below “HorizontalArrangement3”. It should be named “Button2“, and set its Text to “Practice Pronunciation".
“Result“
- From the User Interface palette, add a label below “Button2”. It should be named “Label6" and set its Text to “Result" and TextColor to red.
Non-visible components
- From the Media palette, add one TextToSpeech component and one SpeechRecognizer component
