Voice control method, device, storage medium and electronic device

By dynamically determining the keyword classification and response strategies in the voice data, the problems of inflexible voice control and insufficient security in the prior art are solved, and more efficient and safe voice control effects are achieved.

CN115472156BActive Publication Date: 2025-01-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211080475.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-05
Publication Date
2025-01-14
Estimated Expiration
2042-09-05

AI Technical Summary

Technical Problem

The voice control method of the prior art is not flexible enough to dynamically adapt the response strategy according to the keyword categories in the voice data, resulting in insufficient voice control efficiency and security.

Method used

By obtaining external voice data, determine the first keyword in the voice data, and dynamically determine the target response strategy based on its classification results, configure different categories of keywords to correspond to different response strategies, including command words, non-command words and wake-up words. Use local or cloud voice recognition engines for processing to improve the flexibility and security of voice control.

Benefits of technology

It realizes the flexibility and security of voice control, avoids the problems of false triggering and excessive power consumption, protects user privacy, and improves the accuracy and efficiency of voice recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115472156B_ABST
    Figure CN115472156B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a voice control method, device, storage medium and electronic device, wherein the method provided by the embodiment of the present application includes: obtaining external voice data; determining the first keyword included in the voice data, and classifying the first keyword; determining the target response strategy for the first keyword according to the classification result of the first keyword; responding to the first keyword according to the target response strategy. The first keyword included in the voice data is classified, and the corresponding response strategy is executed according to the classification result, which improves the flexibility of voice control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent voice technology, and in particular to a voice control method, device, storage medium and electronic device. Background Art

[0002] Voice wake-up free technology is an intelligent voice technology that can interact with electronic devices by voice without the need for a wake-up word. When voice-controlling electronic devices, the use of voice wake-up free technology can control electronic devices more conveniently. However, the voice control method of the prior art is not flexible enough. Summary of the invention

[0003] The embodiments of the present application provide a voice control method, device, storage medium and electronic device, which can improve the flexibility of voice control.

[0004] In a first aspect, an embodiment of the present application provides a voice control method, comprising:

[0005] Obtain external voice data;

[0006] Determining a first keyword included in the voice data, and classifying the first keyword;

[0007] Determine a target response strategy for the first keyword according to the classification result of the first keyword;

[0008] Respond to the first keyword according to the target response strategy.

[0009] In a second aspect, an embodiment of the present application further provides a voice control device, including:

[0010] A voice acquisition module is used to acquire external voice data;

[0011] A keyword detection module, used to determine a first keyword included in the voice data and classify the first keyword;

[0012] A classification processing module, used to determine a target response strategy for the first keyword according to the classification result of the first keyword;

[0013] The voice control module is used to respond to the first keyword according to the target response strategy.

[0014] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program runs on a computer, the computer executes a voice control method as provided in any embodiment of the present application.

[0015] In a fourth aspect, an embodiment of the present application further provides an electronic device, including a processor and a memory, wherein the memory has a computer program, and the processor executes a voice control method provided in any embodiment of the present application by calling the computer program.

[0016] The technical solution provided in the embodiment of the present application classifies the first keyword to determine the corresponding target response strategy according to the classification result, and responds to the first keyword according to the target response strategy, wherein different categories of first keywords are configured with different response strategies. Compared with the prior art that only uses a fixed response strategy for voice control, the solution of the present application can dynamically adapt the corresponding target response strategy according to the category of the first keyword, thereby improving the flexibility of voice control. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 A schematic diagram of an application scenario of the voice control method provided in an embodiment of the present application.

[0019] Figure 2 A flow chart of a voice control method provided in an embodiment of the present application.

[0020] Figure 3 A schematic diagram of the structure of a voice control device provided in an embodiment of the present application.

[0021] Figure 4 Another structural schematic diagram of the voice control device provided in an embodiment of the present application.

[0022] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0024] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0025] A voice control method is mentioned in the embodiment of the present application. The execution subject of the voice control method can be the voice control device provided in the embodiment of the present application, or an electronic device integrated with the voice control device, wherein the voice control device can be implemented in hardware or software. Among them, the electronic device can be a smart phone, a folding screen mobile phone, a tablet computer, a PDA, a laptop computer, a smart screen, a smart home, a smart robot, a smart wearable device, a smart speaker, etc., wherein the smart home includes but is not limited to smart desk lamps, smart washing machines, smart air conditioners, smart door locks, etc., and the smart wearable device includes but is not limited to smart watches, smart belts, smart glasses, etc.

[0026] The electronic device in the present application can implement the voice control method provided in the present application based on the improvement of its function, wherein a wake-up-free module can be added to the electronic device, or an existing module can be improved so that the electronic device has a wake-up-free function. That is, after the wake-up-free function of the electronic device is turned on, the electronic device can directly respond to the user's voice to perform the operation corresponding to the user's voice, thereby improving the efficiency of voice control.

[0027] For example, see Figure 1 , Figure 1 A schematic diagram of an application scenario of the voice control method provided in an embodiment of the present application. Figure 1 In the embodiment, the electronic device is a mobile phone, and the mobile phone can collect external voice data. Whenever a voice data is received, the first keyword included in the voice data can be determined, so that when the voice data includes the first keyword, the corresponding voice control operation can be performed.

[0028] For specific plans, please refer to Figure 2 , Figure 2 The following is a flow chart of the voice control method provided in the embodiment of the present application. The specific flow of the voice control method provided in the embodiment of the present application can be as follows:

[0029] 101. Obtain external voice data.

[0030] Among them, external voice data refers to the sound in the external environment where the electronic device is located, and the sound can be collected by the microphone of the electronic device itself, or by an external device connected to the electronic device. For example, the sound in the external environment can be collected by a mobile phone, or by an external microphone connected to the mobile phone.

[0031] When an electronic device collects sound from the external environment through its own microphone, the audio collection function can be turned on first to activate the microphone of the electronic device. The audio collection function can be automatically started when the electronic device is turned on, or can be started by user control.

[0032] Exemplarily, the electronic device may enable the wake-up-free function by default. The wake-up-free function may also be enabled when the wake-up-free function is needed. The wake-up-free function and the audio collection function of the electronic device may be enabled at the same time, or the audio collection function may be enabled after the wake-up-free function is enabled. The startup sequence of the two is not limited here. The startup mode of the wake-up-free function includes any one of manual startup by the user, startup by user voice control, self-start of the electronic device triggered by preset conditions, and startup by user gestures.

[0033] When the user manually starts the wake-up-free function, for example, a touch button for the wake-up-free function may be displayed on the setting interface of the electronic device, and the user can start the wake-up-free function by operating the touch button. Of course, by setting the existing touch buttons, it is also possible to enable both the original function and the wake-up-free function. For example, the Bluetooth touch button can be used to activate both the Bluetooth function and the wake-up-free function, that is, the Bluetooth function and the wake-up-free function are activated at the same time.

