Removing noise from TDA2007A Audio amplifier circuit
Lets start this by getting a picture of your circuit.

This is the "test circuit" from the datasheet:



From your description, you say there's noise there when you play something through the amplifier.  That sounds to me like you are talking about distortion.

That happens (in the simplest case) when you have too much input signal for the amplifier.

See that little note by the title of the circuit (Gv= 36dB?)  That says the circuit has a voltage gain of 36dB.  That means if you put a 1V peak to peak signal on the input, then the amplifier will try to output a signal with 63V peak to peak.  It can't do that, though, because you can't power the TDA2007A from a voltage source that would allow that much voltage swing - the TDA2007A can only operate on up to 26V, but you would need like 65V to get the full swing from a 1V peak to peak input.

The datasheet also says that the maximum input level is 300 millivolts RMS.  That's less than 1V peak to peak.  The input stage itself can't accept more than that.

The most likely cause of your problem is just that you are giving to too much of an input signal.  Any device intended to drive an earphone directly will easily give you a 1V peak to peak signal.

The fix is fairly simple:

Reduce the input level.

Connect a 10k potentiometer to your amplifier as a volume control.  

Like this:



Vin goes to your signal source, and the wire from the wiper (the arrow) goes to the input capacitor of your TDA2097A.

Set your audio source (mp3 player, phone, whatever) to the middle of its output range, then adjust the potentiometer so that the output doesn't sound distorted.



Now that you've posted a recording, I can tell that you aren't talking about distortion.

The noise in the recording comes from the processor in your Pi.

I think the simplest thing to do is to put a relatively low value resistor across the output of the Pi.  Say, 100 ohms.  

The "noise" makes its way into your amplifier by various ways, most of which will be fairly high impedance.  A low impedance load will "short circuit" the noise from high impedance sources.  

The other (simple) thing you can do is to use the potentiometer to turn the volume down until the amplifier output is clean, then turn up the volume on the source until it is loud enough.