The astronauts have sound transmitting devices in the helmets they wear which help them exchange sound waves with one-another. This is because moon does not have any atmosphere and sound its does not have any medium for sound to travel as sound does not travel in vacuum.