Voice Recognition
"Create "Rock, Paper, Scissors" Game using Teachable Machine from Google to classify images"
Table of Content
Voice Recognition #1
- Please open the Teachable Machine through this link https://teachablemachine.withgoogle.com/. Then open an “Audio Project”.
- There are five classes in this exercise including “Background noise, up, down, left, and right”. Add some classes and rename the names respectively.
- You could either choose to record the audio on your own or upload audio file.
Here’s the guide to record audio sample on your own for “Background Noise” class.
Repeat the process for other four classes. Hints 1: You can adjust how many seconds to record (click that gear icon). Do not leave too much blank time for every audio sample which would take bad performance to your model. For example, 1 second is enough when recording single word for all other four classes since they are quite short. Hints 2: For “Background noise”, 20 audio samples are enough if your environment is quiet. As for other 4 classes, 15 audio samples are adequate normally. Additionally, you may invite your friends around to records some samples rather than simply record 15 samples with your own voice. Hints 3: If you find there is no microphone panel in your browser (as figure shown below). You may check the microphone authorization of your browser. You may need to turn off your mic used in Zoom meeting currently or leave the Zoom meeting for a while. 4. Train the model and do some preview tests for your model. This overlap factor determines how frequently the last second of audio is tested against the model you've made. With an overlap rate of 0, audio will be classified every second. With an overlap of 0.5, audio will be classified every half second.
Voice Recognition #2
- Export the model and copy this link to MS Word / Notepad for later use.
- Click the top left menu bar and click "Download Project as file" to save your project.
- Open Scratch for programming through this link https://mitmedialab.github.io/prg-extension-boilerplate/create/
Now, develop a mini program in Scratch to control the sprite using your voice.
- Please follow the steps in the following diagram. Then, press the “Green Flag” to execute your program and move the sprite. After execution, you can find that the sprite moves to “x = 50, y = 50”(upper right).
Voice Recognition #3
- Integrate the voice recognition model that you have trained before. Please follow the steps in the following diagram.
- Please follow the design of blocks to be the same as below figure to complete the program.
- Now you can click the green flag to control this sprite.
- Click File and then click “Save to your computer” to save your project.
- Record a video for a complete demonstration.