Unreal 5 C++ gets a wav file from text-to-speech. This file is generated dynamically, so it is not a UE asset, but I want to play the sound file after it is generated.

I haven’t personally tried this, but it looks like there are at least a couple plugins that allow you to play audio files from the disk. Maybe try one of these: