Record audio, calculate the frequency, and log it