UE4 play a specific sound without directly imported from a file

hello, I have a problem about importing a sound file, .wav file, to UE browser. The demand is that, when you click the button on the UI of a level, a window then will appeared, which can provide a series of options that are paths, where my audio is saved. So basically, I need to get my audio file from a path , instead of directly importing it to BP or something else. I have looked into many documentations about sound and audio, but I still have no idea of how to design it. I hope to get some help from you, thank you very much.

Are you asking how to import the sound into UE4, or how to hook it up to a button in BP?

It sounds like he’s wanting to make it a function of his game/project to be able to browse to disk select a sound from disk, and play it directly.

There is no direct support for that but if you’re a programmer you can technically do it. You’d have to load the .wav file yourself, parse it, then create a new USoundWave UObject, then feed the parsed PCM data into the object directly. That USoundWave object can then be saved as an asset I believe… I’m not super familiar with that side of UE4 (creating new UObject/UAssets from user-generated content… where to store it, etc). But I believe it’s possible. Then once you have a USoundWave, you can play it through the audio engine using the normal playsound/spawnsound API, etc.

It’s certainly not going to be an easy thing and there’s no documentation about how to do it.

Yeah, and I have solved it. Thanks!

Thank you for your detail explanations, and by the way, not he, I am a girl.