LISA ANNE FLOYD – Following the path to deeper learning

Coding Ideas for Educators

Text to Speech and Translation Blocks in Scratch 3.0

Making Your Applications More Accessible

One of my favourite coding environments to learn to code with is Scratch . Recently, Scratch released their 3.0 version with many new additions and capabilities. I have shared some ideas to make use of the new Text to Speech and Translate extensions. The programs below get progressively more challenging.

You might have students follow along. Afterward, be sure to challenge students with extension/challenge activities. I’ve included some challenges for you to consider trying out.

beartranslate

Adjusting your Scratch applications to make them more accessible…

Part 1 – Text to Speech blocks

I will share with you some simple code that you can include in your applications to make them more accessible. I will show you how to make the character say something in a speech bubble as well as with their voice so the user can hear the same text.

Video tutorial: https://youtu.be/vtOuK7PcQLo

Here is what the code looks like…

image1

Translating text in Scratch…

Part 2 – Translate blocks

I will show you how to add code that will translate text from one language to another.

Video tutorial: https://youtu.be/3wUhdTllgKk

image2

Part 3 – Including a variable

I will show you how to replace the text that is repeated throughout the program with a variable.

Video tutorial: https://youtu.be/DWcn6ZT4MYU

image3

Part 4 – Getting input from the user to translate

I will show you how to ask the user for words or a phrase that will be translated to another language.

Video tutorial: https://youtu.be/m2teQygHNoA

Here is what the code looks like:

image4

Using lists to obtain and translate words entered by the user

Part 5 – Challenge: Translating Lists

For this more advanced application, I’ve used a counter, a loop and lists to create a program that asks the user for a number of words and then translates each word one, by one.

You can see that lists are used rather than variables to store each word.  I’ve also made use of creating my own blocks, which are like functions. Can you figure out how the code works in this application?

Video Demonstration:   https://youtu.be/Z4KlzJT-lq0

Application Link: https://scratch.mit.edu/projects/280044496/editor/

Other Challenges:

1 – Allow the user to select which language they would like to translate the words to.

2 – Can you figure out a way to remove the word “stop” from the list of words other than deleting the last word in the list as I’ve done?

image5

For help with counters, check out the applications on this link .

Let me know if you have more ideas!

Share this:

One thought on “ text to speech and translation blocks in scratch 3.0 ”.

  • Pingback: This Week in Ontario Edublogs – doug — off the record

Leave a comment Cancel reply

' src=

  • Already have a WordPress.com account? Log in now.
  • Subscribe Subscribed
  • Copy shortlink
  • Report this content
  • View post in Reader
  • Manage subscriptions
  • Collapse this bar
  • Jump to sidebar
  • Jump to content

Scratch Wiki

  • Make a Project
  • Create a Page
  • Explore Projects
  • Random Page
  • Discuss Scratch
  • Wiki Forum Topic
  • Community Portal
  • Scratch Ideas
  • About Scratch
  • About Scratch Wiki
  • View source
  • View history
  • Request an account
  • Scratch Wiki Home
  • Current Events
  • Recent Changes
  • What links here
  • Related changes
  • Special pages
  • Printable version
  • Permanent link
  • Page information

In other languages

For editors.

  • WW Suggestions
  • Things To Do
  • Wiki Sandbox
  • Your Sandbox
  • Page history
  • Purge cache

Help the wiki!

The Scratch Wiki is made by and for Scratchers. Do you want to contribute?

Learn more about joining as an editor!

See discussions in the Community Portal

Think () (block)

Think ()

The Think () block is a Looks block and a stack block . The block gives its sprite a thought bubble with the specified text. The thought bubble stays until another speech or thought block is activated, or the stop sign is pressed. This block is identical to the Say () block except that this block gives a thought bubble whereas the other gives a speech bubble.

Example Uses

how to make a speech bubble on scratch

As this block gives an everlasting thought bubble, it is used whenever a thought bubble that never ends must be made (e.g. a character that always thinks).

