McDonald’s Corp. is designing voice-activated drive-throughs and robotic deep-fryers as the burger giant works to streamline its menu and operations to speed up service.

The company is testing voice-recognition software at a drive-through in suburban Chicago. Inside the restaurant, a robot also tosses chicken, fish and fries into vats of oil. Both technologies are meant to shorten customer wait times that executives acknowledge have grown in recent years. McDonald’s also has stopped serving some burgers and given franchisees...