added timer to collect microphone data at regular interval