refactor audio rec into "class" file