Record audio in ionic pwa


I am stuck in one issue. I want to record audio in mp3(or in wav and then convert it to mp3) format and upload it to server in ionic progressive web app. I tried multiple libraries, but i am unable to achieve this. Also when i am trying to implement window.AudioContext throwing error

“Property ‘AudioContext’ does not exist on type ‘Window’”.

Please guide.