Catalyzes the synthesis of carnosine and homocarnosine. Carnosine is synthesized more efficiently than homocarnosine. . This is the function of CARNS1 (carnosine synthase 1, ENSG00000172508).