Theory:

In this section, we will discuss how to add sound in the Scratch application.
 
Adding Sound:
  • Select Sprite1 in the sprite list and click the Sounds tab.
1.PNG
 
2.PNG
  • Try the meow sound already there in the list. Click the speaker icon to select a different sound from the sound library if you don't like the default sound.
3.PNG
 
4.PNG
  • Click the Scripts tab and select the play sound block from the Sound menu. Drag and add this block to the when space key pressed script. (Select the sound you need from the drop-down list.)
5.PNG
 
6.PNG
  • Run your program.