Voice command response method and device, storage medium and electronic device
By using neural networks in smart speakers to estimate the user's age and adjust the volume, the problem of inconsistent volume settings for users of different ages is solved and the user experience is improved.
Patent Information
- Application Number
- CN202210284357.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-03-22
AI Technical Summary
Existing smart speakers cannot set different playback volumes according to users of different ages, resulting in poor user experience.
By obtaining the voiceprint information in the voice command, input the neural network model to estimate the user's age, determine the appropriate playback volume based on the preset age interval settings, and send it to the target device for response.
It realizes dynamically adjusting the volume according to the user's age, improves the user experience of users of different ages, and solves the problem of inconsistent volume settings.
Smart Images

Figure CN114708872B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a method and device for responding to voice commands, a storage medium and an electronic device. Background Art
[0002] The smart speaker is a product of a speaker upgrade. It is a tool for home consumers to access the Internet using voice, such as ordering songs, shopping online, or getting weather forecasts. It can also control smart speaker devices, such as opening curtains, setting refrigerator temperature, and heating up the water heater in advance.
[0003] In actual application scenarios, users of different ages can control smart speakers, including the elderly, young and middle-aged people, children, etc. Users of different age groups have different levels of perception and acceptance of volume. If the same volume control strategy is used for all, a poor user experience will be obtained.
[0004] For example, the hearing of the elderly is generally worse than that of children, so they may adjust the volume of the smart speaker to a higher level; when children operate it at the same time, the volume will be higher, and long-term use may affect the hearing of children, but if the volume is too high, it will affect the normal use of the smart speaker by the elderly. Existing devices do not set different volumes for different users.
[0005] With regard to the related technology, there is no effective solution to the problem that different playback volumes cannot be set for users of different ages.
[0006] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention
[0007] The embodiments of the present invention provide a method and device for responding to a voice command, a storage medium, and an electronic device, so as to at least solve the problem that different playback volumes cannot be set for users of different ages.
[0008] According to one aspect of an embodiment of the present invention, there is provided a method for responding to voice commands, comprising: obtaining a voice command of a target object, and determining target voiceprint information of the target object according to the voice command; inputting the target voiceprint information into a target neural network model to obtain an estimated age of the target object; when the estimated age of the target object is within a preset target age range, determining a playback setting having a preset corresponding relationship with the target age range, the playback setting including a target playback volume; sending the playback setting to a target device, and controlling the target device to respond to the voice command of the target object according to the playback setting.
[0009] According to another aspect of an embodiment of the present invention, a device for responding to voice commands is also provided, including: a first determination module, used to obtain a voice command of a target object, and determine target voiceprint information of the target object according to the voice command; a second determination module, used to input the target voiceprint information into a target neural network model to obtain an estimated age of the target object; a third determination module, used to determine a playback setting having a preset corresponding relationship with the target age range when the estimated age of the target object is within a preset target age range, the playback setting including a target playback volume; and a response module, used to send the playback setting to a target device, and control the target device to respond to the voice command of the target object according to the playback setting.
[0010] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for responding to voice instructions when running.
[0011] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for responding to the voice command through the computer program.
[0012] Through the present invention, when the voice command of the target object is obtained, the target voiceprint information of the target object is determined according to the voice command, and the estimated age of the target object and the target playback volume corresponding to the estimated age are determined according to the target voiceprint information, and then the target device is controlled to respond to the voice command of the target object according to the target playback volume. The above technical solution solves the problem of not being able to set different playback volumes for users of different ages. Then, the user's age can be determined according to the user's voice, and then the playback volume of the device can be determined according to the age, which improves the user's experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0014] Figure 1 It is a hardware structure block diagram of a computer terminal of the voice command response method of an embodiment of the present invention;
[0015] Figure 2 is a flow chart of a method for responding to a voice command according to an embodiment of the present invention (I);
[0016] Figure 3is a schematic diagram of a scenario of a method for responding to a voice command according to an embodiment of the present invention;
[0017] Figure 4 is a flow chart of a method for responding to a voice command according to an embodiment of the present invention (II);
[0018] Figure 5 is a structural block diagram of a device for responding to a voice command according to an embodiment of the present invention (I);
[0019] Figure 6 2 is a structural block diagram of a device for responding to voice commands according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0022] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a computer terminal of a method for responding to a voice command according to an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a microprocessor (Microprocessor Unit, referred to as MPU) or a programmable logic device (Programmable logic device, referred to as PLD)) and a memory 104 for storing data. In an exemplary embodiment, the computer terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Equivalent functions or comparisons shown Figure 1 A different configuration with more features is shown.
[0023] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for responding to voice commands in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0024] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0025] In order to solve the above problems, a method for responding to a voice command is provided in this embodiment. The method for responding to a voice command in the embodiment of the present application includes but is not limited to being applied in a cloud server. Figure 2 1 is a flow chart of a method for responding to a voice command according to an embodiment of the present invention (I), the flow chart comprising the following steps:
[0026] Step S202, obtaining a voice command of a target object, and determining target voiceprint information of the target object according to the voice command;
[0027] Step S204, inputting the target voiceprint information into a target neural network model to obtain an estimated age of the target object;
[0028] It should be noted that the target neural network model is used to determine the corresponding estimated age based on the input voiceprint information;
[0029] Step S206, when the estimated age of the target object is within a preset target age range, determining a playback setting having a preset corresponding relationship with the target age range, wherein the playback setting includes a target playback volume;
[0030] For a better understanding, assuming that the estimated age is 15 years old, in the age range of (10-20), the playback volume corresponding to the preset age range of (10-20) is determined as the target playback volume. Assuming that the estimated age is 65 years old, in the age range of (60-70), the playback volume corresponding to the preset age range of (60-70) is determined as the target playback volume. It should be noted that due to different physiological characteristics of people of different ages, the acceptable volume is also different, and thus the playback volume corresponding to the age range of (10-20) is different from the playback volume corresponding to the age range of (60-70).
[0031] Step S208: sending the play settings to the target device, and controlling the target device to respond to the voice command of the target object according to the play settings.
[0032] It should be noted that the target device of this embodiment includes but is not limited to: a smart speaker and a device with a voice function. The target object includes but is not limited to a user who uses the target device.
[0033] As an optional example, the above step S208 may be implemented in the following manner: determining the response audio according to the semantic information corresponding to the voice instruction; and controlling the target device to play the response audio at the target playback volume.
[0034] That is to say, the cloud server will determine the semantic information based on the voice command, and then search on the Internet based on the semantic information, and then determine the response audio. For a better understanding, as an optional example, assume that the voice command recognized by the cloud server is "Please play a song", and then the cloud server can determine the target music according to the user's preference, and send it to the target device, controlling the target device to play the target music at the target playback volume.
[0035] Through the above steps, when the voice command of the target object is obtained, the target voiceprint information of the target object is determined according to the voice command, and the estimated age of the target object and the target playback volume corresponding to the estimated age are determined according to the target voiceprint information, and then the target device is controlled to respond to the voice command of the target object according to the target playback volume. The above technical solution solves the problem of not being able to set different playback volumes for users of different ages. Then, the user's age can be determined according to the user's voice, and the playback volume of the device can be determined according to the age, which improves the user's experience.
[0036] In an exemplary embodiment, after obtaining the target voiceprint information of the target object, it is also necessary to determine whether the target voiceprint information exists in a preset target voiceprint library.
[0037] If the target voiceprint information exists in the target voiceprint library, the target playback volume is determined according to the historical operation log corresponding to the target voiceprint information. It should be noted that the historical operation log is used to store the historical playback volume corresponding to the target voiceprint information.
[0038] It should be noted that the target voiceprint information can uniquely identify the user, and the historical operation log stores the historical playback volume when the target device plays reply messages to the user, and the target playback volume can be determined by the target voiceprint information.
[0039] If the target voiceprint information does not exist in the target voiceprint library, the target voiceprint information is input into the target neural network model to obtain the estimated age of the target object.
[0040] In an exemplary embodiment, determining the target playback volume according to the historical operation log corresponding to the target voiceprint information can be achieved in the following manner:
[0041] In the case where there is a historical playback volume corresponding to the target voiceprint information in the historical operation log, the target playback volume is determined as an average value of the historical playback volumes, or a previous playback volume in the historical playback volumes, or a median of the historical playback volumes;
[0042] When there is no historical playback volume corresponding to the target voiceprint information in the historical operation log, the target playback volume is determined as a preset volume corresponding to the target voiceprint information.
[0043] That is to say, assuming that the user's target voiceprint information exists in the cloud server, but it may be saved when the user registered, but the user has not used this device since registration, then when the user uses this device for the first time, since there is no playback record, the volume set by the user in advance will be used as the target playback volume.
[0044] In an exemplary embodiment, since noise may suddenly appear around the user while the user is speaking, the obtained audio may be interfered by noise, making the recognized voiceprint information inaccurate. In order to improve the recognition accuracy, the target voiceprint information of the target object is determined according to the voice command. The following method can be used: split the voice command to obtain multiple sub-audios, and determine the sub-voiceprint information of the target object according to each sub-audio of the multiple sub-audios to obtain multiple sub-voiceprint information, and then determine the target voiceprint information of the target object according to the multiple sub-voiceprint information.
[0045] In other words, noise may not always exist, that is, there may be a period of time in the voice command when there is no noise. Then, the user's voiceprint information can be determined by splitting the voice command and determining the voiceprint of each sub-audio, which can improve the recognition accuracy.
[0046] In an exemplary embodiment, determining the estimated age of the target object may be achieved by:
[0047] Step S1: split the voice command to obtain multiple sub-audios; determine multiple sub-voiceprint information corresponding to the target object according to each of the multiple sub-audios, where it should be noted that the target voiceprint information includes the multiple sub-voiceprint information;
[0048] Step S2: inputting each sub-voiceprint information of the plurality of sub-voiceprint information into the target neural network model respectively, and determining the sub-voiceprint feature corresponding to each sub-voiceprint information;
[0049] Step S3: classifying the multiple sub-voiceprint features through the target neural network, and determining the predicted age corresponding to each sub-voiceprint feature;
[0050] Step S4: performing weighted summation on the determined multiple predicted ages to obtain the estimated age of the target object.
[0051] In other words, multiple sub-voiceprint information can be merged first, and then the obtained target voiceprint information can be input into the target neural network model to obtain the estimated age. Alternatively, multiple sub-voiceprint information can be input into the target neural network model separately to obtain multiple predicted ages, and then weighted summation can be performed to obtain the estimated age. The above technical solution can improve the accuracy of recognition.
[0052] In an exemplary embodiment, before inputting the target voiceprint information into the target neural network model, the following steps need to be performed:
[0053] Step S1: Obtain a training sample set;
[0054] It should be noted that each training sample in the training sample set includes the sample voiceprint information of the sample object and the actual age of the sample object.
[0055] Step S2: training the original neural network model to be trained by using the training sample set, and when the loss value between the estimated age of the sample object and the actual age of the sample object does not meet the preset loss condition, adjusting the parameters in the original neural network model, and continuing to train the original neural network model; when the loss value between the estimated age of the sample object and the actual age of the sample object meets the preset loss condition, ending the training, and determining the original neural network model at the end of the training as the target neural network model;
[0056] It should be noted that the estimated age of the sample object is the age determined by the original neural network model based on the sample voiceprint information in the training sample.
[0057] It should be noted that the above original neural network model includes but is not limited to a convolutional neural network model, a recursive neural network model, and a deep belief network model. Optionally, the loss value between the estimated age of the sample object and the actual age of the sample object can be calculated by a loss function.
[0058] In an exemplary embodiment, in the process of controlling the target device to respond to the voice command of the target object according to the playback setting, if a volume adjustment command of the target object is obtained, a first volume adjustment amplitude corresponding to the target age range is determined in response to the volume adjustment command, and the target playback volume is adjusted to the first playback volume according to the first volume adjustment amplitude, thereby controlling the target device to continue responding according to the first playback volume; it should be noted that the volume adjustment instruction is used to adjust the volume of the corresponding response audio of the voice command played by the target device.
[0059] It should be noted that the first volume adjustment amplitude is different from the default first volume adjustment amplitude. For example, the default volume adjustment amplitude is 1 unit, while in the age range of (10-20), the corresponding first volume adjustment amplitude is 2 units of volume, and in the age range of (60-70), the corresponding first volume adjustment amplitude is 4 units of volume.
[0060] For example, when the first user (65 years old) uses the target device to play music, if a volume adjustment instruction (turn up the volume) is issued, the target device will increase the volume by 4 units based on the original playback volume. If the second user (15 years old) uses the target device to play music and a volume adjustment instruction (turn up the volume) is issued, the target device will only increase the volume by 2 units based on the original playback volume.
[0061] In an exemplary embodiment, after controlling the target device to respond to the voice command of the target object according to the playback setting, if a replay instruction issued by the target object is obtained, in response to the replay instruction, a second volume adjustment amplitude corresponding to the target age range is determined; according to the second volume adjustment amplitude, the target playback volume is adjusted to a second playback volume; and the target device is controlled to respond to the voice command of the target object again according to the playback setting. It should be noted that the replay instruction is used to instruct the target device to respond to the voice instruction again. The second volume adjustment amplitude is the volume value that needs to be increased based on the previous playback volume when the replay instruction is obtained.
[0062] For example, if the user (65 years old) issues a replay command, the cloud server will control the target device to increase the volume by 4 units based on the last playback volume and replay the corresponding response audio of the voice command. If the user (11 years old) issues a replay command, the cloud server will control the target device to increase the volume by 2 units based on the last playback volume and replay the corresponding response audio of the voice command.
[0063] Optionally, the first volume adjustment range and the second volume adjustment range may be the same or different. The second volume adjustment range may be the same or different from a default second volume adjustment range.
[0064] Obviously, the above described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. In order to better understand the above voice command response method, the above process is described below in conjunction with the embodiments, but it is not intended to limit the technical solution of the embodiments of the present invention. Specifically:
[0065] In an alternative embodiment, Figure 3 It is a scene diagram of the method for responding to voice commands according to an embodiment of the present invention. Specifically, users using the speaker include: children, middle-aged people, elderly people, etc.
[0066] Figure 4 Flowchart (II) of the method for responding to a voice command according to an embodiment of the present invention, specifically, comprising the following steps:
[0067] Step S402: the smart speaker obtains the voice command issued by the user, and the smart speaker system obtains voiceprint data (equivalent to the target voiceprint information in the above embodiment);
[0068] Step S404, the smart speaker system determines the user's age level based on the voiceprint;
[0069] Assume that user A is determined to be a 60-year-old man and user B is determined to be a 6-year-old child.
[0070] Step S406, querying the age volume table in the smart speaker system to obtain the volume parameter corresponding to the age;
[0071] Continuing with the above example, for a certain smart speaker product, a 60-year-old person generally sets the volume to 50 units, and a child under 10 years old generally sets the volume to 25 units.
[0072] Step S408: The intelligent speaker system adjusts the speaker volume parameters.
[0073] Continuing with the above example, assume that when user A uses it, the system automatically adjusts the volume to 50 units; when user B uses it, the system automatically adjusts the volume to 25 units.
[0074] That is to say, the smart speaker system has a voiceprint age model (equivalent to the target neural network model in the above embodiment) and an age volume meter. When receiving user operation instructions, the smart speaker system obtains the user's voiceprint, accurately determines the user's age, and automatically adjusts the volume of the smart speaker according to the volume meter.
[0075] In addition, according to the above technical solution of the embodiment of the present invention, users of different ages can obtain a comfortable volume when using the smart speaker, thereby improving the user experience of the smart speaker and enhancing the intelligence and market competitiveness of the product.
[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.
[0077] In this embodiment, a device for responding to voice commands is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0078] Figure 5 1 is a structural block diagram of a device for responding to a voice command according to an embodiment of the present invention (I), the device comprising:
[0079] A first determination module 52 is used to obtain a voice command of a target object and determine target voiceprint information of the target object according to the voice command;
[0080] A second determination module 54 is used to input the target voiceprint information into a target neural network model to obtain an estimated age of the target object;
[0081] A third determination module 56 is used to determine a playback setting having a preset corresponding relationship with the target age interval when the estimated age of the target object is within a preset target age interval, wherein the playback setting includes a target playback volume;
[0082] The response module 58 is used to send the playback setting to the target device, and control the target device to respond to the voice instruction of the target object according to the playback setting.
[0083] Through the above device, when the voice command of the target object is obtained, the target voiceprint information of the target object is determined according to the voice command, and the estimated age of the target object and the target playback volume corresponding to the estimated age are determined according to the target voiceprint information, and then the target device is controlled to respond to the voice command of the target object according to the target playback volume. The above technical solution solves the problem of not being able to set different playback volumes for users of different ages. Then, the user's age can be determined according to the user's voice, and the playback volume of the device can be determined according to the age, which improves the user's experience.
[0084] Figure 6 2 is a structural block diagram of a device for responding to voice commands according to an embodiment of the present invention. The device includes: a fourth determination module 60 and a training module 62.
[0085] In an exemplary embodiment, the fourth determination module 60 is used to determine whether the target voiceprint information exists in a preset target voiceprint library; when the target voiceprint information exists in the target voiceprint library, the target playback volume is determined according to the historical operation log corresponding to the target voiceprint information, wherein the historical operation log is used to store the historical playback volume corresponding to the target voiceprint information.
[0086] In an exemplary embodiment, the second determination module 54 is used to input the target voiceprint information into the target neural network model to obtain the estimated age of the target object if the target voiceprint information does not exist in the target voiceprint library.
[0087] In an exemplary embodiment, the fourth determination module 60 is further used to determine the target playback volume as the average value of the historical playback volumes, or the previous playback volume in the historical playback volumes, when there is a historical playback volume corresponding to the target voiceprint information in the historical operation log; and to determine the target playback volume as the preset volume corresponding to the target voiceprint information, when there is no historical playback volume corresponding to the target voiceprint information in the historical operation log.
[0088] In an exemplary embodiment, the first determination module 52 is also used to split the voice command to obtain multiple sub-audios; determine the sub-voiceprint information of the target object according to each sub-audio of the multiple sub-audios to obtain multiple sub-voiceprint information; and fuse the multiple sub-voiceprint information to obtain the target voiceprint information.
[0089] In an exemplary embodiment, the first determination module 52 is further used to split the voice command to obtain multiple sub-audios; determine multiple sub-voiceprint information corresponding to the target object based on each sub-audio in the multiple sub-audios, wherein the target voiceprint information includes the multiple sub-voiceprint information; the second determination module 54 is further used to input each sub-voiceprint information in the multiple sub-voiceprint information into the target neural network model respectively to determine the sub-voiceprint feature corresponding to each sub-voiceprint information; classify the multiple sub-voiceprint features through the target neural network to determine the predicted age corresponding to each sub-voiceprint feature respectively; and perform weighted summation on the determined multiple predicted ages to obtain the estimated age of the target object.
[0090] In an exemplary embodiment, the training module 62 is used to obtain a training sample set, wherein each training sample in the training sample set includes sample voiceprint information of a sample object and the actual age of the sample object; the original neural network model to be trained is trained using the training sample set, and when a loss value between an estimated age of the sample object and the actual age of the sample object does not satisfy a preset loss condition, the parameters in the original neural network model are adjusted, and the original neural network model continues to be trained; when the loss value between the estimated age of the sample object and the actual age of the sample object satisfies the preset loss condition, the training is terminated, and the original neural network model at the end of the training is determined as the target neural network model, wherein the estimated age of the sample object is the age determined by the original neural network model based on the sample voiceprint information in the training sample.
[0091] In an exemplary embodiment, the response module 58 is further configured to determine a response audio according to the semantic information corresponding to the voice instruction; and control the target device to play the response audio at the target playback volume.
[0092] In an exemplary embodiment, the response module 58 is also used to obtain a volume adjustment instruction in the process of controlling the target device to respond to the voice instruction of the target object according to the playback setting, wherein the volume adjustment instruction is used to adjust the playback volume of the target device; in response to the volume adjustment instruction, determine a first volume adjustment amplitude corresponding to the target age range; according to the first volume adjustment amplitude, adjust the target playback volume to the first playback volume; or after controlling the target device to respond to the voice instruction of the target object according to the playback setting, obtain a replay instruction, wherein the replay instruction is used to instruct the target device to respond to the voice instruction again; in response to the replay instruction, determine a second volume adjustment amplitude corresponding to the target age range; according to the second volume adjustment amplitude, adjust the target playback volume to the second playback volume; control the target device to respond to the voice instruction of the target object again according to the playback setting.
[0093] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0094] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0095] S1, obtaining a voice command of a target object, and determining target voiceprint information of the target object according to the voice command;
[0096] S2, inputting the target voiceprint information into a target neural network model to obtain an estimated age of the target object;
[0097] S3, when the estimated age of the target object is within a preset target age range, determining a playback setting having a preset corresponding relationship with the target age range, the playback setting including a target playback volume;
[0098] S4, sending the play setting to the target device, and controlling the target device to respond to the voice instruction of the target object according to the play setting.
[0099] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0100] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0101] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0102] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0103] S1, obtaining a voice command of a target object, and determining target voiceprint information of the target object according to the voice command;
[0104] S2, inputting the target voiceprint information into a target neural network model to obtain an estimated age of the target object;
[0105] S3, when the estimated age of the target object is within a preset target age range, determining a playback setting having a preset corresponding relationship with the target age range, the playback setting including a target playback volume;
[0106] S4, sending the play setting to the target device, and controlling the target device to respond to the voice instruction of the target object according to the play setting.
[0107] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0108] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0109] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for responding to a voice command, It is characterized in that include: Acquire a voice command of a target object, and determine target voiceprint information of the target object according to the voice command; Inputting the target voiceprint information into a target neural network model to obtain an estimated age of the target object; When the estimated age of the target object is within a preset target age range, determining a playback setting having a preset corresponding relationship with the target age range, the playback setting including a target playback volume; Sending the playback setting to a target device, and controlling the target device to respond to the voice command of the target object according to the playback setting; The method further includes: after controlling the target device to respond to the voice command of the target object according to the playback setting, obtaining a replay instruction, wherein the replay instruction is used to instruct the target device to respond to the voice command again; in response to the replay instruction, determining a second volume adjustment amplitude corresponding to the target age range; adjusting the target playback volume to a second playback volume according to the second volume adjustment amplitude; and controlling the target device to respond to the voice command of the target object again according to the playback setting.
2. The method according to claim 1, It is characterized in that The method further comprises: Determining whether the target voiceprint information exists in a preset target voiceprint library; In the case that the target voiceprint information exists in the target voiceprint library, the target playback volume is determined according to the historical operation log corresponding to the target voiceprint information, wherein the historical operation log is used to store the historical playback volume corresponding to the target voiceprint information.
3. The method according to claim 2, It is characterized in that The determining the target playback volume according to the historical operation log corresponding to the target voiceprint information includes: In the case where there is a historical playback volume corresponding to the target voiceprint information in the historical operation log, determining the target playback volume as an average value of the historical playback volumes, or a previous playback volume in the historical playback volumes; When there is no historical playback volume corresponding to the target voiceprint information in the historical operation log, the target playback volume is determined as a preset volume corresponding to the target voiceprint information.
4. The method according to any one of claims 1 to 3, It is characterized in that Determining the target voiceprint information of the target object according to the voice command includes: splitting the voice command to obtain multiple sub-audios; determining multiple sub-voiceprint information corresponding to the target object according to each sub-audio of the multiple sub-audios, wherein the target voiceprint information includes the multiple sub-voiceprint information; The step of inputting the target voiceprint information into a target neural network model to obtain the estimated age of the target object includes: Input each sub-voiceprint information of the plurality of sub-voiceprint information into the target neural network model respectively, and determine the sub-voiceprint feature corresponding to each sub-voiceprint information; Classifying the multiple sub-voiceprint features through the target neural network, and determining the predicted age corresponding to each sub-voiceprint feature; The determined multiple predicted ages are weighted and summed to obtain the estimated age of the target object.
5. The method according to claim 1, It is characterized in that Before inputting the target voiceprint information into the target neural network model, the method further includes: Acquire a training sample set, wherein each training sample in the training sample set includes sample voiceprint information of a sample object and the actual age of the sample object; The original neural network model to be trained is trained by using the training sample set, and when the loss value between the estimated age of the sample object and the actual age of the sample object does not satisfy a preset loss condition, the parameters in the original neural network model are adjusted, and the original neural network model continues to be trained; when the loss value between the estimated age of the sample object and the actual age of the sample object satisfies the preset loss condition, the training is terminated, and the original neural network model at the end of the training is determined as the target neural network model, wherein the estimated age of the sample object is the age determined by the original neural network model according to the sample voiceprint information in the training sample.
6. The method according to claim 1, It is characterized in that Controlling the target device to respond to the voice command of the target object according to the playback setting includes: Determine a response audio according to the semantic information corresponding to the voice instruction; The target device is controlled to play the response audio at the target playback volume.
7. The method according to claim 1, It is characterized in that The method further comprises: In the process of controlling the target device to respond to the voice command of the target object according to the playback setting, a volume adjustment instruction is obtained, wherein the volume adjustment instruction is used to adjust the playback volume of the target device; in response to the volume adjustment instruction, a first volume adjustment amplitude corresponding to the target age range is determined; and according to the first volume adjustment amplitude, the target playback volume is adjusted to the first playback volume.
8. A device for responding to voice commands, It is characterized in that include: A first determination module, configured to obtain a voice command of a target object and determine target voiceprint information of the target object according to the voice command; A second determination module is used to input the target voiceprint information into a target neural network model to obtain an estimated age of the target object; A third determination module is used to determine a playback setting having a preset corresponding relationship with the target age interval when the estimated age of the target object is within a preset target age interval, wherein the playback setting includes a target playback volume; A response module, used to send the playback setting to a target device, and control the target device to respond to the voice command of the target object according to the playback setting; Among them, the response module is also used to obtain a replay instruction after controlling the target device to respond to the voice instruction of the target object according to the playback setting, wherein the replay instruction is used to instruct the target device to respond to the voice instruction again; in response to the replay instruction, determine a second volume adjustment amplitude corresponding to the target age range; according to the second volume adjustment amplitude, adjust the target playback volume to a second playback volume; control the target device to respond to the voice instruction of the target object again according to the playback setting.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Intelligent headset, cloud server, volume adjustment method and volume adjustment system
CN104394491A
Sound-volume adjustment method, intelligent equipment and storage medium
CN107562403A
Method for adjusting voice based on user's age, and washing machine
CN107656461A
Volume adjustment method, terminal equipment and computer readable storage medium
CN108174031A
Audio playing method and device
CN108521618A
