Selective Mutism 

Selective Mutism is an anxiety disorder characterized by not speaking outside the home to select individuals or in select settings, which continues for more than one month.

Most commonly found in children, they understand spoken language and have the ability to speak but often are reluctance to speak in some settings, and have a phobia of speaking and fear of people. Selective Mutism is related to severe anxiety, shyness, and social anxiety.

definition from Selective Mutism Foundation