Use a 1 uF capacitor between the arduino output pin and this:
connect the 1000 ohm side to the capacitor and the 8 ohm side to the speaker.
Use a 1 uF capacitor between the arduino output pin and this:
connect the 1000 ohm side to the capacitor and the 8 ohm side to the speaker.