Scratch
Advanced
60 mins
160 points
What you need:

Text to Speech

Learn how to use the Text to Speech extension in Scratch to make your characters speak out loud and in different languages and voices.

1 - Create a new Scratch project

Go to the Scratch website and create a new project. You can delete the cat sprite.

2 - Add a sprite

We are going to make a character in the sprite library to say out loud different things that we program it to say. Open to sprite library and choose a character. In this lesson we are going to use the elf character but you can choose your own.


3 - Add the Text to Speech extension

Scratch has an extension called Text to Speech that lets you use specific blocks for making things in your projects talk.

Add the Text to Speech extension to your project.


4 - Speak 'hello'

First let's try out the speak block to make your sprite say "hello".

Add the following code to your sprite:

when this sprite clicked speak [hello] :: tts stack

Once you've added the code, click on your sprite and it should say "hello" out loud.

5 - Say something different

Next let's change what our sprite says, change the the text from "hello" to something different like "Hi my name is Emma the elf, my favourite colour is green".

Change your code to the following:

when this sprite clicked speak [Hi my name is Emma the elf, my favourite colour is green] :: tts stack

Once you've added the code, click on your sprite and it should say what you programmed it to out loud.

Join our club 😃

To view the remaining 3 steps and access hundreds of other coding projects please login or create an account.

Copyright Notice
This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.

Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu
🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more