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 (S1930) that the electronic device or an external server is to perform automated speech recognition, ASR, of a speech or an utterance (S1920) of a user of the electronic device , based on ambient noise information (S1910) 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 (S1950) of the speech or the utterance of the user of the electronic device based on outcome of the determining (S1940) step, and output (S1970) 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 (S1930) that the electronic device is to perform the ASR (S1950) 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 (S1930) that the external server is to perform the ASR (S1960) of the speech or the utterance of the user of the electronic device . determine (S1930) that the electronic device or an external server is to perform automated speech recognition, ASR, of a speech or an utterance (S1920) of a user of the electronic device , based on ambient noise information (S1910) 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 (S1950) of the speech or the utterance of the user of the electronic device based on outcome of the determining (S1940) step, and output (S1970) 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 (S1930) that the electronic device is to perform the ASR (S1950) 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 (S1930) that the external server is to perform the ASR (S1960) 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 (S1930) that the electronic device is to perform the ASR (S1950) 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 (S1930) that the external server is to perform the ASR (S1960) of the speech or the utterance of the user of the electronic device . <EOS>