Professor McGonagall was still staring at him, and for a moment, Harry thought she was going to explode, but when she spoke, it was in a strangely croaky voice.
When you have a frog in your throat, it means you sound a bit croaky, a bit like that, and you need to cough because the froggy, croaky sound continues.