Using a Class-D amplifier makes this a little bit more complicated - but not much.
The problem with simply detecting an AC signal is that the Class-D amplifier is generating its carrier signal even if there isn't any audio present. So: you need to filter out the carrier signal.
A simple RC low-pass filter will get rid of the carrier. Now you are left with the desired audio signal.
You can simply half-wave rectify that audio signal, use appropriate current-limit resistor and voltage divider (if needed), then feed that into your GPIO input pin.
Most PIC microcontroller TTL-level input pins have a threshold voltage of near 1.3 Vdc. If the audio peaks are above that level, the microcontroller will register a logic 1 each time the signal rises above that threshold.
If you set the pin for Interrupt-On-Change, you don't need any form of peak-hold circuit. On the other hand, if you are simply polling the pin on a periodic basis, you need to ensure that any audio peaks detected are held long enough to be captured by the next poll. That's simply a capacitor after the rectifier diode. Be sure to add a discharge resistor across the capacitor - choose the RC time constant to be longer than your poll period.
You can add much more to this if you need to. Bandpass filtering may be necessary. But we don't know what you need because you don't provide enough detail in your question.