Silly question. It is neither. No-one in their right mind would consider a loudspeaker as a motor, or as a generator. They are essentially defined by the output which they produce : a motor produces usable work, a generator produces the power which is required to make the motor work.
A loudspeaker is a transducer (that is, it converts energy from one form to another) : or, if you like, simply an amplifier (which converts a weak signal of some kind into a strong signal of the same kind). It uses feeble electric currents to produce movement in a diaphragm which generates sound waves (but that is a different use of the word "generate" (verb) to the meaning of "generator" (noun), which specifically applies to a machine which produces that useful work).
Motor, generator, and transducer, all denote particular kinds of machine, each with a particular purpose. A loudspeaker does not meet the conditions in the definition of a motor, or a generator.