Contrafactum

In vocal music, contrafactum (or contrafact, pl. contrafacta) is "the substitution of one text for another without substantial change to the music". The earliest known examples of this "lyrical adaptation" date back to the 9th century in Gregorian chant.