Sample code for microphone recording