How do I use AudioRecordingManager to create wav file recording?

My objective is to get input from microphone and save it as a wav file.
The solution posted in the discussion
here

shows how to get the input and play it instantly. But I would like to record for a certain amount of time and save the output as wav file.

Upon searching the engine and plugin files, I found the AudioRecordingManager.cpp file under Plugins/Editor/AudioCapture which I assume is being used by the sequence recorder. Could someone help me figure out how to add this in my project and implement audio record feature.