the memory capacity of the 8051 is very small thus meaning that your design should take another dimension in terms of microcontroller, aslo the 8051 has no in-built ADC for this task.
you have to know that you cant make use of the 8051 for real time audio processing because the flash memory of the 8051 can not be written to in real time except during program downloading so you see the problem.
if at all you are to store any audio data to the 8051; then you must have done the audio sampling before hand, get the data, then add it up in your code just like a look up table. then you can call it like routine using the original sampling frequency that you used during the processing.
for you to do any audio encoding and decoding then you should go for a memory store; say something like a memory card and a ram that will serve as a buffer for your application then you can get for your self a good ADC with a good conversion time like the "ADC0820" that will meet up with the frequency of the audio signal assuming you are dealing with a 44000 Hz sampling.
you can optionally make use of an ATmega or PIC16xxx microcontroller with in built ADC but you have to know that their conversion time will not meet the demand of higher frequencies looking at the audio signal. they are limited to about 15KSPS.
hope this helps
...sequel