Is there any way for implementing auto rap type functionality in Unity3d?

We need to input audio from the microphone, find it’s waveform and transform an already existing audio file to that waveform. It’s something like Auto-Rap but instead of the microphone recorded waveform that is super-imposed on an existing waveform, we need to transform an already existing audio file to the microphone recorded waveform. Is there any way this can be achieved in Unity? Can this be achieved using the GetSpectrumData function or FFT algorithm? Any input is appreciated.

Well I dont know how do to what your’e trying to do but i found a class that might help
http://docs.unity3d.com/ScriptReference/Microphone.html

hope this is somewhat helpful input