Text this: Automatic and real-time locomotion mode recognition of a humanoid robot