[0034] When the user voice controls to activate the wake-up-free function, the wake-up-free function of the electronic device can be activated, for example, by controlling the wake-up-free function of the electronic device through a voice assistant in the related art.

[0035] When the electronic device's self-starting wake-up-free function is triggered by preset conditions, the preset conditions may, for example, control the self-starting of the wake-up-free function when the user starts a specified application, and the specified application may be one or more; the preset conditions may also, for example, control the self-starting of the wake-up-free function when it is detected that the electronic device is in a specified environment, and the specified environment may be, for example, a driving environment, a call environment, a file transfer environment, etc.

[0036] When the user gesture activates the wake-up-free function, for example, the user draws a specified pattern on the screen of the electronic device using the finger joints, or for example, the user shows a specified gesture in front of the camera.

[0037] Since there are many ways to start the wake-up-free function, they are not listed here. It can be understood that the above-mentioned multiple startup methods can also be combined to start the wake-up-free function. After starting the wake-up-free function, the electronic device enters the wake-up-free mode. When the wake-up-free function is turned off, the wake-up-free mode is exited. After exiting the wake-up-free mode, the electronic device can also execute the common voice control method in the related art. Therefore, the present application can more flexibly perform voice control on the electronic device by adding a wake-up-free function to the electronic device. The electronic device can be voice-controlled by the existing method in the related art, and the electronic device can be voice-controlled by the method provided by the present application.

[0038] 102. Determine a first keyword included in the voice data, and classify the first keyword.

[0039] Exemplarily, one or more keywords in the voice data may be detected by phoneme recognition, and then the first keyword included in the voice data may be determined according to the detected keywords.

[0040] After determining the first keyword included in the voice data, the first keyword can be classified. Among them, multiple keyword categories can be pre-set, and then the first keyword can be divided into one of the multiple keyword categories. Among them, the keyword categories include: wake-up-free words and voice wake-up words, wherein the wake-up-free words are divided into command words and non-command words, wherein the command words do not require voice recognition and semantic understanding processing, and the non-command words require voice recognition and semantic understanding processing. The non-command words include a first non-command word and a second non-command word, wherein the first non-command word includes privacy information, and the second non-command word does not include privacy information.

[0041] 103. Determine a target response strategy for the first keyword based on the classification result of the first keyword.

[0042] The classification result and the response strategy are in a one-to-one correspondence or a many-to-one relationship. The response strategy refers to the method used by the electronic device to respond to the first keyword. Different response strategies are configured for different categories of first keywords, so that different categories of first keywords can be flexibly responded to.

[0043] 104. Respond to the first keyword according to the target response strategy.

[0044] After the target response strategy is determined, the voice data can be processed according to the target response strategy to complete the voice control of the electronic device.

[0045] In specific implementation, the present application is not limited by the execution order of the various steps described. If no conflict occurs, some steps can be performed in other orders or simultaneously.

[0046] From the above, it can be seen that the voice control method provided in the embodiment of the present application obtains external voice data and detects the voice data to determine the first keyword included in the voice data, and then classifies the first keyword to obtain a classification result, and then determines the target response strategy for the first keyword based on the classification result, wherein different categories of first keywords correspond to different response strategies, thereby avoiding the disadvantage of voice control only through fixed response strategies in the prior art. The present application can dynamically implement different response strategies according to the category of the first keyword, thereby improving the flexibility of voice control.

[0047] In some embodiments, before classifying the first keyword, the method further includes:

[0048] determining whether the voice data includes a first keyword;

[0049] If yes, classify the first keyword;

[0050] If not, the voice data is ignored and the external voice data continues to be acquired.

[0051] Exemplarily, only when the voice data includes the first keyword does it mean that the user needs to control the electronic device through the voice data, and when the voice data does not include the first keyword, it means that the user does not need to control the electronic device through the voice data, thereby avoiding accidental control of the electronic device.

[0052] Among them, phoneme recognition is performed on the voice data to determine whether it includes the first keyword, and phoneme recognition is different from speech recognition, that is, it is not necessary to use speech recognition to convert the voice data into text to determine the first keyword. Compared with speech recognition, identifying the first keyword through phonemes can reduce the power consumption of the electronic device.

[0053] In some embodiments, whether the voice data includes the first keyword may be determined in one of the following ways:

[0054] As an embodiment, keyword detection can be performed on the beginning of a sentence of the voice data. If a specified keyword appears at the beginning of the sentence of the voice data, it can be determined that the voice data includes the first keyword. For example, if the voice data is "open ***", "play ***", "navigate to ***", "close ***", "next song", "previous song", "pause playing", "continue playing", etc., then "open", "play", "navigate to", "close", "next song", "previous song", "pause playing", "continue playing", etc. in the voice data can be used as the first keyword included in the voice data. It can be understood that keyword detection can also be performed on the end of a sentence or in a sentence of the voice data to determine whether a specified keyword appears at the end of a sentence or in a sentence.

[0055] As another embodiment, if a keyword associated with a preset keyword appears in the voice data, it can be determined that the voice data includes a first keyword. The keyword in the voice data can be compared with the preset keyword to determine whether there is a first keyword that matches the preset keyword. It can be understood that there are multiple preset keywords, and the keyword can be matched with each preset keyword one by one, and then the preset keyword that successfully matches is used as the first keyword of the voice data. This method is conducive to preventing false triggering of voice control and improving the security of voice control.

[0056] Exemplarily, determining the first keyword included in the voice data includes:

[0057] Determining whether the voice data contains a preset keyword;

[0058] If so, the preset keyword included in the voice data is used as the first keyword included in the voice data.

[0059] There are multiple preset keywords, including but not limited to: "open", "first", "next", "search", "close", "play", etc. Alternatively, an application may be indicated, such as "open WeChat", "open Taobao", "close Tencent Video", etc.

[0060] As described above, a preset keyword is set in the embodiment of the present application, so that when the voice data contains another identical keyword, it can be regarded as containing the preset keyword in the voice data, and if the voice data does not contain another identical keyword, the voice data can be ignored, thereby avoiding the need for voice recognition or semantic understanding of the voice data and saving power consumption of the electronic device.

[0061] Exemplarily, determining the first keyword included in the voice data further includes:

[0062] Perform keyword detection on voice data to obtain target keywords;

[0063] Determine a second keyword matching the target keyword from the preset keywords;

[0064] The second keyword is determined as the first keyword included in the voice data.

[0065] For example, the keyword at the beginning of the sentence can be detected as the target keyword, and then a second keyword matching the target keyword can be determined from the preset keywords. Of course, the method of determining the target keyword is not limited to this. For example, the voice data can be firstly subjected to phoneme recognition to obtain the keyword, and then the target keyword can be determined from the keyword. When there is one keyword, the keyword is the target keyword. When there are multiple keywords, one can be determined from the multiple keywords as the target keyword.

