Playing a low res WAV/PCM file using a Basic Stamp II microcontroler speaker
Convert your sound file to a WAV file:

mplayer -ao pcm music.mp3


Make an unsigned mono 8bit version at the desired sample rate:

sox audiodump.wav -c 1 -r 8000 -u -1 converted.wav


Convert the samples to a C header file (get wav2c):

wav2c converted.wav sounddata.h sounddata


(For your BASIC Stamp, you'll need to convert this array into some other format).

Then, in your application you need to read one sample from the array each time the sample rate duration expires and transmit it out of your PWM pin.