I had made an LM386-based amplified speaker before. The sound quality was atrocious and I switched to the silky smooth PAM8403.
PAM8403-based amplfier boards had a limitation – 5 volts. No more or else the chip burns.
The LM386 has no such limitation. In fact, its sound output of an LM386 IC is directly proportional to the voltage supplied. It can be used to power very big speakers. So, I went back to that IC.
I ruined a few PCB boards before I realized that the solder by themselves will not form perfect connections on the back of the boards. The correct way is apparently to make connections using single-strand wire or the wires that form the body of resistors and capacitors.
My implementation is a text-book or datasheet version of 200x gain audio amplifier. Apart from that, I added a ceramic capacitor to eliminate noise from AC power sources and also a LED over the power input.
However, there is still noise from the audio signal input if a sound source is NOT connected. This happens only when power is flowing in. It is totally eliminated once I connect a sound source. Adding a ceramic capacitor eliminates the noise when power is flowing in but it introduces new noise when sound is flowing it. I think I need to introduce the capacitor on pins 3 and 4, instead of shorting it over the stereo input. I will do that later.
I also got a good box from the stationery section of a departmental store. I cut a square hole at the top and attached the speaker below it. The open hole is covered with umbrella cloth. I could not seal the hole from below because most glues do not form a perfect bond with the plastic material with which this box is made from.
Finally, my LM386 speaker sounds loud, suffers no noise, looks good, and is very compact and portable.