Navigate to Sound in Control Panel, and from the Sound window move the the “Sounds” tab. Scroll down to the Program Events and search for “Microsoft Visual Studio”
origin - http://www.pipiscrew.com/?p=3174 play-sound-when-build-succeeded-or-failed-in-visual-studio