Introduction for Text-to-Speech Translator in Scratch
Have you ever wanted to build your own multilingual translator that can speak in different languages? With Scratch, you can! In this exciting project, we’ll guide you through building a Text-to-Speech Translator that can convert English to French, German, Spanish, and many other languages—all using Scratch’s extensions!
Whether you’re a beginner or a coding enthusiast, this tutorial will show you how to build an engaging, real-world application that teaches translation, text-to-speech (TTS), and user interaction.
What You’ll Build
An interactive Scratch app featuring a character named Abby who:
- Translates user input from English into other languages (e.g., French, German)
- Speaks the translation aloud in a selected voice
- Displays the translated text visually
- Supports more than 45 languages
Perfect for
- Coding beginners
- Young learners
- Bilingual education
- STEM classrooms
Step by Step Code to Build Text-to-Speech Translator in Scratch
Step 1: Setup – Sprite & Backdrop
- Delete the default Cat sprite.
- Add Abby as your translator sprite.
- Resize Abby to 140 for clarity.
- Add a backdrop: Select Colorful City or any theme you like.
Step 2: Add Extensions – Translate + Text-to-Speech
📌 Add Extensions – Translate + Text-to-Speech
Click the blue Extensions icon in the bottom-left corner of Scratch and add:
- Translate Extension – to convert text from one language to another.
- Text-to-Speech Extension – to make Abby speak the translated text aloud.
These blocks allow Scratch to:
- Translate English into over 45 languages
- Speak translations aloud with customizable voices
Step 3: Create a Variable
- Go to Variables
- Create a variable named:
translate
This variable stores the translated text and displays it on screen.
Step 4: Initializing Abby (Welcome Message)
📌 Initializing Abby (Welcome Message)
Here’s how to create a friendly introduction and prompt:
when green flag clicked
say "Hello, I am Abby" for 2 seconds
wait 5 seconds
set [translate v] to [0]
say "A language translator." for 2 seconds
say "Press A for French and B for German." for 5 seconds
This sequence introduces Abby, resets the variable, and shows instructions to choose a language.
Step 5: Handle User Input (Press A or B)
📌 Handle User Input – Detecting Keypress
Key A → French Translation
when [A v] key pressed
ask "Type in English:" and wait
set [translate v] to (translate (answer) to [French v])
set language to [French v]
speak (translate)
Key B → German Translation
when [B v] key pressed
ask "Type in English:" and wait
set [translate v] to (translate (answer) to [German v])
set language to [German v]
speak (translate)
The above blocks:
- Ask the user to type a sentence in English
- Translate it using Scratch’s translate block
- Speak it aloud in the selected language using Text-to-Speech
Don’t forget to enable the translate
variable checkbox to see the translated text on screen!
Step 6: Customize the Voice (Optional)
📌 Customize the Voice – Enhancing Voice Output
You can change the voice using this block:
set voice to [Alto v] // Options: Alto, Tenor, Squeak, Giant, Kitten
Try different voices for fun or clarity. For younger users, “Kitten” is a hit!
Demo in Action – French and German Translation
📌 Live Demo – French and German Translation
Example Input:
- User types:
Hello Abby
- Presses A for French → Output: “Bonjour Abby”
- Presses B for German → Output: “Hallo Abby”
The system speaks the translated sentence out loud.
Enhanced Features (Add-On Ideas)
📌 Enhanced Features – Extra Use Cases
Want to take it to the next level?
✅ Feature Ideas:
- Add more key options (e.g., C for Spanish, D for Italian)
- Store multiple translations in a list
- Let users choose a voice from a drop-down
- Add a flag icon for each language
- Show original and translated text together
- Include error handling if no input is given
- Add a fun quiz mode for learning new words!
Languages Supported by Scratch’s Translate Extension
More than 45 languages are available including:
- 🇫🇷 French
- 🇩🇪 German
- 🇪🇸 Spanish
- 🇮🇹 Italian
- 🇮🇳 Hindi
- 🇨🇳 Chinese
- 🇯🇵 Japanese
- 🇷🇺 Russian
- 🇰🇷 Korean
- 🇹🇷 Turkish
…and many more!
Final Thoughts
You’ve just built a fully functional language translator with voice support in Scratch! 🥳
This project teaches:
- ✅ Event handling
- ✅ Variable usage
- ✅ Extension integration
- ✅ Conditional logic
- ✅ User interaction
🔁 Want to remix or expand the project? Try adding:
- Dropdown menus
- Custom vocabulary
- Multiple voice styles
- Quizzes for language learners
Call to Action
- Don’t forget to check out the full video tutorial by Kodex Academy here: Scratch – Text to Speech & Translator in 45+ Languages | Ultimate Guide – By Kodex Academy
- Like, comment & share the video
- Visit kodexacademy.com
- subscribe to the Kodex Academy YouTube channel for deeper Scratch content.
Happy coding with Kodex Academy! 🚀
Learn More with Kodex Academy
At Kodex Academy, we’re passionate about helping students learn coding in creative ways. This project teaches more than Scratch—it empowers young minds to build tools that work in the real world.
Explore more: