Audio pin 9 ok with bare speaker, noisy with amplified speaker

Hello
I am building a project with a DMX controller shield (with uSD slot on the DMX shield) on an UNO. I also have a microphone little board.
Basically depending on ambient audio volume the many leds (24 channels) start to light up. This all works fine.
There is s uSD reader on the DMX shield and I use this to put on some wav files that are playing according also to the ambient volume.
TMRpcm is used and pin 9 for output.
When plugging in pin 9 and ground a bare speaker, audio can be heard faintly but clean.
When I plug in an amplified speaker instead, I have loud highs frequency covering the audio.
I understand this has to do with PWM output and that the amplifier in my amplified speaker doesn't like it.
I do not want to add a extra audio shield, I am happy with my simple setup.

So the questions are:
1-Is there any way to add something between pin 9 and my amplified speaker to filter out the mess?
2-If I have to choose another kind of amplified speaker, what should I go for to avoid the problem?

For info about use of the pins:
Microphone is on pin A0
audio.speakerPin = 9
SD_ChipSelectPin 10
DmxSimple.usePin(3);

Can you tell us exactly how the speaker is connected, and how the amplifier is connected?

grgdpd:
1-Is there any way to add something between pin 9 and my amplified speaker to filter out the mess?

Yeah..... probably. Try an RC low pass filter, eg.... 680 Ohm resistor coming out from output, and other end of the resistor connected to a 0.1 microFarad capacitor to ground. Then take the point between the resistor and the capacitor as the filtered PWM. Could also use a 1 kilo-Ohm variable resistor or a 2 kilo-Ohm variable resistor (instead of the fixed 680 Ohm resistor).... just to twiddle the filter setting.

The filtered pwm will have DC in it. Remove it by first putting the filtered pwm signal through a voltage follower buffer circuit.... followed by a DC blocking capacitor. Then finally into an audio amplifier for driving your speaker.

tmd3:
Can you tell us exactly how the speaker is connected, and how the amplifier is connected?

I made a cable with jack 3.5 female to 2 pins.
The 2 pins go to 9 and ground.
the all-in-one mono cheap amplified speaker jack is connected to the female jack coming from Arduino.

Southpark:
Try an RC low pass filter

Got the components, tried and worked. Thanks a lot.
Fantastic.
+1

grgdpd:
Got the components, tried and worked. Thanks a lot.
Fantastic.
+1

Most welcome. Great to hear you got your system working.