speak ()
Speak ()
The speak () block is a stack block in the Text to Speech extension that says the entered in text in the current voice. It originates from Scratch. The default text is "hello". The block has a limit of 128 characters.[1]
This block can be used alongside the say []
block to provide speech alongside subtitles/text. This is useful to help the visually impaired or people who cannot hear.
define say text (string1) say (string1) speak (string1) when gf clicked say text [Something crazy happened to me yesterday.] //the block would say and speak each text, and the block would be used like this say text [I met this girl after school ended, and she wanted to give me cookies.] say text [Then I asked for one, and she said "I need about three fiddy."] say text [That's when I realized she was actually 8 stories tall and a crustacean from the protozoic era.]
It can also be used to speak text in a different language, by using the blocks in the Translate extension, and the set language to (language name v)
block:
define speak (text) in user language set language to (language) speak (translate (text) to (language)) when gf clicked speak [Hello!] in user language //the block would translate "Hello!" to the language that the user has selected
References
v • e Text to Speech Extension Blocks Navigation | |
---|---|
Scratch Blocks | speak () · set voice to () · set language to () |
PenguinMod Blocks | set reading speed to ()% |