Sounds like a software problem. Does the Sound Preference Panel open up correctly? Is the mute function enabled or not? How's the Speaker Icon in the menu bar on the top-right? Can you boot with an external HD with an another version of your system and check if it works correctly?
mmmm diagnosis? I mean seems that the replaced part is causing a over heat problem. So the part could be failure or the replacement did somehow wrong; I would try to open the iMac and unscrew the power supply and put it again in the same place to see if it was mount not properly. If not succeded should ask for a replacement to who sold it to you