Have a frog in one’s throat

To have a feeling of a hoarse throat, to be unable to speak.

I had a frog in my throat and could not speak easily in front of the class.