I note that I've done most of my actual file and audio processing under either macOS or Linux, where I'm much more familiar with the scripting tools. I might not be able to help you as much I'd like.
I'd suggest taking a look at my voicepack template or at least Kregano's tutorial that it's based off.
Why? Well, Kregano's tutorial covers using a script (by robojumper) that fixes several problems with the built-in approach to voice 'banks', and my template then tries to help you avoid having to decide what to name bits of code and stuff.
If you do try my template, I suggest calling your project and your mod something like 'SlickSlothGrenadierVoice' or something (without spaces, and the same name for the project and mod) otherwise it ends up even more confusing in places...
I wrote the section below first, but actually Audacity seems to be able to open .smf files directly. I guess it just ignores the bits it can't understand and interprets it as an Ogg Vorbis file?
So you can probably just skip the next bit.
.smf files from CoH2 contain Ogg Vorbis compressed audio, but they have 16 bytes of something at the start of them, so the trick is to cut that off. Mostly people talk about doing this by hand with a hex editor, which is clearly a pain to do for lots at once. (To be clear, they're not "Standard Midi Files" - that's just a coincidence.)
The Ruby script below uses the Unix command tail to take each smf file in the same directory as it, skip until the 17th byte and then pass that to ffmpeg to copy into a .ogg file (just to make sure that the container file is correctly structured).
Dir.glob("*.smf") do |in_name|
out_name = File.basename(in_name, '.smf')+".ogg"
`tail -c +17 "#{in_name}" | ffmpeg -i - -acodec copy "#{out_name}"`
end
I'm not what the best approach is under Windows, because I don't know that it includes utilities built for this sort of thing. You might able to use this version of dd and then maybe something like this (saved as a .bat file and run in a folder with the dd.exe and all the .smf files):
forfiles /s /m *.smf /c "dd.exe if=@path [email protected] skip=16"
XCOM2 (/ Unreal Engine 3) requires its sound files to be in a particular format - mono, 16-sample 44.1kHz PCM wave files.
The easiest thing is probably just to use Audacity - which will also let you fiddle with the volume, add a radio effect filter and so on - and then export to the correct format. I think Kregano's tutorial covers this.