Goal:
Now let’s program what will happen when we move the SpeedSlider.
This code will change the speed of the TextToSpeech voice every time that the slider is moved.
Steps:
- Under the section labeled Blocks select SpeedSlider.
- Grab and place the block labeled “when SpeedSlider.PositionChanged”.
- Under Blocks select TextToSpeech1.
- Grab and place the block labeled “set TextToSpeech1.Country”.
- Change “Country” to say “SpeechRate”.
- On the “when SpeedSlider.PositionChanged” block, hover your mouse over “thumbPosition”.
- Then grab the “get thumbPosition” block and place it inside the “set TextToSpeech1.SpeechRate” block.