[0066] Furthermore, conditions for filtering target keywords can be set, such as filtering keywords with verbs as target keywords. Therefore, if the target keyword is included in the voice data, the subsequent steps are continued, that is, the second keyword matching the target keyword is determined from the preset keywords. If the target keyword is not included in the voice data, the voice data is ignored, and the external voice data is continued to be collected. It can be understood that the filtering condition can also be whether the keyword indicates a certain application. If so, the keyword is the target keyword.

[0067] After obtaining the target keyword, the target keyword can be matched with the preset keyword. There are multiple preset keywords. When matching, a second keyword whose similarity with the target keyword is greater than a preset similarity threshold can be selected from the preset keywords, and then the second keyword can be used as the first keyword included in the voice data.

[0068] The method for determining the similarity between the preset keyword and the target keyword may be at least one of judging by a trained similarity model, calculating the similarity by a vector method, and judging the similarity by semantic association, but is not limited thereto. After obtaining the similarity between each preset keyword and the target keyword, the similarity can be compared with a similarity threshold, and then only the preset keyword with a similarity greater than the similarity threshold is called the second keyword. The similarity threshold can be set according to experience, or a conventional setting, or can be set by a user.

[0069] To this end, an example is given here. For example, the voice data is "turn on the TV", the target keyword is "turn on", and "turn on" is not included in the preset keywords. However, the similarity between "turn on" and "turn on" is greater than the similarity threshold, so "turn on" can be used as the first keyword of the voice data, and the obtained voice data indicates "turn on the TV".

[0070] It can be seen that in this embodiment, by determining the second keyword that matches the target keyword, it is also possible to avoid having to include one of the preset keywords in the voice data, thereby improving the efficiency and effectiveness of voice control of the electronic device.

[0071] In some embodiments, determining a target response strategy for the first keyword according to the classification result of the first keyword includes:

[0072] If the classification result indicates that the first keyword belongs to a command word, then determining the target response strategy is to determine the object to be executed, and executing the first command word corresponding to the first keyword for the object to be executed; or,

[0073] If the classification result indicates that the first keyword belongs to the first non-command word, the target response strategy is determined as performing speech recognition processing on the speech data through a local speech recognition engine to obtain a first speech recognition result, and determining the second command word according to the first speech recognition result; or,

[0074] If the classification result indicates that the first keyword belongs to the second non-command word, the target response strategy is determined as performing speech recognition processing on the speech data through a cloud-based speech recognition engine or a local speech recognition engine to obtain a second speech recognition result, and determining a third command word according to the second speech recognition result; or,

[0075] If the classification result indicates that the first keyword is a voice wake-up word, the target response strategy is determined to intercept the voice to be executed after the voice wake-up word from the voice data, and perform voice recognition processing on the voice to be executed through a cloud-based voice recognition engine or a local voice recognition engine to obtain a third voice recognition result, and determine the fourth command word based on the third voice recognition result.

[0076] In this embodiment, if the first keyword is classified into one of a voice wake-up word, a command word, a first non-command word, and a second non-command word, a target response strategy is determined according to the classification result.

[0077] Among them, the command word belongs to the wake-up-free word, and can directly indicate the action. For example, the command word can be "previous song", "next song", "next episode", "next", "return", "turn down", "turn up the volume", "turn down the volume", etc. When the first keyword belongs to the command word, the object to be executed is first determined, and then the first command word corresponding to the first keyword is executed for the object to be executed. Among them, the object to be executed refers to the application currently running on the electronic device, or the currently displayed interface. The object to be executed executes the first command word corresponding to the first keyword, such as to control the currently running application to start or turn off certain functions, etc., where some functions may be, for example, "navigation", "positioning", "loop play", etc. For another example, control the triggering of certain virtual buttons on the currently displayed interface, where virtual buttons may be, for example, "next song", "pause", "continue play", "exit play", etc.

[0078] Exemplarily, the electronic device can call a local voice recognition engine, a cloud voice recognition engine, and a semantic understanding engine, and the local voice recognition engine, the cloud voice recognition engine, and the semantic understanding engine are in a closed state by default.

[0079] For command words, it is not necessary to perform voice recognition and semantic understanding processing on the command words. Therefore, when the first keyword belongs to a command word, the electronic device controls the local voice recognition engine, the cloud voice recognition engine, and the semantic understanding engine to be turned off. In this way, the power consumption caused by the use of the local voice recognition engine, the cloud voice recognition engine, and the semantic understanding engine can be greatly reduced, thereby improving the battery life of the electronic device.

[0080] Among them, the first non-command word is a wake-up-free word, does not directly indicate an action, and contains privacy information. Among them, the first non-command word can be, for example, "unlock", "enter password", "bank card number is", "open address book", "check schedule", "open memo" and other sensitive keywords involving user personal privacy information. When the first keyword belongs to the first non-command word, voice data needs to be processed for voice recognition and semantic understanding.

[0081] When the first keyword belongs to the first non-command word, the local speech recognition engine is started, and speech recognition processing is performed on the speech data based on the local speech recognition engine to obtain the first speech recognition result. In this way, the transmission of the speech data to the cloud server for speech recognition processing is avoided, and the voiceprint characteristics, electronic device identification and other information of the first speech recognition result can be hidden, thereby improving the security of speech processing and protecting user privacy.

[0082] When determining the second command word according to the first voice recognition result, the first voice recognition result is first sent to the semantic understanding server by calling the semantic understanding engine, and the semantic understanding server performs semantic understanding on the first voice recognition result, and returns the corresponding semantic understanding result, and then determines the second command word according to the semantic understanding result. The electronic device responds to the second command word according to the object to be executed indicated by the second command word.

[0083] In this case, only the local speech recognition engine and the semantic understanding engine are started, and the cloud speech recognition engine is in a closed state. The local speech recognition engine is started only when speech recognition processing is performed, and the local speech recognition engine is closed after the speech recognition processing is completed, and the semantic understanding engine is started only when semantic understanding processing is performed, and the semantic understanding engine is closed after the semantic understanding processing is completed. Among them, by calling the local speech recognition engine to perform speech recognition processing on the speech data, user privacy can be protected. At the same time, since the local speech recognition engine can be used under offline conditions and is not restricted by the network environment, the effectiveness of speech recognition can be improved. In addition, since the local speech recognition engine is called, the power consumption of the electronic device can be reduced compared to calling the cloud speech recognition engine to send the voice data to the cloud server for speech recognition processing.

[0084] Among them, the second non-command word is a wake-up-free word, does not directly indicate an action, and does not contain privacy information. When the first keyword belongs to the second non-command word, one of the local speech recognition engine and the cloud speech recognition engine is selected to perform speech recognition processing to obtain the second speech recognition result. After that, the second speech recognition result can continue to be processed for semantic understanding. Please refer to the above content for details, which will not be repeated here.

