Its finally working. The code (sound command) was right but not sure why it did not work. I changed the output pin and now its working. Thanks for those who have replied. I really appreciate it.