These sorts of things feel like they would be quite inefficient on a general-purpose CPU so you would want to do them on some sort of dedicated DSP hardware instead. So I would expect an earbud to use some sort of specialized microcontroller with a slow-ish CPU core but extra peripherals to do all the signal processing and bluetooth-related stuff.