1. A controller for a voice-controlled device, comprising: an environment detector, configured to detect an environment to obtain an environmental parameter associated with a volume value; a setting module, configured to set a threshold according to the environmental parameter, wherein the setting module sets the threshold to a higher threshold when the volume value is higher and sets the threshold to a lower threshold when the volume value is lower; and a recognition module, configured to receive a speech, to perform speech recognition on the speech to generate a confidence score of speech recognition, and to compare the confidence score of speech recognition with the threshold to generate a control signal.