[0085] When the first keyword belongs to the second non-command word, by selecting one of the local speech recognition engine and the cloud speech recognition engine for speech recognition processing, the advantages of both can be taken into account. Among them, starting the local speech recognition engine for speech recognition processing has the advantages of protecting user privacy, not being restricted by the network environment, and low power consumption, while calling the cloud speech recognition engine for speech recognition processing has the advantages of high speech recognition accuracy and high speech recognition efficiency.

[0086] In this case, the power consumption of the electronic device can be reduced by starting one of the local speech recognition engine and the cloud speech recognition engine, and starting the semantic understanding engine, and shutting down the selected local speech recognition engine or the cloud speech recognition engine after performing the speech recognition processing, and shutting down the semantic understanding engine after performing the semantic understanding processing.

[0087] Among them, the voice wake-up word can be the default wake-up word of the electronic device, or it can be a user-defined wake-up word, or it can be one or more frequently used words obtained by analyzing the user's usual language to be used as the voice wake-up word. It can be understood that the voice wake-up word can be one or more, which can be, for example, "Xiaobu Xiaobu", "Hello Xiaobu", "Hello Xiaobu", etc. By setting the voice wake-up word, the flexibility of waking up the electronic device can be improved, which is more in line with the user's usage habits, and avoids waking up the electronic device with a blunt wake-up word in the related art.

[0088] When the first keyword is a voice wake-up word, the voice to be executed after the voice wake-up word is intercepted from the voice data. A third voice recognition result is obtained by starting a cloud voice recognition engine or a local voice recognition engine to perform voice recognition processing on the voice to be executed. After that, a semantic understanding result is obtained by starting a semantic understanding engine to perform semantic understanding processing on the third voice recognition result, and the semantic understanding result sent from the semantic understanding server is received to obtain a fourth command word according to the semantic understanding result.

[0089] Among them, the voice data consists of the voice wake-up word in the first half and the voice to be executed in the second half, which can realize Oneshot (that is, the direct access function of voice commands in one sentence), and can cope with low-frequency voice control scenarios. For example, the voice data is: "Hello Xiaobu, tell a joke", where "Hello Xiaobu" is the voice wake-up word, and "tell a joke" is the voice to be executed; for example, the voice data is "Xiaobu Xiaobu recite an ancient poem", where "Xiaobu Xiaobu" is the voice wake-up word, and "recite an ancient poem" is the voice to be executed. Among them, by setting the Oneshot response strategy, the effectiveness of voice control of electronic devices can be improved, as well as the user experience can be improved.

[0090] In this case, only the local speech recognition engine and the semantic understanding engine are started, or only the cloud speech recognition engine and the semantic understanding engine are started, and the local speech recognition engine or the cloud speech recognition engine is turned off after the speech recognition processing is completed, and the semantic understanding engine is turned off after the semantic understanding processing is completed, thereby saving power consumption of the electronic device.

[0091] In some embodiments, the voice data is processed by a cloud voice recognition engine or a local voice recognition engine to obtain a second voice recognition result, and a third command word is determined based on the second voice recognition result, and the first keyword is responded to according to the target response strategy. Alternatively, the voice data is processed by a cloud voice recognition engine and a local voice recognition engine in collaboration to obtain a second voice recognition result, and a third command word is determined based on the second voice recognition result, and the first keyword is responded to according to the target response strategy. The implementation method is as follows:

[0092] As an embodiment, if the determined target response strategy is to perform speech recognition processing on the speech data through a cloud speech recognition engine or a local speech recognition engine to obtain a second speech recognition result, and determine a third command word according to the second speech recognition result, respond to the first keyword according to the target response strategy, including:

[0093] Determine a target speech recognition engine from the cloud speech recognition engine and the local speech recognition engine;

[0094] Performing speech recognition processing on the speech data by the target speech recognition engine to obtain a second speech recognition result;

[0095] A third command word is determined according to the second voice recognition result, and the third command word is responded to.

[0096] In this embodiment, one of the cloud speech recognition engine and the local speech recognition engine can be selected as the target speech recognition engine, and the selection conditions can be local storage space, network environment, data volume of speech data, etc.

[0097] For example, if the local storage space is small, the local speech recognition engine can be selected as the target speech recognition engine, and if the local storage space is large, the cloud speech recognition engine can be selected as the target speech recognition engine. Similarly, if the network environment is poor, the local speech recognition engine can be selected as the target speech recognition engine, otherwise the cloud speech recognition engine can be selected as the target speech recognition engine. And if the amount of voice data is large, the local speech recognition engine can be selected as the target speech recognition engine, otherwise the cloud speech recognition engine can be selected as the target speech recognition engine.

[0098] It can be understood that the larger and smaller in this embodiment are relative, and whether it is larger or smaller can be determined by comparing with one or more preset thresholds, which will not be elaborated here.

[0099] Exemplarily, determining a target speech recognition engine from a cloud speech recognition engine and a local speech recognition engine includes:

[0100] Detect the current network environment and determine whether the current network environment is the preset network environment;

[0101] If yes, the cloud speech recognition engine is determined as the target speech recognition engine;

[0102] If not, the local speech recognition engine is determined as the target speech recognition engine.

[0103] The network environment may indicate network security, network stability, network speed, packet loss, bandwidth, etc. The network environment affects the response speed of the cloud server. If the voice data is sent to the cloud server and the cloud voice recognition engine of the cloud server performs voice recognition processing, if the network environment is good, the cloud server can process the voice data quickly to obtain the second voice recognition result.

[0104] Exemplarily, a better network environment can be regarded as a preset network environment, and the network environment can be divided into better and worse situations. When the network environment is worse, it means that it is not a preset network environment. Among them, a better network environment can indicate one or more of network security, network stability, high network speed, less packet loss, and large bandwidth. The judgment method of network security, network stability, high network speed, less packet loss, and large bandwidth can be obtained by experience, or by comparing with a preset threshold, or by user-defined setting, and the specific implementation method is not limited here.

[0105] As another embodiment, if the determined target response strategy is to perform speech recognition processing on the speech data through the cloud speech recognition engine and the local speech recognition engine in collaboration, obtain a second speech recognition result, and determine a third command word according to the second speech recognition result, respond to the first keyword according to the target response strategy, including:

[0106] The local speech recognition engine and the cloud speech recognition engine respectively perform speech recognition processing on the speech data to obtain local recognition results and cloud recognition results;

[0107] Determine the one with the highest confidence from the local recognition result and the cloud recognition result as the second speech recognition result;

[0108] A third command word is determined according to the second voice recognition result, and the third command word is responded to.

[0109] In this embodiment, the voice data can also be processed for voice recognition by a local voice recognition engine and a cloud voice recognition engine respectively, wherein a local recognition result is obtained by the local voice recognition engine, and a cloud recognition result is obtained by the cloud voice recognition engine. The recognition results of the two can then be compared, and one of them can be selected as the second voice recognition result.

[0110] Among them, both the local recognition result and the cloud recognition result have a confidence level, and the largest one can be selected from the two as the second voice recognition result.

