Save Audio Record During GamePlay

Hi All-

I am looking for a way to save the audio record during gameplay.

The raw audio data is from VoiceCaptureInterface->GetVoiceData(CaptureData.GetData(), NewVoiceDataBytes, NewVoiceDataBytes);

VoiceCaptureInterface is define as TSharedPtr<class IVoiceCapture> VoiceCaptureInterface;

So how can i save the raw data “CaptureData” as wav or pcm ? Or can i just use it as pcm data?