Echolalia
The involuntary parrotlike repetition (echoing) of a word or phrase just spoken by another person.
Echolalia is a feature of schizophrenia (especially the catatonic form), Tourette syndrome, and some other disorders.
From echo + the Greek lalia, a form of speech