Wave audio files are basically a wrapper with some header information around the plain PCM audio. All audio formats have to be converted back to PCM to be played by a computer anyway, that's one of the reasons that pretty much everything supports wave files.
In terms of getting PCM audio you can use the web audio API. It provides a method that takes any audio file supported by the platform and converts it into an "AudioBuffer" object which is a loose wrapper around the PCM data. Once you have that you basically need to find a way to pack it into a wave file.
I had a quick look and there's a rough method for creating a wave audio file here. It could do with tidying up, and it needs some minor adaptation but it's quite doable.
Most of this requires some sort of JS knowledge unfortunately...