Hi ,
Yes you can try disabling internal speaker in BIOS setup by following the steps given below,
Keep tapping function Key F10 to get into BIOS setup on power on.
Once in BIOS setup please go the Menu Advanced>Device Options> Select Disable for Internal Speaker.
Press F10 to save Changes and Exit.
This should work, however if the issue still persists i would suggest to contact Hp support and get the speaker/system board replaced for one time fix.