[0111] Of course, a preset recognition threshold can also be set, that is, to determine whether there is a second voice recognition result with a confidence level greater than the preset recognition threshold in the local recognition results and the cloud recognition results. If so, the local recognition result and the cloud recognition result with a confidence level greater than the preset recognition threshold are determined as the second voice recognition result. If the confidence levels of both are greater than the preset recognition threshold, the one with the highest confidence level can be used as the second voice recognition result.

[0112] Of course, there are also situations where the confidence levels of both local recognition results and cloud recognition results are no greater than the preset recognition threshold. In this case, the voice data can be re-processed for collaborative voice recognition, or ignored, or the user can be reminded of recognition failure.

[0113] As another embodiment, if the determined target response strategy is to perform speech recognition processing on the speech data through the cloud speech recognition engine and the local speech recognition engine in collaboration, obtain a second speech recognition result, and determine a third command word according to the second speech recognition result, respond to the first keyword according to the target response strategy, including:

[0114] Perform speech recognition processing on the speech data through the local speech recognition engine and the cloud speech recognition engine respectively;

[0115] Determine a second voice recognition result according to a response result of the cloud voice recognition engine within a preset time period;

[0116] A third command word is determined according to the second voice recognition result, and the third command word is responded to.

[0117] In this embodiment, it is considered that under normal circumstances, there is a difference between the time for obtaining a local recognition result by performing speech recognition processing on speech data through a local speech recognition engine and the time for obtaining a cloud recognition result by performing speech recognition processing on speech data through a cloud speech recognition engine. Therefore, by judging whether the time difference between the local recognition result and the cloud recognition result is large based on the response result of the cloud speech recognition engine within a preset time period, if the time to obtain the local recognition result is much longer than the time to obtain the cloud recognition result, the local recognition result is used as the second speech recognition result, and the cloud recognition result is ignored, thereby improving the efficiency of speech recognition. If the time difference between the time to obtain the local recognition result and the time to obtain the cloud recognition result is small, the cloud recognition result is used as the second speech recognition result, and the local recognition result is ignored, thereby improving the accuracy of speech recognition.

[0118] Exemplarily, determining the second speech recognition result according to the response result of the cloud speech recognition engine within a preset time period includes:

[0119] If the cloud-based speech recognition engine fails to obtain a cloud-based recognition result within a preset time period, the local speech recognition engine obtains a local recognition result within a preset time period as the second speech recognition result;

[0120] If the cloud-based speech recognition engine obtains a cloud-based recognition result within a preset time period, the cloud-based recognition result is used as the second speech recognition result.

[0121] In this embodiment, the current network environment can be determined by judging the response result of the cloud-based voice recognition engine within a preset time, and there is no need to detect the network. For example, when the network environment is good, the local voice recognition engine performs voice recognition processing on the voice data, and the local recognition result can be obtained within the preset time, and the cloud-based voice recognition engine performs voice recognition processing on the voice data, and the cloud-based recognition result can be obtained within the preset time. In the case of a poor network environment, only the local recognition result can be obtained within the preset time, and the cloud-based recognition result cannot be obtained. Therefore, when the cloud-based recognition result is obtained within the preset time, the cloud-based recognition result can be directly used, and the local recognition result can be ignored; when the cloud-based recognition result is not obtained within the preset time, the local recognition result can be directly used, and the cloud-based recognition result can be ignored.

[0122] Among them, the preset duration may be a default value, which is obtained through experience or set by the user. The preset duration may also be changed dynamically, and the conditions for dynamic change include but are not limited to the current network environment, the distance between the user and the electronic device, etc. For example, when the current network environment is poor, the preset duration may be adjusted higher, and when the current network environment is better, the preset duration may be adjusted lower. For another example, when the distance between the user and the electronic device is large, the preset duration may be adjusted higher, and when the distance between the user and the electronic device is small, the preset duration may be adjusted lower. Since there are many ways to dynamically change the preset duration, they are not listed here. Any solution that can dynamically change the preset duration to determine whether to use the local recognition result as the second voice recognition result belongs to the protection scope required by this application.

[0123] In some embodiments, determining the target response strategy is to perform speech recognition processing on the speech data through a cloud speech recognition engine or a local speech recognition engine to obtain a second speech recognition result, and before determining the third command word according to the second speech recognition result, the method further includes:

[0124] Determine the operating power consumption of electronic equipment;

[0125] If the running power consumption is greater than the preset power consumption, determining the target response strategy is to perform speech recognition processing on the speech data through a cloud speech recognition engine or a local speech recognition engine to obtain a second speech recognition result, and determining a third command word according to the second speech recognition result;

[0126] If the operating state is not greater than the preset power consumption, the target response strategy is determined as performing voice recognition processing on the voice data through the cloud-based voice recognition engine and the local voice recognition engine to obtain a second voice recognition result, and determining a third command word based on the second voice recognition result, and responding to the first keyword according to the target response strategy.

[0127] In this embodiment, by judging the running power consumption of the electronic device, when the running power consumption is greater than the preset power consumption, it means that the running power consumption of the electronic device is relatively large, and only one of the local speech recognition engine and the cloud speech recognition engine is started for speech recognition processing, thereby reducing power consumption. When the running power consumption is not greater than the preset power consumption, it means that the running power consumption of the electronic device is relatively small, and by starting the local speech recognition engine and the cloud speech recognition engine at the same time for speech recognition processing, the speech recognition accuracy can be improved.

[0128] It is understandable that whether to start the local voice recognition engine and the cloud voice recognition engine at the same time can also be determined by judging the remaining power of the electronic device, the running memory, etc. For example, when the remaining power is large, the local voice recognition engine and the cloud voice recognition engine can be started at the same time, otherwise, only one of the local voice recognition engine and the cloud voice recognition engine is started. For another example, when the running memory is large, the local voice recognition engine and the cloud voice recognition engine can be started at the same time, otherwise, only one of the local voice recognition engine and the cloud voice recognition engine is started.

[0129] In some embodiments, before acquiring external voice data, the method further includes:

[0130] Determine the current usage scenario;

[0131] If the current usage scenario is a preset usage scenario, the wake-up-free function is started and external voice data is obtained. The preset usage scenario includes at least one of a driving scenario, an audio playback scenario, a call scenario, and a shooting scenario.

[0132] Among them, the current usage scenario can be determined by the function of the electronic device used by the current application. For example, if the positioning function is being used through navigation software, it means that the current usage scenario is a driving scenario. For another example, if the speaker of the electronic device is enabled through certain applications for audio playback, it means that the current usage scenario is an audio playback scenario, where the application may be, for example, Kugou Music, QQ Music, NetEase Cloud Music, Kuwo Music, Douyin, Kuaishou, Tencent Video, Youku Video, iQiyi Video, etc. For another example, if the electronic device is connected to the network and the microphone is enabled through certain applications for network communication, it means that the current usage scenario is a call scenario, and the application may be, for example, a phone, WeChat, QQ, etc. For another example, if the camera of the electronic device is enabled through certain applications for image acquisition, it means that the current usage scenario is a shooting scene, and the application may be, for example, a camera, WeChat, Alipay, etc. that comes with the electronic device.

