If it's an All-in-One unit no older than say 5 years, these models would beep VERY loudly if the power brick was of an UNDERRATED wattage. (eg. you're using a 65w adapter when the PC is expecting 90w) It beeps so loud that I've have people think the fire alarm is going off in the building.
Check the HP website for the wattage of the psu that was shipped with your unit & check it's the same as what you're using.
If it is, I guess it's possible that yours may have failed?
All HP all-in-ones (and older HP laptops), have the same power connector, so it's easy to mix them up if you've got more than one HP device in the home.
If you have trouble finding the correct adapter, share the exact model here and I'll have a look for you.