Use the ADC on your PIC to record the voltage present at your microphone/speaker at a rate of twice the highest frequency you wish to record, and to play back the sounds simply send the values you recorded to a PORT at the same rate that you recorded the sound. The PORT will use an R2R network as a DAC.
If you wish to use sounds from your computer, simply convert your sound file to an 8-Bit Mono PCM wav format and convert it to HEX (Microsoft Windows comes with a sound recorder that saves to this format). Take the HEX version, remove the header, and set it as an array in your program.