[0133] It can be understood that the above-mentioned preset usage scenarios are limited to examples, and the purpose is to illustrate that when the electronic device enters such preset usage scenarios, the wake-up-free function can be automatically started, thereby avoiding the need for users to manually operate the wake-up-free function, making it more convenient for users to use and improving the startup efficiency of the wake-up-free function.

[0134] It should also be noted that if the wake-up-free function has been activated before detecting the current usage scenario, the wake-up-free function will not be operated here. The wake-up-free function will only be activated if the wake-up-free function has been turned off before.

[0135] In some embodiments, if the current usage scenario is an audio playback scenario, before determining the first keyword included in the voice data, the method further includes:

[0136] Get the currently playing audio data;

[0137] Performing echo cancellation processing on the voice data according to the audio data to obtain voice data after echo cancellation;

[0138] Determining the first keyword included in the voice data includes:

[0139] A first keyword included in the echo-canceled speech data is determined.

[0140] In this embodiment, the voice data in the audio playback scene can be echo-cancelled first to filter the audio data played externally by the electronic device from the voice data, so that the voice data after echo cancellation no longer contains the audio data currently played by the electronic device. This method can avoid the interference of audio data on voice data during the voice recognition process, which is conducive to improving the accuracy of voice recognition.

[0141] When performing echo cancellation, the number of echo channels can be made consistent with the number of channels for playing audio data through the speaker, thereby facilitating the elimination of echoes related to audio data in voice data.

[0142] In some embodiments, if the current usage scenario is a driving scenario or a call scenario, before determining the first keyword included in the voice data, the method further includes:

[0143] Performing noise reduction processing on the voice data to obtain noise-reduced voice data;

[0144] Determining the first keyword included in the voice data includes:

[0145] The first keyword included in the noise reduction processed speech data is determined.

[0146] In this embodiment, by performing noise reduction processing on the voice data, the external environmental noise in the voice data can be filtered, which is beneficial to improving the accuracy of the voice data during voice recognition.

[0147] The external environmental noise may be, for example, the sound of a car horn or a car engine in a driving scene, or may be, for example, the noise of other users or environmental noise in a call scene.

[0148] In some embodiments, determining a first keyword included in the voice data and classifying the first keyword includes:

[0149] Get the keyword set corresponding to the current usage scenario;

[0150] Perform keyword detection on voice data to obtain target keywords;

[0151] Determining a second keyword matching the target keyword from the keyword set;

[0152] The second keyword is determined as the first keyword included in the voice data.

[0153] Exemplarily, the preset keywords can also be classified according to their usage scenarios, that is, different usage scenarios can correspond to different keyword sets, or different applications can correspond to different keyword sets, and the parts of the preset keywords included in different keyword sets are different. It can be understood that the corresponding keyword set can be set only for the preset usage scenario or the application corresponding to the preset usage scenario, and different applications of the same preset usage scenario can correspond to the same keyword set or different keyword sets, which is not limited here.

[0154] Among them, when there are multiple preset usage scenarios, by setting multiple different keyword sets and selecting a keyword set corresponding to the current usage scenario from the multiple keyword sets, the amount of data matching the second keyword can be reduced, thereby improving matching efficiency and improving matching accuracy.

[0155] The keywords preset in the keyword set corresponding to each current usage scenario may be related to the scenario. For example, the keyword set corresponding to the driving scenario may include preset keywords such as "navigation", "positioning", "check route", etc., and may also include general keywords such as "open", "close", "return", "exit", etc. Similarly, the keyword set corresponding to the audio playback scenario may include preset keywords such as "next song", "previous song", "volume up", "volume down", etc.

[0156] In some embodiments, after the wake-up-free function is enabled, the method further includes:

[0157] If the current usage scenario changes and the changed usage scenario is not the preset usage scenario, the wake-up-free function will be turned off.

[0158] The change of the current usage scenario may refer to the electronic device exiting the current usage scenario, or other applications of the electronic device being started. When the current usage scenario changes, it can also be determined whether the changed usage scenario is a preset usage scenario. If so, the activation state of the wake-up-free function is maintained, and if not, the wake-up-free function is disabled.

[0159] It can be understood that when the wake-up-free function is turned off, the electronic device can also execute the voice control method in the related technology, and when the wake-up-free function is turned off, the audio collection function, local voice recognition engine, cloud voice recognition engine, semantic understanding engine, etc. are also turned off. The specific implementation method can be selected by technical personnel in this field according to actual needs and is not limited here.

[0160] It can be seen from the above that the voice control method proposed in the embodiment of the present invention, by controlling the activation or deactivation of the wake-up-free function, can control the electronic device by voice in the existing method in the related art, or by voice in the method provided by the present application, and can switch the voice control mode of the electronic device more flexibly. In addition, the first keyword included in the voice data is detected to improve the security and accuracy of the voice control. Furthermore, configuring corresponding response strategies for different categories of first keywords can achieve the subdivision of the voice control method and improve the flexibility and effectiveness of the voice control. When faced with voice data with privacy information and without privacy information, the voice data can be processed by the local voice recognition engine, thereby achieving the effect of desensitizing the voice data, protecting user privacy, and improving processing efficiency and reducing power consumption. When there is no privacy information, the voice data can be processed collaboratively by the local voice recognition engine and the cloud voice recognition engine, thereby taking into account the efficiency, power consumption, privacy protection and other aspects of voice recognition. Furthermore, the current usage scenario can be detected to determine whether to automatically start or close the wake-up-free function, which is convenient for users to use. In the current usage scenario, the first keyword included in the voice data can be determined according to its corresponding keyword set, thereby narrowing the matching range of the first keyword, improving matching efficiency, and improving matching accuracy. Secondly, the voice data can also be processed by echo cancellation or noise reduction to improve the accuracy of the voice data during voice recognition.

[0161] In one embodiment, a voice control device is also provided. Figure 3 , Figure 3 The structure diagram of the voice control device 200 provided in the embodiment of the present application is shown in FIG. The voice control device 200 is applied to an electronic device, and the voice control device 200 includes:

[0162] A voice acquisition module 210, used to acquire external voice data;

[0163] A keyword detection module 220, used to determine a first keyword included in the voice data and classify the first keyword;

[0164] A classification processing module 230, configured to determine a target response strategy for the first keyword according to the classification result of the first keyword;

[0165] The voice control module 240 is used to respond to the first keyword according to the target response strategy.

[0166] In some embodiments, see Figure 4 , Figure 4 Another structural diagram of the voice control device 200 provided in the embodiment of the present application. The voice acquisition module 210 also includes a recording module 211;

[0167] The voice acquisition module 210 is used to start the wake-up-free function;

[0168] The recording module 211 is used to obtain external voice data.

[0169] In some embodiments, the keyword detection module 220 is further configured to:

