(1) "unless I go in and 'add legacy hardware'"
That appears to be for legacy, non-plug & play devices. I doubt what you've got would be one of those. Others tried that, it isn't a solution. Has it put something into Device Manager that still is there after a reboot? I would seek to be rid of it.
(2) OK, I'm sure you tried the right Realtek audio driver. And trying a speakerless monitor probably proves that wasn't causing it, but I think that should be tried again -- if/when the Realtek device finally shows up properly installed under Realtek High Definition Audio (yet still won't produce sound).
I think, now, it won't install because the High Definition Audio Controller under System Devices is not functioning. That's the message I get from the thread JosephT71 found. And here is another...
[SOLVED] 'High Definition Audio Controller' cannot start. 'No audio device installed.' Device manager has no 'Sound and video game controller'. System information has nothing under 'Sound devices'.
JeromeBeckett solved the problem himself. It worked for others, but not for all. How's your luck? I've got just one High Definition Audio Controller. I suppose you've got the extra owing to the built-in external sound port. Probably it is the one w/o a Resources tab that is the problem, it needs to have one. Mine has 3 drivers, but none is RealTek, they all are Microsoft. Good luck.