An electronic device includes a speaker, a sensor, a communication circuit, a processor, and a memory to store instructions. The instructions, when executed by the processor, cause a
wireless audio device to, while outputting a
signal for reducing an external sound through the speaker, identify, using the communication circuit, an external electronic device, identify, using the sensor, a conversation responsive to a location of the external electronic device satisfying a specified condition, responsive to identifying the conversation, stop an output of the
signal for reducing the external sound for a first period of time, and responsive to identifying a specified keyword included in the conversation, prolong stopping the output of the
signal for reducing the external sound for a second period of time.