Abstract: An electronic device may include a memory configured to store instructions; and a processor configured to execute the instructions to: receive a user command for a virtual assistant application of the electronic device to set an output sound level of the electronic device; receive a reference sound input based on the user command; determine a sound level of the reference sound input; and set the output sound level of the electronic device based on the determined sound level of the reference sound input.