Some common uses are:

  • A creature always making thoughts
  • A sort of picture or a sign
  • A message that is not wanted to go away
  • Variable length thoughts (such as waiting for a player's action before moving on)

Character Limit

A character limit was added for Scratch 3.0 , limiting all text to 330 characters or less. [1] This limitation also applies to the following blocks:

  • say () for () seconds
  • think () for () seconds
  • Think () for () Seconds
  • Say () for () Seconds
  • Say Nothing
     
  • ↑ https://github.com/LLK/scratch-vm/blob/22645391cb69b1ed9ae01bb96ec67bfe8736a358/src/blocks/scratch3_looks.js#L77
  • Looks Blocks
  • Stack Blocks
  • This page was last edited on 4 August 2023, at 19:23.
  • Content is available under CC BY-SA 4.0 unless otherwise noted.
  • Privacy policy
  • Disclaimers

CC BY-SA 4.0

Need speech bubble on top of front layer sprite

I have many projects where a sprite glides in front of another sprite. In Snap, e.g. Snap! Build Your Own Blocks , if the lower layer sprite has a speech bubble, the bubble is hidden behind the front layer sprite. This doesn't happen instead in Scratch, where speech bubbles are always on top of other sprites, e.g. https://scratch.mit.edu/projects/410615611/editor .

Is this something that could be taken into consideration in Snap? Or there are reasons in Snap to allow speech bubbles to be hidden by other sprites?

If this is a desired behavior, can someone point me to the methods to look at in order to allow my own personal copy of Snap to easily run projects imported from Scratch where speech bubbles are always on top of all sprites, without having to keep switching sprite's layers?

I'm sorry, Stefano, but I cannot confirm your claimed behavior in Scratch. From what I can see the layering of Snap's speech bubbles behaves exactly the same as in Scratch, i.e. it depends on the sprite's layer and only changes when the sprite's layer changes.

[edit: ] Oh wait! In current Scratch it's even worse, the speech balloon's layer does not change when the sprite's layer changes. Geez, that's clearly a bug in Scratch, don't you think?

in scratch, when a speech bubble appears, it goes to the top layer, so when a sprite says "hello" and there's another sprite in the front layer and it's on top of the spot where the speech bubble appears, the speech bubble is on top of the sprite even though the sprite that the speech bubble belongs to is in the back layer. If the other sprite goes to the front layer, the speech bubble is under that sprite, but when the parent sprite (the owner of the bubble) is moved, the bubble doesn't move. So speech bubbles go to the front layer when they appear. Here's another thing, the bubble layer only changes if the bubble is unloaded, then it resets, so when a new say block is run, it really changes the bubble text instead of creating a new bubble. That is so confusing.

image

This is certainly bad. But in Scratch a sprite cannot hide a speech bubble (do you have a counterexample?). In Snap instead sprites can hide speech bubbles (as shown in the two sample projects cited above that I have now correctly shared)

if you look at my post you can see that it is possible to hide a speech bubble in scratch.

In Scratch you can hide a speech bubble if the sprite simply moves behind another one with a speech bubble.

Yes, sure, in Scratch speech bubbles can hide other speech bubbles. But sprites cannot hide speech bubbles. This is different in Snap as you can see in the example project I prepared.

If this is a wanted behavior (even if I don't see the point of hiding a speech bubble behind a sprite) this is fine with me. In this case, can you point me to the correct methods I should change in order to get the exact Scratch behavior?

Do you a sample project showing this behavior?

yeah, I just forgot to give you the link https://scratch.mit.edu/projects/410626187/

This doesn't happen in Scratch 1.4. The bubbles always stay on top. In any case, this happens in Scratch 3 if you change the layer after the bubble has shown up. In Snap instead this can happens as soon as the bubble shows up, even if you don't change the sprite layer in the meantime.

And this is what I need: that the bubble stays on top of all sprites if you don't change the layer of a sprite.

In Snap! speech balloons stay ontop of the sprite they belong to, at the sprite's layer. That's an easy to understand, consistent rule. You can change the sprite's layer, and that also affects its speech balloon. Again, easy, consistent and predictable, giving you all the tools you need to control them via their sprites. Technically speech balloons are parts of their sprite, implemented as submorphs. I guess you could theoretically implement another architecture, treating balloons as separate morphs. But you'd run into a lot of complications if you did that, and you'd need to change very many things. I wouldn't encourage it. Also notice that Scratch's bugginess in this regard is an indicator that another architecture might not work any better at all.

I understand that the rule is technically ideal. But speech ballons are there as you are supposed to be able to read them. Hiding a ballon behind another element (except when it is really difficult doing something else if you keep dinamically changing the sprite's layers) it is not something that I would suppose someone could want as a standard behavior.

So, I guess I have to dig into this mechanism to try to square the circle.

Unfortunately I cannot understand the flow of Smalltalk code, but the treatment of speech ballons in BYOB is exactly what I need and what I think anyone would want. Ballons in BYOB are always on top.

IMAGES

  1. Making a BETTER Speech Bubble in Scratch

    how to make a speech bubble on scratch

  2. Scratch: Adding Speech & Thought Bubbles

    how to make a speech bubble on scratch

  3. Scratch. How to make bubbles

    how to make a speech bubble on scratch

  4. Scratch Jr How to make an alphabet speech bubble

    how to make a speech bubble on scratch

  5. Scratch Jr Make a Character Count -Speech Bubble

    how to make a speech bubble on scratch

  6. Scratch

    how to make a speech bubble on scratch

VIDEO

  1. •How to make speech bubble underneath in gachalife• (Tutorial)

  2. romaNecredinciosu

  3. cleaning foot bubble scratch treatment clean asmr #foot #short #shorts#asmr #animation

  4. How to make speech bubbles turn 3D in Scratch

  5. How to make the text in a speech bubble appear over time in Scratch

  6. Speech bubbles using circle in indesign #tricks #indesign #shortsvideos

COMMENTS

  1. How to Add a Speech Bubble to Your Sprite on Scratch

    Have you ever wanted to add a speech bubble or a thought bubble with text to your character in Scratch? This is how you can do it!

  2. Making a BETTER Speech Bubble in Scratch

    Hey Peeps :DIn this video, I'll be showing you how to make a better speech bubble in Scratch. If u didnt know, scratch has a block which can make a character...

  3. adding voice with speech bubbles at the same time

    Use the Scratch sound editor to cut the voiceover file into clips that each correspond to a speech bubble. Then all you have to do is…. play sound for speech 1 say speech for length of sound 1 secs play sound for speech 2 say speech for length of sound 2 secs play sound for speech 3 say speech for length of sound 3 secs.

  4. can you clear speech bubbles?

    can you clear speech bubbles? The way I would do this is: set runsto to 1 set sto to 0 repeat until sto = 3 say wait until sto = 1 say wait until sto = 2 wait until not sto = 2 when clicked forever if runsto = 1 if sto = 2 set sto to 0 change sto by 0.1 wait 0.1 secs this is a different loop then the main loop because of the wait inside of it ...

  5. How To Make Scratch Bubble Fancy In Scratch!

    ~ How To Make Speech Bubble Fancy In Scratch! ~Today I will be showing you how to make speech bubble fancy in scratch! Also please turn on subtitles :)Timest...

  6. Say () (block)

    13Oct04. The Say () block is a Looks block and a stack block. The block gives its sprite a speech bubble with the specified text — the speech bubble stays until an another speech or thought block is activated, or the stop sign is pressed. This block is identical to the Think () block, except that this block gives a speech bubble, while the ...

  7. Say words in a speech bubble

    Say words in a speech bubble. You can type in any text. The words will appear in a speech bubble. To remove the speech bubble, click an empty say block: ...

  8. Say () for () Seconds (block)

    The say () for () seconds block is a Looks block and a stack block. The block displays a speech bubble with the specified text for the sprite that runs it, which appears on the screen for the specified amount of seconds. The block is similar to the think () for () seconds block, with the difference being that this block displays a speech bubble ...

  9. Text to Speech and Translation Blocks in Scratch 3.0

    Adjusting your Scratch applications to make them more accessible… Part 1 - Text to Speech blocks. I will share with you some simple code that you can include in your applications to make them more accessible. I will show you how to make the character say something in a speech bubble as well as with their voice so the user can hear the same ...

  10. Think () (block)

    Stack. The Think () block is a Looks block and a stack block. The block gives its sprite a thought bubble with the specified text. The thought bubble stays until another speech or thought block is activated, or the stop sign is pressed. This block is identical to the Say () block except that this block gives a thought bubble whereas the other ...

  11. Amp up your Scratch speech bubbles with audio

    Scratch's built-in speech bubbles allow you to create fun, comic book-style stories, but if you're looking to put a more high-tech spin on your project, try ...

  12. PDF Lesson 7: Speech Bubbles, Sounds,

    Lesson 7: Speech Bubbles, Sounds, Pages, and Wait For Summary. In this lesson, students will learn how to add sound as well as speech bubbles to their projects. They will also learn how to add a new page and the wait block to a project. This lesson will prepare students for the story project by providing them with the ScratchJr tools they will ...

  13. How Do You Change Font Size & Font in a Speech Bubble ...

    How Do You Change Font Size & Font in a Speech Bubble? The easiest way to do this would be to actually make it a sprite with a text box an a custom speech bubble which would appear by using the 'Broadcast' block and if the text sprite 'receives' the broadcast it would appear. Hope this helps! Me: Be a dude and play these! Me: Look down ...

  14. Text Rendering

    Text Rendering. Text rendering displays text on the Scratch stage with more flexibility than the usual use of the Say block, but does require more work. There are two main approaches: Rapid repeated use of the Say block, which produces a teletype style in a speech bubble. Using a set of sprite costumes to display images of letters.

  15. Scratch

    How to synchronize speech bubbles (say blocks) with text-to-speech (speak blocks).How I Make Tutorial Videos: https://youtu.be/bI6VIZr8Q4UDownload Camtasia (...

  16. Adding Speech Bubbles and Making Sprite to Talk in Scratch

    Toll Free Number: 1800 532 272 588 1800 532 272 588

  17. Need speech bubble on top of front layer sprite

    jens July 9, 2020, 5:53pm 6. In Scratch you can hide a speech bubble if the sprite simply moves behind another one with a speech bubble. s_federici July 9, 2020, 6:35pm 7. Yes, sure, in Scratch speech bubbles can hide other speech bubbles. But sprites cannot hide speech bubbles. This is different in Snap as you can see in the example project I ...

  18. Moving the speech bubble (say command)

    Moving the speech bubble (say command) jamy_hensley_test wrote: Your sprite must be not too far away from an edge. Instead of having the sprite talking, use another sprite, a tiny dot, that you can place at a distance from the "talking" sprite. True, but to do that and make it invisible use the. set ghost effect to 100.

  19. How to make the text in a speech bubble appear over time in Scratch

    how to make a sentence appear over time in a speech bubble and make a conversation in ScratchChapters:0:00 Introduction0:13 Starting0:38 Say function4:39 Wai...

  20. Custom speech bubble tool? : r/ClipStudio

    So, naturally, I wanted to do other types of dialogue in the same way. I've managed to make one with dashed lines rather than solid, which is great for whispering, but what would be really useful is a thought bubble and a jagged shape for shouting. So far I've discovered I can use a polygon with a suitable number of corners and manually adjust ...

  21. Speech Bubble

    I am making a game and I have a little guide that says advice and how to play, is there any way to make the speech bubble smaller? It takes up an annoyingly big portion of my screen. #2 Jan. 15, 2019 02:57:17

  22. Modifying speech bubble placement

    Part of the "Introduction to Programming with Scratch in Education" course offered by the Computer Science Education program at the University of Northern Io...

  23. Scratch

    Search. Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations.