An electronic device comprising: a memory storing one or more instructions; and at least one processor configured to execute the one or more instructions stored in the memory, wherein when executing the one or more instructions the at least one processor is configured to: determine that the electronic device or an external server is to perform automated speech recognition, ASR, of a speech or an utterance of a user of the electronic device, based on ambient noise information of the electronic device obtained from an audio signal of the speech or the utterance of the user of the electronic device and whether a particular keyword is recognized in the speech or the utterance of the user of the electronic device, perform the ASR of the speech or the utterance of the user of the electronic device based on outcome of the determining step, and output a response to the speech or the utterance of the user of the electronic device, based on a result of performing the ASR (S1950, S1960) of the speech or the utterance of the user of the electronic device, and wherein the at least one processor is further configured to execute the one or more instructions to: extract a keyword included in the speech or the utterance of the user of the electronic device based on the ambient noise information indicating that an ambient noise level of the electronic device has a value in a preset range, and determine that the electronic device is to perform the ASR of the speech or the utterance of the user of the electronic device based on the extracted keyword being the particular keyword and otherwise determine that the external server is to perform the ASR of the speech or the utterance of the user of the electronic device. determine that the electronic device or an external server is to perform automated speech recognition, ASR, of a speech or an utterance of a user of the electronic device, based on ambient noise information of the electronic device obtained from an audio signal of the speech or the utterance of the user of the electronic device and whether a particular keyword is recognized in the speech or the utterance of the user of the electronic device, perform the ASR of the speech or the utterance of the user of the electronic device based on outcome of the determining step, and output a response to the speech or the utterance of the user of the electronic device, based on a result of performing the ASR (S1950, S1960) of the speech or the utterance of the user of the electronic device, and wherein the at least one processor is further configured to execute the one or more instructions to: extract a keyword included in the speech or the utterance of the user of the electronic device based on the ambient noise information indicating that an ambient noise level of the electronic device has a value in a preset range, and determine that the electronic device is to perform the ASR of the speech or the utterance of the user of the electronic device based on the extracted keyword being the particular keyword and otherwise determine that the external server is to perform the ASR of the speech or the utterance of the user of the electronic device. extract a keyword included in the speech or the utterance of the user of the electronic device based on the ambient noise information indicating that an ambient noise level of the electronic device has a value in a preset range, and determine that the electronic device is to perform the ASR of the speech or the utterance of the user of the electronic device based on the extracted keyword being the particular keyword and otherwise determine that the external server is to perform the ASR of the speech or the utterance of the user of the electronic device.