Sounds

Control sounds and words which can play from your programming device's speaker or the robot itself (R2-D2 only).

Sound

await Sound.Category.SoundName.play() plays a sound from your programming device. When a sound is played, if you use the true boolean (aka: "Wait" in the block canvas) the program waits until the sound plays completely before continuing to the next command. Change to false (aka: "Continue" in the block canvas) to go to the next command immediately. If you want to use timing different than the wait/continue commands allow, you can follow a true (continue) command with a delay() command so the subsequent logic is delayed for the given duration.

You can randomize all sounds by not declaring a Category and SoundName, such as  await Sound.play(true). If you declare a Category but leave the SoundName blank it will randomize in the given category, such as await Sound.Animal.play(true)

If you would like to preview the available sounds, you can do so by using the sound block in the block canvas.

Speak

await speak() will speak a string from your programming device using the text-to-speech engine, in any language supported by your device. For example, you can use the speak command to have your program say 'Hello World" by using await speak('Hello World', true). You can also concatenate string values (see the + button on the block canvas) to make them dynamic. The additional values can be variables, parameters, or sensors, and/or in the form of numbers, strings, booleans, or colors. The wait/continue playback (true/false boolean) is handled the same as the Play Sound command. For example, to speak the current heading use await speak(buildString("The heading is" + Math.round(getHeading())), true).

Droid Sound

Unique Star Wars Droid Sounds are available for BB-8, BB-9E and R2-D2 using DroidName.Sound.Category.SoundName.play(). The Droid names are written as BB8, BB9E, and R2D2 and they can only be played on the intended Droid. This works the same as the sound command, except that the wait and continue boolean is not available. For example, to play the R2-D2 Burnout sound use R2D2.Sound.General.Burnout.play().

*R2-Q5 Droid Sounds are not available