Smart devices respond to wake words like “Alexa,” “Hey, Siri,” or “OK, Google” using a machine-learning technique called keyword spotting.