Extract audio and save into wav file on call end

i have setup the one to one call in my react native project. and what I want is to extract the audio and save into wav or mp3 file on call ends. so that I can extract the transcription from that audio file.