All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Guttural sounds that come out unintentionally during prayer do not invalidate it. However, if one makes such sounds intentionally for no reason, then the prayer becomes invalid.
Ash-Sharnabaali, a Hanafi scholar, said in his book Maraaqi Al-Falaah: “Out of showing respect (to the prayer), one should repel coughing as much as possible, in order to avoid invalidating the prayer. This is because coughing without a valid excuse invalidates one's prayer, and the same applies to making guttural sounds.” [End of quote]
Allah knows best.