Method and apparatus for providing voice assistant service
A method, performed by an electronic device, of providing a voice assistant service may include: obtaining voice data including an input of a voice of a user; according to a performance level based on performance state information of the electronic device, identifying a processing path for obtaining a response corresponding to the voice of the user and processing a user interface (UI) corresponding to the response; and based on the identified processing path, performing control operations to process the voice data and obtain and output the processed UI.
1 . A method, performed by an electronic device, of providing a voice assistant service, the method comprising:
obtaining voice data including a user voice input;
according to a performance level based on performance state information of the electronic device when the voice data is obtained, identifying a processing path for recognizing a voice command from the voice data and obtaining a response corresponding to the voice command, and for processing a user interface (UI) corresponding to the response; and
based on the identified processing path, performing a corresponding function to process the voice data and obtain and output the processed UI.
2 . The method of claim 1 , wherein the performance state information of the electronic device includes at least one of an amount of processor use, an amount of memory use, an input and output speed of a storage, or a transmission and reception speed of a network, with respect to the electronic device.
3 . The method of claim 1 , wherein the performance state information of the electronic device is obtained by monitoring, in real time, a performance state of the electronic device.
4 . The method of claim 1 , wherein the identifying of the processing path includes:
obtaining, based on the performance state information of the electronic device, a rule for identifying the performance level;
identifying the performance level, based on the obtained rule and the performance state information; and
identifying the processing path, based on the identified performance level.
5 . The method of claim 4 , wherein the obtaining of the rule includes:
training an artificial intelligence (AI) model by using the performance state information of the electronic device; and
obtaining, by using the trained Al model, the rule for identifying the performance level.
6 . The method of claim 1 , wherein the identifying of the processing path includes:
identifying the processing path such that the response corresponding to the voice command is obtained by the electronic device, when the performance level is lower than a first reference level; and
identifying the processing path such that the response corresponding to the voice command is obtained by a voice service server, when the performance level is higher than or equal to the first reference level.
7 . The method of claim 6 , wherein the performing of the corresponding function to process the voice data includes, when the processing path is identified such that the response corresponding to the voice command is obtained by the voice service server, transmitting the voice data to the voice service server.
8 . The method of claim 1 , wherein the identifying of the processing path includes:
identifying the processing path such that the UI is processed by the electronic device, when the performance level is lower than a second reference level; and
identifying the processing path such that the UI is processed by a cloud server, when the performance level is higher than or equal to the second reference level.
9 . The method of claim 8 , wherein the performing of the corresponding function to obtain and output the processed UI includes, when the processing path is identified such that the UI is processed by the cloud server, receiving, from the cloud server, video streaming including the processed UI.
10 . The method of claim 1 , wherein the performance level is identified as one of a first level, a second level, a third level, and a fourth level, and
the performing of the corresponding function to process the voice data and obtain and output the processed UI includes:
when the performance level is identified as the first level, performing the corresponding function to: obtain the response corresponding to the voice command; and process and output the UI corresponding to the response;
when the performance level is identified as the second level, performing the corresponding function to: request a voice service server to obtain the response corresponding to the voice command; receive, from the voice service server, the obtained response; and process and output the UI corresponding to the received response;
when the performance level is identified as the third level, performing the corresponding function to: request the voice service server to obtain the response corresponding to the voice command; and receive and output the UI corresponding to the obtained response, the UI being processed by a cloud server; and
when the performance level is identified as the fourth level, performing the corresponding function to: transmit the voice data to the cloud server; and receive and output the UI corresponding to the obtained response, the UI being processed by the cloud server.
11 . A non-transitory computer-readable recording medium having recorded thereon a program for causing a computer to perform the method of claim 1 .
12 . An electronic device for providing a voice assistant service, the electronic device comprising:
a memory storing instructions; and
at least one processor functionally integrated with the memory,
wherein the at least one processor is configured to execute the instructions to:
obtain voice data including a user voice input;
according to a performance level based on performance state information of the electronic device when the voice data is obtained, identify a processing path for recognizing a voice command from the voice data obtaining a response corresponding to the voice command, and for processing a user interface (UI) corresponding to the response; and
based on the identified processing path, perform a corresponding function to process the voice data and obtain and output the processed UI.
13 . The electronic device of claim 12 , wherein the performance state information of the electronic device includes at least one of an amount of processor use, an amount of memory use, an input and output speed of a storage, or a transmission and reception speed of a network, with respect to the electronic device.
14 . The electronic device of claim 12 , wherein the at least one processor is further configured to execute the instructions to obtain the performance state information of the electronic device by monitoring, in real time, a performance state of the electronic device.
15 . The electronic device of claim 12 , wherein the at least one processor is further configured to execute the instructions to:
obtain, based on the performance state information of the electronic device, a rule for identifying the performance level;
identify the performance level, based on the obtained rule and the performance state information; and
identify the processing path, based on the identified performance level.
16 . The electronic device of claim 15 , wherein the at least one processor is further configured to execute the instructions to:
train an artificial intelligence (AI) model by using the performance state information of the electronic device; and
obtain, by using the trained Al model, the rule for identifying the performance level.
17 . The electronic device of claim 12 , wherein the at least one processor is further configured to execute the instructions to:
identify the processing path such that the response corresponding to the voice command is obtained by the electronic device, when the performance level is lower than a first reference level; and
identify the processing path such that the response corresponding to the voice command is obtained by a voice service server, when the performance level is higher than or equal to the first reference level.
18 . The electronic device of claim 17 , wherein the at least one processor is further configured to execute the instructions to, when the processing path is identified such that the response corresponding to the voice command is obtained by the voice service server, transmit the voice data to the voice service server.
19 . The electronic device of claim 12 , wherein the at least one processor is further configured to execute the instructions to:
identify the processing path such that the UI is processed by the electronic device, when the performance level is lower than a second reference level; and
identify the processing path such that the UI is processed by a cloud server, when the performance level is higher than or equal to the second reference level.
20 . The electronic device of claim 19 , wherein the at least one processor is further configured to execute the instructions to, when the processing path is identified such that the UI is processed by the cloud server, receive, from the cloud server, video streaming including the processed UI.