I'm trying to build a simple audio amplifier for an 8 Ω speaker. The schematic/design is from here (Wayback Machine link just in case that link breaks). I used a different transistor as I happened to not have the specified one, but other than that, the circuit is un-modified.
simulate this circuit – Schematic created using CircuitLab
A battery worked, but I wanted to use a wall power supply. I found a barrel-jack wall-wart power supply that said 9V @ 1A on the back. To be safe, I plugged it into the wall, and confirmed that there was indeed 9 V coming from the barrel jack. I disconnected the battery, and connected the 9 V power supply in its place using a barrel-jack to screw-terminals (in my case, 9 V and ground). I turned it on, and strange noises came out of the speaker, seemingly at random. I'd guess maybe every few seconds, and if I try to play audio, it sounds distorted (it sounds fine with the 9 V battery).
I also tried a 5 V power supply, but I still get strange sounds (noise?) from the speaker, albeit less loudly. Found an adjustable 2 A power bench power supply (labeled "Regulated DC Power Supply"), set it to 9 V, but it also made the speaker make strange noises.
If it helps, it isn't a constant hum/buzzing. It is much more random-sounding.
I've also heard of something called a "linear" power supply, but they're pricy and big, so I'm hesitant to get one. I could also get a 9 V voltage regulator and give the regulator 12 V noisy power, but I'm not sure where to approach this from.
Unfortunately, I do not have an oscilloscope to more precisely measure the power supplies.
What's a good way to get rid of this noise so I can use a wall power supply and not a battery? Ideally I'd like to be able to keep using a normal barrel-jack power supply, if possible. I'm open to adding capacitors, a voltage regulator, etc., but I'm not sure where to begin or what to change in the circuit.