[0170] Perform keyword detection on voice data to obtain target keywords;

[0171] Determine a second keyword matching the target keyword from the preset keywords;

[0172] The second keyword is determined as the first keyword included in the voice data.

[0173] In some embodiments, the voice control module 240 further includes an instruction execution module 246, a local voice recognition module 242, a cloud voice recognition module 243, a wake-up word wake-up module 244, a semantic understanding module 245, and an end-cloud recognition module 241, where the end-cloud recognition module 241 is used to coordinate the cloud voice recognition module 243 and the local voice recognition module 242;

[0174] If the classification result indicates that the first keyword belongs to a command word, the instruction execution module 246 is used to determine an object to be executed, and execute the first command word corresponding to the first keyword for the object to be executed; or,

[0175] If the classification result indicates that the first keyword belongs to the first non-command word, the local speech recognition module 242 is used to perform speech recognition processing on the speech data through the local speech recognition engine to obtain a first speech recognition result, and the semantic understanding module 245 is used to determine the second command word according to the first speech recognition result; or,

[0176] If the classification result indicates that the first keyword belongs to the second non-command word, the end-cloud recognition module 241 is used to perform speech recognition processing on the speech data through the cloud-based speech recognition engine or the local speech recognition engine to obtain a second speech recognition result, and the semantic understanding module 245 is used to determine the third command word according to the second speech recognition result; or,

[0177] If the classification result indicates that the first keyword is a voice wake-up word, the end-cloud recognition module 241 is used to intercept the voice to be executed after the voice wake-up word from the voice data, and perform voice recognition processing on the voice to be executed through the cloud-based voice recognition engine or the local voice recognition engine to obtain a third voice recognition result. The semantic understanding module 245 is used to determine the fourth command word based on the third voice recognition result.

[0178] In some embodiments, the end-cloud identification module 241 is further used to:

[0179] Determine a target speech recognition engine from the cloud speech recognition engine and the local speech recognition engine;

[0180] Performing speech recognition processing on the speech data by the target speech recognition engine to obtain a second speech recognition result;

[0181] The semantic understanding module 245 is further used to: send the second speech recognition result to the semantic understanding server, receive the semantic understanding result returned from the semantic understanding server, and determine the third command word according to the semantic understanding result;

[0182] The instruction execution module 246 is further configured to respond to a third command word.

[0183] In some embodiments, the end-cloud identification module 241 is further used to:

[0184] Detect the current network environment and determine whether the current network environment is the preset network environment;

[0185] If yes, the cloud speech recognition engine is determined as the target speech recognition engine;

[0186] If not, the local speech recognition engine is determined as the target speech recognition engine.

[0187] In some embodiments, the end-cloud recognition module 241 is further used to: perform speech recognition processing on the speech data through a local speech recognition engine and a cloud speech recognition engine respectively to obtain a local recognition result and a cloud recognition result;

[0188] Determine the one with the highest confidence from the local recognition result and the cloud recognition result as the second speech recognition result;

[0189] The semantic understanding module 245 is further used to: determine a third command word according to the second speech recognition result;

[0190] The instruction execution module 246 is further configured to respond to a third command word.

[0191] In some embodiments, before starting the wake-up-free function, the voice acquisition module 210 is further used to:

[0192] Determine the current usage scenario;

[0193] If the current usage scenario is a preset usage scenario, the wake-up-free function is started and external voice data is obtained. The preset usage scenario includes at least one of a driving scenario, an audio playback scenario, a call scenario, and a shooting scenario.

[0194] In some embodiments, the voice control device further includes an echo cancellation module 250. If the current usage scenario is an audio playback scenario, before determining the first keyword included in the voice data, the echo cancellation module 250 is used to:

[0195] Get the currently playing audio data;

[0196] Performing echo cancellation processing on the voice data according to the audio data to obtain voice data after echo cancellation;

[0197] The keyword detection module 220 is also used for:

[0198] A first keyword included in the echo-canceled speech data is determined.

[0199] In some embodiments, the voice acquisition module 210 is further used to:

[0200] If the current usage scenario changes and the changed usage scenario is not the preset usage scenario, the wake-up-free function will be turned off.

[0201] It should be noted that the voice control device provided in the embodiment of the present application belongs to the same concept as the voice control method in the above embodiment. Any method provided in the voice control method embodiment can be implemented through the voice control device. The specific implementation process is detailed in the voice control method embodiment, which will not be repeated here.

[0202] It can be seen from the above that the voice control device proposed in the embodiment of the present application, by controlling the activation or deactivation of the wake-up-free function, can control the electronic device by voice in the existing method in the related art, or by voice in the method provided by the present application, and can switch the voice control mode of the electronic device more flexibly. In addition, the first keyword included in the voice data is detected to improve the security and accuracy of the voice control. Furthermore, configuring corresponding response strategies for the first keywords of different categories can achieve the subdivision of the voice control method and improve the effectiveness of the voice control. When faced with voice data with privacy information and without privacy information, the voice data can be processed by the local voice recognition engine, thereby achieving the effect of desensitizing the voice data, protecting user privacy, and improving processing efficiency and reducing power consumption. When there is no privacy information, the voice data can be processed by the local voice recognition engine and the cloud voice recognition engine in collaboration, thereby taking into account the efficiency, power consumption, privacy protection and other aspects of voice recognition. Furthermore, the current usage scenario can be detected to determine whether to automatically start or close the wake-up-free function, which is convenient for users to use. In the current usage scenario, the first keyword included in the voice data can be determined according to its corresponding keyword set, thereby narrowing the matching range of the first keyword, improving matching efficiency, and improving matching accuracy. Secondly, the voice data can also be processed by echo cancellation or noise reduction to improve the accuracy of the voice data during voice recognition.

[0203] The present application also provides an electronic device, which can be a smart phone, a folding screen phone, a tablet computer, a PDA, a laptop computer, a smart screen, a smart home, a smart robot, a smart wearable device, a smart speaker, etc., wherein the smart home includes but is not limited to a smart desk lamp, a smart washing machine, a smart air conditioner, a smart door lock, etc., and the smart wearable device includes but is not limited to a smart watch, a smart belt, smart glasses, etc. Figure 5 As shown, Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.

[0204] The processor 301 is the control center of the electronic device 300. It uses various interfaces and lines to connect various parts of the entire electronic device 300, executes various functions of the electronic device 300 and processes data by running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, thereby monitoring the electronic device 300 as a whole.

[0205] In the embodiment of the present application, the processor 301 in the electronic device 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions:

[0206] Obtain external voice data;

[0207] Determining a first keyword included in the voice data, and classifying the first keyword;

[0208] Determine a target response strategy for the first keyword according to the classification result of the first keyword;

[0209] Respond to the first keyword according to the target response strategy.

[0210] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0211] although Figure 5 Not shown, the electronic device 300 may also include a recording module, a speaker module, a camera, a networking module, a Bluetooth module, etc., which will not be described in detail here.

