My iPhone 4S speakers only work when my phone is charging?

I've cleaned the earphone dock, cleaned out the charger dock, too, but yet the speakers only work when the phone itself is charging. It doesn't work when the charger is plugged in the iPhone but not the outlet.

That is because the speakers are not powered from the phone but from the mains. The signal comes from the phone, but the speakers need a separate source of power for the amplifiers.

Maybe check your settings to see if something is set differently. It's not supposed to do that.