It is probably from the speaker, as if the fan was doing that, the MacBook would probably overheat and shut off.
open