[0212] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0213] As can be seen from the above, the electronic device provided in this embodiment can control the start or shut down of the wake-up-free function, and can control the electronic device by voice through the existing methods in the relevant technology, or by voice through the method provided by this application, so that the voice control mode of the electronic device can be switched more flexibly. In addition, the first keyword included in the voice data is detected to improve the security and accuracy of the voice control. Furthermore, configuring corresponding response strategies for different categories of first keywords can achieve the subdivision of the voice control method and improve the effectiveness of voice control. When faced with voice data with privacy information and without privacy information, the voice data can be processed by the local voice recognition engine, thereby achieving the effect of desensitizing the voice data, protecting user privacy, and improving processing efficiency and reducing power consumption. When there is no privacy information, the voice data can be processed collaboratively by the local voice recognition engine and the cloud voice recognition engine, so as to take into account the efficiency, power consumption, privacy protection and other aspects of voice recognition. Furthermore, the current usage scenario can be detected to determine whether to automatically start or close the wake-up-free function, which is convenient for users to use. In the current usage scenario, the first keyword included in the voice data can be determined according to its corresponding keyword set, thereby narrowing the matching range of the first keyword, improving matching efficiency, and improving matching accuracy. Secondly, the voice data can also be processed by echo cancellation or noise reduction to improve the accuracy of the voice data during voice recognition.

[0214] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0215] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any voice control method provided in the embodiment of the present application. For example, the computer program can execute the following steps:

[0216] Obtain external voice data;

[0217] Determining a first keyword included in the voice data, and classifying the first keyword;

[0218] Determine a target response strategy for the first keyword according to the classification result of the first keyword;

[0219] Respond to the first keyword according to the target response strategy.

[0220] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0221] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. Since the computer program stored in the storage medium can execute the steps in any of the voice control methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any of the voice control methods provided in the embodiments of the present application can be achieved. For details, please refer to the previous embodiments and will not be repeated here.

[0222] The above is a detailed introduction to a voice control method, device, medium and electronic device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A voice control method, characterized in that: include: Get external voice data; Determine a first keyword included in the voice data, and classify the first keyword, wherein the first keyword is one of a voice wake-up word, a command word, a first non-command word, and a second non-command word, wherein the command word, the first non-command word, and the second non-command word are all free wake-up words, the first non-command word includes privacy information, and the second non-command word does not include privacy information; Determining a target response strategy for the first keyword according to the classification result of the first keyword, including: if the classification result indicates that the first keyword belongs to the second non-command word, determining the target response strategy to perform speech recognition processing on the speech data through a cloud-based speech recognition engine and a local speech recognition engine to obtain a second speech recognition result, and determining a third command word according to the second speech recognition result; responding to the first keyword according to the target response strategy; Among them, if the determined target response strategy is to perform voice recognition processing on the voice data through the cloud voice recognition engine and the local voice recognition engine in collaboration to obtain a second voice recognition result, and determine a third command word based on the second voice recognition result, then respond to the first keyword according to the target response strategy, including: performing voice recognition processing on the voice data through the local voice recognition engine and the cloud voice recognition engine respectively; if the cloud voice recognition engine does not obtain a cloud recognition result within a preset time period, then the local recognition result obtained by the local voice recognition engine within the preset time period is used as the second voice recognition result, and the preset time period is dynamically changed, and the conditions for the dynamic change include the distance between the user and the electronic device; if the cloud voice recognition engine obtains a cloud recognition result within the preset time period, then the cloud recognition result is used as the second voice recognition result; determine a third command word based on the second voice recognition result, and respond to the third command word.

2. The voice control method according to claim 1, characterized in that: The determining the first keyword included in the voice data comprises: Performing keyword detection on the voice data to obtain target keywords; Determining a second keyword matching the target keyword from the preset keywords; The second keyword is determined as the first keyword included in the voice data.

3. The voice control method according to any one of claims 1 to 2, characterized in that: Before obtaining the external voice data, the method further includes: Determine the current usage scenario; If the current usage scenario is a preset usage scenario, the wake-up-free function is started and external voice data is obtained. The preset usage scenario includes at least one of a driving scenario, an audio playback scenario, a call scenario, and a shooting scenario.

4. The voice control method according to claim 3, characterized in that: If the current usage scenario is an audio playback scenario, before determining the first keyword included in the voice data, the method further includes: Get the currently playing audio data; Performing echo cancellation processing on the voice data according to the audio data to obtain voice data after echo cancellation; The determining the first keyword included in the voice data comprises: Determine a first keyword included in the echo-cancelled voice data.

5. The voice control method according to claim 3, characterized in that: After the wake-up-free function is started, the method further includes: If the current usage scenario changes, and the changed usage scenario is not the preset usage scenario, the wake-up-free function is disabled.

6. A voice control device, characterized in that: include: A voice acquisition module is used to acquire external voice data; a keyword detection module, configured to determine a first keyword included in the voice data, and classify the first keyword, wherein the first keyword is one of a voice wake-up word, a command word, a first non-command word, and a second non-command word, wherein the command word, the first non-command word, and the second non-command word are all free wake-up words, the first non-command word includes privacy information, and the second non-command word does not include privacy information; a classification processing module, configured to determine a target response strategy for the first keyword according to a classification result of the first keyword, including: if the classification result indicates that the first keyword belongs to the second non-command word, determining the target response strategy to perform voice recognition processing on the voice data through a cloud voice recognition engine and a local voice recognition engine in collaboration to obtain a second voice recognition result, and determining a third command word according to the second voice recognition result; A voice control module, used to respond to the first keyword according to the target response strategy; wherein, if the determined target response strategy is to perform voice recognition processing on the voice data through the cloud voice recognition engine and the local voice recognition engine in collaboration to obtain a second voice recognition result, and determine a third command word based on the second voice recognition result, then respond to the first keyword according to the target response strategy, including: performing voice recognition processing on the voice data through the local voice recognition engine and the cloud voice recognition engine respectively; if the cloud voice recognition engine does not obtain a cloud recognition result within a preset time period, then the local recognition result obtained by the local voice recognition engine within the preset time period is used as the second voice recognition result, and the preset time period is dynamically changed, and the conditions for the dynamic change include the distance between the user and the electronic device; if the cloud voice recognition engine obtains a cloud recognition result within the preset time period, then the cloud recognition result is used as the second voice recognition result; determine a third command word based on the second voice recognition result, and respond to the third command word.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed on a computer, the computer is enabled to execute the voice control method according to any one of claims 1 to 5.

8. An electronic device comprising a processor and a memory, wherein the memory stores a computer program, characterized in that: The processor is used to execute the voice control method according to any one of claims 1 to 5 by calling the computer program.

Citation Information

Patent Citations

  • Voice wakeup method, apparatus and system thereof

    CN105654943A

  • Speech recognition system providing seclusion for private speech transcription and private data retrieval

    US20210005190A1