How to detect if a doorbell is ringing via GPIO

Here are the options I have been considering:

  1. Wiring the speaker into the GPIO pin with the appropriate voltage stepdown

  2. Using a Piezo speaker to detect when the doorbell is ringing

  3. Using a microphone to detect when the doorbell is ringing

Any input is appreciated!