How to fade or delay a DC Signal to remove speaker "thump"/"click"/"pop" from transistor switch?
I'm surprised that you don't hear a lot of distortion when you turn on this circuit. There are a few problems. 


You are now feeding DC to your speaker. If you turn off the audio and turn on the transistor you will see the speaker coil move in or out and stay there until you turn the transistor off.
The DC is flowing from the battery through the base of the transistor and out the emitter to your speaker.


Usually it's best to mute the audio at 'line' level before it gets to the amplifier. Alternatively use a relay energised by your micro to connect and disconnect your speaker.







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Switching speaker with relay.

How it works:


The GPIO goes high and a current of a few mA flows into Q1 base.
Q1 turns on and RLY1 is energised. The contact closes and the speaker is connected to the amplifier.
On switch-off D1 absorbs the inductive kick from the relay and prevents damage to Q1.


Depending on your amplifier you may still hear a click or thump in the speaker. This is usually caused by the amplifier output capacitor discharging through the speaker. Putting 100 \$\Omega\$ or so between AMP+ and AMP- will discharge the capacitor before the relay contact closes and prevent the thump.