Reading "ac voltage pressence" using software only.

Yes.

One approach is to use capacitors (e.g. 10 uF) to isolate the speaker from the input, and a voltage divider (10K:10K) between GND and Vcc to set the input to half the power supply voltage. The presence of an AC signal will cause variations in analogRead() values. See below

This assumes that there is no large DC or AC voltage between GND and the speaker output. If there is, you could have a serious problem in connecting the devices.

input.png

input.png