Record and play using piezo microphone and speaker

I was wondering whether i can record and play using piezo microphone and speaker. Please give me some ideas since i am a beginner. I have the arduino atmega8 board.

Sure, using the onboard A/D and then PWM on the output side. Just not for very long or with very high fidelity due to limited onboard SRAM and A/D sampling rate. With atmega8, even less! Have you consired adding some external hardware?

Just not for very long

And that means about a quarter of a second.