What causes the poles of the electromagnet in an audio speaker to repeatedly switch directions?

a metal striker that pulls on the magnet
a diaphragm that vibrates around the magnet
a current that rapidly switches direction
a device that opens and closes a circuit