Say Sentences with an AI Speaker
-
Introduction
You can easily make the computer “say” any word or sentence using the “say” block in the AI category! Even better, you can save what the computer says as a sound clip in the Sounds tab. That way, you can replay it whenever you want.
This feature is super helpful for users who can’t read text on a screen, and it also makes talking with an app feel much more natural — like chatting with a real person!
Block Syntax
Let’s take a closer look at each input in this block:
Sentence
You should usually put a full sentence or phrase inside the “say” block—not just individual words. This helps the AI figure out how to say the words naturally. Also, remember: each “say” block causes a small delay.
Here’s what happens when you use two blocks for “Good” and “morning” separately:
On the other hand, this is what you get when you use one block for both words:
Speaker Language
You can pick which language the AI speaker uses. The most common languages are listed at the top of the list:Tip:
The same language can show up more than once because of different dialects (ways of speaking). For example, “Good afternoon” sounds different between English speakers in the USA and the UK:vs
Normally, you want to match the sentence and the language.
But sometimes you might want the same speaker to say things in two languages. Here’s an example where a Chinese AI speaker says both Chinese and English:
Speaker Type
Within the same language, you can pick what type of AI speaker to use:
Important:
Not every speaker type is available for every language.
If the one you picked doesn’t work, you’ll see a warning message at the bottom of the code editor:
Talking Speed
You can change how fast the AI talks!- 100 = Normal speed
- > 100 = Faster
- < 100 = Slower
Examples:
- Normal (100):
- Faster (200):
- Slower (50):
Pitch
Pitch controls how high or low the voice sounds.
- 100 = Normal pitch
- Higher numbers = Squeakier
- Lower numbers = Deeper
Usually, it’s best to leave it at 100 unless you want a funny effect.
Volume
Volume controls how loud the AI speaks.
- 100 = Normal loudness
- Higher = Louder (shouting!)
- Lower = Quieter (whispering)
You can even change volume inside a sentence by using multiple blocks!
Sound Clip Name
If you type a name into the Sound Clip Name input, the sound will get saved into the Sounds tab.This is super useful if you want the computer to say the same thing many times. Instead of making the AI generate speech every time (which takes a little time), you can just play the sound clip instantly.
Demo
In this example, we make the AI say “How are you?” and store it in a sound clip called “greetings”. After that, we use the start sound block to play it: