How to play a sound from the command line AND direct the output
If you are looking for your computer to play sounds or words you can use the "say" command on the terminal. Just type 


  say dog


and the computer responds with dog over whatever speakers you have chosen from the Sound selection under system preferences. Go to system preferences and choose the Sound icon. When that opens you can select options for what plays the sound on your computer. One option is the internal speakers.