A question I get asked a lot in Picademy is how to I play a sound file using Python.
Using just whats on the standard Raspbian image the easiest way, IMO, is to use Pygame.
This small code snippet below shows you how. Just put the wav file in the same place as your program.
from time import sleep
#Initialise pygame and the mixer
#load the sound file
mysound = pygame.mixer.Sound("mysound.wav")
#play the sound file for 10 seconds and then stop it
You will have to use wav files, as opposed to other sounds files such as mp3, ogg, etc. You can use media.io to do this.