Added functions for sound recording.