Palilalia (from the Greek πάλιν (pálin) meaning "again" and λαλιά (laliá) meaning "speech" or "to talk"), a complex tic, is a language disorder characterized by the involuntary repetition of syllables, words, or phrases. It has features resembling other complex tics such as echolalia or coprolalia, but, unlike other aphasias, palilalia is based upon contextually correct speech.

Palilalia is considered an aphasia, a disorder of language, and is not to be confused with speech disorders, as there is no difficulty in the formation of internal speech. Palilalia is similar to speech disorders such as stuttering or cluttering, as it tends to only express itself in spontaneous speech, such as answering basic questions, and not in automatic speech such as reading or singing; however, it distinctively affects words and phrases rather than syllables and sounds.

Palilalia may occur in conditions affecting the pre-frontal cortex or basal ganglia regions, either from physical trauma, neurodegenerative disorders, genetic disorders, or a loss of dopamine in these brain regions. Palilalia occurs most commonly in Tourette syndrome and may be present in neurodegenerative disorders like Alzheimer's disease and progressive supranuclear palsy.

https://en.wikipedia.org/wiki/Palilalia