An electronic device comprising: a microphone; a display; a camera; a memory; and a processor, wherein the processor is configured to: receive a first utterance input through the microphone, obtain first recognized data from a first image displayed on the display or stored in the memory, wherein the first recognized data comprises information of an object or a text included in the first image; store the first recognized data in association with the first utterance input when the first recognized data matches the first utterance input, activate the camera when the first recognized data does not match the first utterance input, obtain second recognized data from a second image collected through the camera, wherein the second recognized data comprises information of an object or a text included in the second image, and store the second recognized data in association with the first utterance input when the second recognized data matches the first utterance input, wherein the processor is further configured to analyze the first image or the second image when the first utterance input includes a designated keyword or a parameter to perform a task corresponding to the first utterance input is omitted. a microphone; a display; a camera; a memory; and a processor, wherein the processor is configured to: receive a first utterance input through the microphone, obtain first recognized data from a first image displayed on the display or stored in the memory, wherein the first recognized data comprises information of an object or a text included in the first image; store the first recognized data in association with the first utterance input when the first recognized data matches the first utterance input, activate the camera when the first recognized data does not match the first utterance input, obtain second recognized data from a second image collected through the camera, wherein the second recognized data comprises information of an object or a text included in the second image, and store the second recognized data in association with the first utterance input when the second recognized data matches the first utterance input, wherein the processor is further configured to analyze the first image or the second image when the first utterance input includes a designated keyword or a parameter to perform a task corresponding to the first utterance input is omitted. receive a first utterance input through the microphone, obtain first recognized data from a first image displayed on the display or stored in the memory, wherein the first recognized data comprises information of an object or a text included in the first image; store the first recognized data in association with the first utterance input when the first recognized data matches the first utterance input, activate the camera when the first recognized data does not match the first utterance input, obtain second recognized data from a second image collected through the camera, wherein the second recognized data comprises information of an object or a text included in the second image, and store the second recognized data in association with the first utterance input when the second recognized data matches the first utterance input, wherein the processor is further configured to analyze the first image or the second image when the first utterance input includes a designated keyword or a parameter to perform a task corresponding to the first utterance input is omitted. <EOS>