The application provides a
speech recognition method and an electronic device. In the method, the electronic device acquires audio input by a user; the electronic device detects a speech environment when the user inputs the audio, and determines a
speech interaction mode corresponding to the audio according to the audio; and the electronic device performs
speech recognition on the audio according to a
speech recognition mode corresponding to the
speech interaction mode, and obtains a speech recognition result. Through the scheme, the electronic device can detect the environment when the user inputs the audio, determine that the user is in a noisy, quiet, or other speech environment, and further determine the
speech interaction mode. The electronic device can perform corresponding speech recognition on the acquired audio through the speech recognition mode corresponding to the speech
interaction mode, thereby improving the accuracy of speech recognition.