The BC337 and 2N2222 are electrically almost identical.
Not a problem if you use the same ones for the speaker and LEDs.
Watch the pinout though. Not all 2N2222 have the same pinout.
PieterP:
The 100R for the speaker seems a bit too low, this would be (5V-0.7V)/100R = 43mA, which is too much, I'd use at least 270R.
Not quite. The transistor is used as emitter follower, so base current depends on collector current.
Peak collector current could be 500mA for an 8ohm speaker, so I guess ~5mA base current.
But maybe wise to use the same value base resistor as used for the other transistor (270ohm).
Leo..