Distortion can be caused (in this amp, assuming everyting is connected like it should be) by one of four causes:
- Speakers gets overloaded - small speakers cannot handle a lot of power so it produces distortion if you try to play the music too loud, it probably would distort the low frequencies first as low frequencies require bigger cone travel.
- The amplifier output gets overloaded - if the chip (or the power supply) cannot produce enough current, then it will clip the waveform and produce distortion.
- Not enough voltage - 8 Ohm speaker needs 8VRMS to produce 8W of power. As you use a single supply and capacitor coupling, it means that the peak output of your amplifier is about half of the power supply voltage. So, to get 8VRMS (11.3Vpeak) the power supply as to be at least 22.6V, in practice it probably would need to be more than that because the output transistors in the chip drop some voltage. Otherwise there will be not enough voltage and the waveform will be clipped (the chip cannot have 14V on its output if the power supply is 12V)
- The amplifier input get overloaded - the input voltage is too high for the amplifier chip This is not very likely for your project, but I included it for completeness sake.
The input picks up the electromagnetic field from the mains wires inside your house and amplifies them as if they were useful signal. To reduce the hum, you should put the amplifier in a metal case to shield it. It would still pick up some hum when the input is not connected to anything (or worse, connected to a wire which is not connected to anything), but that is not really important.
Also, the hum could be coming from the power supply (if you use a non-switching power supply) if there is insufficient filtering (not enough capacitors).
Resistor in series
It will not work - putting resistor in series with the input you will just lower the volume while putting the resistor in series with the speaker will reduce the output power because you will be wasting some power on the resistor. The amp will just start clipping at lower volume.
Find out the power of your speaker. Connect it to another (more powerful) amplifier and turn the volume up until you hear distortion. Note if the volume is flouder than with your amp or not. If it is the same, then you need a more powerful speaker.
If the chip can survive it (read the datasheet), use a higher voltage power supply, especially if you want to use an 8 ohm speaker. Or find a 4 ohm speaker - it would need less voltage for the same power (if your chip can drive 4 ohm speakers).