recording functionalities moved out of audioAnalysis.py