EtiTheSpirit/WEMConverter

cyberpunk 2077 wem files do not convert correctly

aaaaaaaaahhhhh opened this issue · 6 comments

i dont know what format these audio files are in but im pretty sure its ogg. regardless, it does not work with these files.

it makes this error:

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at WEMCompiler.WWWem.DataChunks.WEMDataChunk.CreateFromStream(BinaryReader reader, WEMFormatChunk fmtChunk)
at WEMCompiler.WWWem.WEMFile..ctor(String path)
at WEMCompilerTool.Program.Main(String[] args)

I was trying to use this for cp77 files a while ago. I don't know why they fail.

Thankfully, it's actually super easy. So you know the .bin files you pull out of the audio archive? Open up audacity, go to Import => Raw Audio, and set the settings to Signed 16 bit little endian at 48000Hz stereo and import. The bin files are just raw audio data. Might need to trim off a little pop at the start at the worst, and the WEM files may do this as well, I don't know.

Only some of them work with this method, but it should be enough to get you the audio files you want.

Not at my computer rn but i will try this

Bump @EtiTheSpirit Could you maybe see if you could write a simple converter for these files ? ( I'd love to use it in WolvenKit)

Thanks in advance!

Yeah but it's gonna be a while before I can allocate time to this. I got so much garbage on my plate right now.

What a nice tool to have! It works for PCM wem files perfectly and I love it. Thanks for making it.
However, for ogg vorbis wem files from wwise it doesn't work. (I got an error just like aaaaaaaaahhhhh had)
For ADPCM wem files this also doesn't work. It converts the file (no errors), but the output file's content is junk.
(btw I was testing with wwise 2015.1.9)

Yeah I mostly designed this with raw WAV in mind. All of the other, what, 9 encoding formats(?) that WEM can be in are completely unsupported because this was mostly designed with No Man's Sky in mind, which uses s16le PCM.