This paper presents an environment recognition method for bipedal robots using a time-delay neural network. For a robot to walk in a varying terrain, it is desirable that the robot can adapt to any environment encountered in real-time. This paper aims to develop a sensory mapping unit to recognize environment types from the input sensory data based on an artificial neural network approach. With the proposed sensory mapping design, a bipedal walking robot can obtain real-time environment information and select an appropriate walking pattern accordingly. Due to the time-dependent property of sensory data, the sensory mapping is realized by using a time-delay neural network. The sensory data of earlier time sequences combined with current sensory data are sent to the neural network. The proposed method has been implemented on the humanoid robot NAO for verification. Several interesting experiments were carried out to verify the effectiveness of the sensory mapping design. The mapping design is validated for the uphill, downhill and flat surface cases, where three types of environment can be recognized by the NAO robot online.