The siren sounds different because of the Doppler effect: relative motion between the siren and you changes the frequency you observe. Its pitch is higher while approaching and lower while receding, although the emitted frequency and the speed of sound remain unchanged.
The Reasoning and Mechanism
A siren emits sound as a sequence of wavefronts. When the source moves toward a stationary observer, each new wavefront is emitted from a position closer to the observer than the previous one. This compresses the wavefronts ahead of the source, producing a shorter observed wavelength.
Because the wave speed in the air is approximately constant and , a smaller means a larger observed frequency . The observer therefore hears a higher pitch.
