We need a description of what happens wen you run this code, not simply it does not work. What happens and what do you expect to happen?
We also need to see a schematic of how you have wired things up ( not a physical layout diagram ) and a link to where you bought the sound sensor.
We can only know what you tell us and code is only half the story when things go wrong.
Your code does not even attempt to do anything with the analogue sound reading. What happens when you just switch pin 3 by hand instead of using the sound module?