writing .wav file to sd card??

let say, i have record speech signal upto 5kHz only, then i think it should be possible, i just want to write a wav file to sd, it may get be slow.
i just want to know. how to write a wave file to sd card??