Voice control method and electronic equipment

By using the first voice control function to collect and transmit audio data to the second voice control function in the electronic device, the conflict problem when multiple voice control functions are triggered simultaneously is solved, and the accuracy of voice recognition and user experience are improved.

CN119229860APending Publication Date: 2024-12-31HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310804474.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-30
Publication Date
2024-12-31

Smart Images

  • Figure CN119229860A_ABST
    Figure CN119229860A_ABST
Patent Text Reader

Abstract

The invention provides a voice control method and electronic equipment, relates to the technical field of artificial intelligence, and is used for solving the problem that control of the electronic equipment may conflict in a scene that more than two voice control functions trigger voice recognition at the same time. The method is applied to the electronic equipment with a first voice control function and a second voice control function. The method comprises the following steps: after a first voice control function is started, continuously collecting audio data; after both the first voice control function and the second voice control function are started, in response to a preset scene trigger event, performing voice recognition on first audio data collected by the electronic equipment based on the first voice control function to obtain a first recognition result, and performing voice recognition on the first audio data based on the second voice control function to obtain a second recognition result; obtaining a second identification result; and if the first recognition result and / or the second recognition result indicate that the first audio data comprises the preset voice instruction, executing an operation corresponding to the preset voice instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and in particular to a voice control method and electronic device. Background Art

[0002] With the development of technology, it is now possible for users to control electronic devices through voice. In the same electronic device, there may be more than two different functional modules that support voice control of electronic devices. Different voice control functional modules can be used in different scenarios to achieve different voice control effects.

[0003] In some scenarios, if more than two voice control functions trigger command execution at the same time, the two or more voice control functions are prone to conflict. Therefore, a solution is urgently needed to solve the problem that the control of electronic devices may conflict when more than two voice control functions trigger voice recognition at the same time. Summary of the invention

[0004] The embodiments of the present application provide a voice control method and an electronic device, which are used to solve the problem that conflicts may occur in the control of the electronic device when more than two voice control functions trigger voice recognition at the same time.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a voice control method is provided, which is applied to an electronic device, wherein the electronic device has a first voice control function and a second voice control function. After the first voice control function is activated, the electronic device supports real-time voice control, and after the second voice control function is activated, the electronic device supports voice control in response to a preset scene trigger event, wherein the preset scene trigger event includes at least one of an alarm ringing, an incoming call ringing, and a call in progress. The method includes:

[0007] After the first voice control function is started, audio data is continuously collected. After both the first voice control function and the second voice control function are started, and it is detected that the electronic device triggers a preset scene, both voice control functions support voice control. In order to ensure that both voice control functions are available and that the two voice control functions do not conflict, in response to a preset scene triggering event, voice recognition is performed on the first audio data collected by the electronic device based on the two voice control functions respectively. Voice recognition is performed on the first audio data based on the first voice control function to obtain a first recognition result; voice recognition is performed on the first audio data based on the second voice control function to obtain a second recognition result. If there is at least one recognition result indicating that the first audio data includes a preset voice instruction, the electronic device can execute the operation corresponding to the preset voice instruction.

[0008] In this solution, when two or more voice control functions support voice control at the same time, each voice control function can be used. In addition, different voice control functions will not repeatedly perform operations corresponding to the same voice command, avoiding conflicts between multiple voice control functions.

[0009] In a possible implementation of the first aspect, a plurality of voice commands supported by the first voice control function and a plurality of voice commands supported by the second voice control function are pre-stored in the electronic device. The preset voice command may be any voice command supported by the first voice control function or any voice command supported by the second voice control function. In this way, when the user speaks a voice command supported by any voice control function, the electronic device can perform a corresponding operation in response to the voice command. It is ensured that after both voice control functions are started, both voice control functions are available when a preset scenario is triggered.

[0010] In another possible implementation manner of the first aspect, if the first recognition result and / or the second recognition result indicates that the first audio data includes a preset voice instruction, then an operation corresponding to the preset voice instruction is performed, which may specifically include the following situations:

[0011] In the first case, if the second recognition result indicates that the first audio data includes a preset voice instruction, and the first recognition result has not been obtained when the second recognition result is obtained, the electronic device can directly execute the operation corresponding to the preset voice instruction based on the second voice control function according to the second recognition result.

[0012] In the second case, if the first recognition result indicates that the first audio data includes a preset voice instruction, and the second recognition result has not been obtained when the first recognition result is obtained, then after obtaining the second recognition result, if the second recognition result indicates that the first audio data does not include a preset voice instruction, the operation corresponding to the preset voice instruction is performed based on the first voice control function according to the first recognition result.

[0013] In the third case, if the first recognition result indicates that the first audio data includes a preset voice instruction, after obtaining the second recognition result, if the second recognition result indicates that the first audio data includes a preset voice instruction, and the first recognition result and the second recognition result are different, the operation corresponding to the preset voice instruction is performed based on the second voice control function according to the second recognition result.

[0014] In the fourth case, if the first recognition result indicates that the first audio data includes a preset voice instruction, after obtaining the second recognition result, if the second recognition result indicates that the first audio data includes a preset voice instruction, and the first recognition result and the second recognition result are the same, then the operation corresponding to the preset voice instruction is performed based on the first voice control function according to the first recognition result, or the operation corresponding to the preset voice instruction is performed based on the second voice control function according to the second recognition result.

[0015] Alternatively, in another possible implementation manner of the first aspect, if the first recognition result and / or the second recognition result indicates that the first audio data includes a preset voice instruction, then an operation corresponding to the preset voice instruction is performed, which may specifically include the following situations:

[0016] In the first case, if the second recognition result indicates that the first audio data includes a preset voice instruction, and the first recognition result indicates that the first audio data does not include a preset voice instruction, the operation corresponding to the preset voice instruction is performed based on the second voice control function according to the second recognition result.

[0017] In the second case, if the second recognition result indicates that the first audio data does not include a preset voice instruction, and the first recognition result indicates that the first audio data includes a preset voice instruction, the operation corresponding to the preset voice instruction is performed based on the first voice control function according to the first recognition result.

[0018] In the third case, if the second recognition result indicates that the first audio data includes a preset voice instruction, and the first recognition result indicates that the first audio data includes a preset voice instruction, and the first recognition result and the second recognition result are different, then the operation corresponding to the preset voice instruction is performed based on the second voice control function according to the second recognition result.

[0019] In the fourth case, if the second recognition result indicates that the first audio data includes a preset voice instruction, and the first recognition result indicates that the first audio data includes a preset voice instruction, and the first recognition result and the second recognition result are the same, then the operation corresponding to the preset voice instruction is performed based on the first voice control function according to the first recognition result, or the operation corresponding to the preset voice instruction is performed based on the second voice control function according to the second recognition result.

[0020] The second recognition result obtained by the second voice control function that supports voice control when a preset scene is triggered is usually more accurate than the first recognition result of the first voice control function that supports real-time control. In this solution, for the first recognition result and the second recognition result of the same audio data, it is preferred to determine whether the corresponding operation needs to be performed according to the second recognition result. That is, in this solution, the priority of the second recognition result is set to be higher than the priority of the first recognition result. In this way, the accuracy of voice recognition can be improved when both voice control functions are activated and the preset scene is triggered.

[0021] In another possible implementation of the first aspect, the above method may also set the priority of the first recognition result and the second recognition result to be the same. If the first voice recognition result and the second recognition result are obtained at the same time, if the first recognition result indicates that the first audio data includes a preset voice instruction, and the second recognition result indicates that the first audio data includes a preset voice instruction, and the two recognition results are the same, then the operation corresponding to the preset voice instruction is performed based on the first voice control function according to the first recognition result, or the operation corresponding to the preset voice instruction is performed based on the second voice control function according to the second recognition result. If the first recognition result indicates that the first audio data includes a preset voice instruction, or the second recognition result indicates that the first audio data includes a preset voice instruction, the operation corresponding to the preset voice instruction is performed.

[0022] If a first voice recognition result is obtained first, and the first recognition result indicates that the first audio data includes a preset voice instruction, an operation corresponding to the preset voice instruction is performed based on the first voice control function according to the first recognition result.

[0023] If the second voice recognition result is obtained first, and the second recognition result indicates that the first audio data includes a preset voice instruction, an operation corresponding to the preset voice instruction is performed based on the second voice control function according to the second recognition result.

[0024] In this way, it can also be ensured that after the first voice control function and the second voice control function are both started, when the preset scene is triggered, both voice control functions are available, and the problem of control conflict can be avoided.

[0025] In another possible implementation of the first aspect, the method further includes: after both the first voice control function and the second voice control function are started, in response to a preset scene triggering event, the first voice control function provides the first audio data to the second voice control function.

[0026] After the first voice control function is activated, the electronic device is in a state of continuously collecting audio data based on the first voice control function. Therefore, after the preset scene triggering event is detected, the audio data is continuously collected based on the first voice control function, and the first voice control function provides the first audio data collected after the preset scene is triggered to the second voice control function. In this way, it can be ensured that even if the electronic device does not collect audio data based on the second voice control function, it can still implement voice control based on the second voice control function.

[0027] In another possible implementation of the first aspect, the method further includes: the first voice control function is started, and the first voice recognition engine corresponding to the first voice control function is started. In response to the preset scene triggering event, the first voice control function provides the first audio data to the second voice control function, which may specifically include: in response to the preset scene triggering event, the second voice recognition engine corresponding to the second voice control function is started. Afterwards, the first recording control module of the first voice control function sends the first audio data to the second voice recognition engine in response to the preset scene triggering event.

[0028] In another possible implementation of the first aspect, after both the first voice control function and the second voice control function are started, the first interaction module of the first voice control function monitors the preset scene trigger event. The first recording control module of the first voice control function sends the first audio data to the second voice recognition engine in response to the preset scene trigger event, which may specifically include: in response to the preset scene trigger event, the first interaction module sends a first notification message to the first recording control module; the first notification message is used to enable the first recording control module to start sending the first audio data to the second voice recognition engine.

[0029] In this solution, it can be ensured that after both voice control functions are started, when a preset scenario is triggered, both voice control functions are available, and there will be no problem of conflict in the audio data collected by the two voice control functions.

[0030] In another possible implementation of the first aspect, the method further includes: after both the first voice control function and the second voice control function are started, the second interaction module of the second voice control function monitors the preset scene trigger event. In this solution, the first recording control module of the first voice control function sends the first audio data to the second voice recognition engine in response to the preset scene trigger event, which may specifically include: in response to the preset scene trigger event, the second interaction module sends a second notification message to the first recording control module; the second notification message is used to enable the first recording control module to start sending the first audio data to the second voice recognition engine.

[0031] In this solution, it can also be ensured that after both voice control functions are started, when the preset scene is triggered, both voice control functions are available, and there will be no problem of conflict in the audio data collected by the two voice control functions.

[0032] In another possible implementation of the first aspect, the above method also includes: after the second interaction module monitors the preset scene exit event, the second interaction module sends a third notification message to the first recording control module; the third notification message is used to make the first recording control module stop sending the first audio data to the second speech recognition engine.

[0033] In this solution, it can be ensured that after both voice control functions are started, when the preset scene is triggered, both are available and there will be no problem of conflict in collecting audio data.

[0034] In another possible implementation of the first aspect, the method further includes: after both the first voice control function and the second voice control function are started, in response to a preset scene triggering event, the second voice control function provides the first audio data to the first voice control function. That is, after both the first voice control function and the second voice control function are started, when the preset scene is triggered, the electronic device collects the first audio data based on the second voice control function. And, the second voice control function provides the first audio data to the first voice control function. In this way, after both the first voice control function and the second voice control function are started, when the preset scene is triggered, it can be ensured that both voice control functions are available and that there is no conflict in the collected audio data.

[0035] In another possible implementation of the first aspect, the method further includes: after starting the first voice control function, starting the first voice recognition engine. In response to the preset scene triggering event, the second voice control function provides the first audio data to the first voice control function, which may specifically include: in response to the preset scene triggering event, the second voice recognition engine corresponding to the second voice control function is started; in response to the preset scene triggering event, the audio data is collected based on the first voice control function, and is changed to be collected based on the second voice control function. Afterwards, the second recording control module of the second voice control function sends the first audio data collected by the electronic device to the first voice recognition engine.

[0036] In another possible implementation of the first aspect, the method further includes: in the process of the electronic device continuously collecting audio data based on the first voice control function, displaying a first recording icon corresponding to the first voice control function. In the process of collecting audio data based on the second voice control function, displaying a second recording icon corresponding to the second voice control function. Therefore, after changing from collecting audio data based on the first voice control function to collecting audio data based on the second voice control function, the method further includes: canceling the display of the first recording icon; and displaying the second recording icon corresponding to the second voice control function.

[0037] In this solution, when audio data is collected based on a voice control function, only the recording icon corresponding to the voice control function is displayed. In this way, the user can avoid being confused by seeing the icons of two voice control functions on the interface at the same time, thereby improving the user experience.

[0038] In another possible implementation of the first aspect, in response to a preset scene exit event, the audio data is collected based on the second voice control function, and is changed to the audio data is collected based on the first voice control function. In this way, after the electronic device exits the preset scene, the second voice control function exits the collection of audio data and no longer supports voice control. Since the first voice control function is still in the startup state, the electronic device still needs to ensure that the first voice control function is still available based on the availability of the first voice control function. In this solution, after exiting the preset scene, the first voice control function of the electronic device still supports real-time control.

[0039] In another possible implementation of the first aspect, in response to a preset scene exit event, the second recording icon is canceled and the first recording icon is displayed. In this solution, if the preset scene event is exited, the second voice control function will no longer collect audio data, so the electronic device may no longer display the second recording icon. The first voice control function is still in the startup state, so the electronic device may display the first recording icon after re-collecting audio data based on the first voice control function. In this way, it is convenient to prompt the user that the electronic device can still be controlled by the first voice control function to perform corresponding operations.

[0040] In a second aspect, an electronic device is provided, comprising: a processor, a memory, a display screen, and a recording module; the memory, the display screen, and the recording module are respectively coupled to the processor. The display screen is used to display an interface of the electronic device, and the recording module is used to collect audio data. The memory is used to store computer-executable instructions, and when the electronic device is running, the processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the voice control method as described in any one of the above-mentioned first aspects.

[0041] In a third aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute the voice control method of any one of the above-mentioned first aspects.

[0042] In a fourth aspect, a computer program product comprising instructions is provided, which, when executed on an electronic device, enables the electronic device to execute any one of the voice control methods of the first aspect.

[0043] In a fifth aspect, a device (for example, the device may be a chip system) is provided, the device including a processor for supporting an electronic device to implement the functions involved in the first aspect above. In one possible design, the device also includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.

[0044] Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of a scenario in which a user uses voice to control an electronic device provided in an embodiment of the present application;

[0046] Figure 2A A schematic diagram of a mobile phone setting interface provided in an embodiment of the present application;

[0047] Figure 2B A schematic diagram of an interface for controlling a mobile phone to perform operations by voice provided in an embodiment of the present application;

[0048] Figure 2C A schematic diagram of an interface for controlling a mobile phone to perform operations by voice provided in an embodiment of the present application;

[0049] Figure 3A A schematic diagram of a mobile phone setting interface provided in an embodiment of the present application;

[0050] Figure 3B A schematic diagram of the main screen interface of a mobile phone provided in an embodiment of the present application;

[0051] Figure 4A A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0052] Figure 4B A software structure block diagram of an electronic device provided in an embodiment of the present application;

[0053] Figure 5A flow chart of a voice control method provided in an embodiment of the present application;

[0054] Figure 6 A flow chart of a voice control method provided in an embodiment of the present application;

[0055] Figure 7 A flow chart of a voice control method provided in an embodiment of the present application;

[0056] Figure 8 A flow chart of a voice control method provided in an embodiment of the present application;

[0057] Fig. 9 A structural block diagram of a voice control module provided in an embodiment of the present application;

[0058] Fig.10 A structural block diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] With the development of technology, it is now possible for users to control electronic devices through voice. For example, when a user is cooking in the kitchen, watching a video, or eating and watching a TV show, both hands of the user may be occupied. At this time, the user can usually control the electronic device to perform the corresponding operation by speaking voice commands. The electronic device collects the user's voice through a microphone, parses and recognizes the user's voice, and executes the instructions corresponding to the user's voice, so that the user can control the electronic device through voice. Figure 1 As shown, the user 10 can control the mobile phone 1 to perform corresponding operations by speaking voice commands within a certain range close to the mobile phone 1.

[0060] Generally speaking, in order to save power consumption of electronic devices and avoid false triggering and other reasons, the voice control function needs to be turned on before it can be used. For example, the user inputs a preset word (called a wake-up word) to the electronic device through voice to wake up the electronic device. After the electronic device is awakened, it can execute the instructions corresponding to the user's voice, that is, the voice control function is turned on. Alternatively, the user can turn on or off the voice control function by turning on or off a preset switch in the human-computer interaction interface of the electronic device. Alternatively, the electronic device can also automatically turn on the voice control function to collect audio data when a specific scene is detected, and identify whether a specific voice command is detected. If so, the electronic device can perform corresponding operations in response to the specific voice command.

[0061] In different electronic devices, the voice control function may have different names, such as "voice control", "intelligent voice", "voice assistant", "see and speak", "voice command", "free command", "intelligent AI", etc. The specific implementation of voice control functions with different names may also be different.

[0062] The following is a brief description of the relevant information that can be seen and said:

[0063] It can be seen that it is implemented locally by electronic devices and does not require a network connection.

[0064] Visible and Talkable is controlled by a preset switch. Users can turn on Visible and Talkable by turning on the preset switch, and can exit Visible and Talkable by turning off the preset switch.

[0065] Taking the electronic device as a mobile phone as an example, for example, Figure 2A As shown, the user can open the settings function of the mobile phone 1; for example, the user clicks on the application icon of the "Settings" application on the desktop. In response to the user clicking on the application icon of the "Settings" application, the mobile phone 1 displays the "Settings" interface 101. The "Settings" interface 101 includes a "Smart Voice" option 102, and the "Smart Voice" option 102 is used to set the smart voice function. Exemplarily, in response to the user clicking on the "Smart Voice" option 102, the mobile phone 1 displays the "Smart Voice" interface 103, and the "Smart Voice" interface 103 includes a "Visible and Speakable" option 104. The user can click on the "Visible and Speakable" option 104 to set options related to the Visible and Speakable function. Exemplarily, refer to Figure 2A In response to the user's click operation on the "See and Say" option 104, the mobile phone 1 displays the "See and Say" interface 105. Optionally, the "See and Say" interface 105 includes a prompt message 106 for prompting the user how to use the "See and Say" function. The "See and Say" interface 105 also includes a "See and Say" switch 107. The user can click the "See and Say" switch 107 to turn on or off the "See and Say" switch. In one example, in response to receiving the user's click operation on the "See and Say" switch 107, the "See and Say" switch of the mobile phone 1 is turned on to turn on the "See and Say" function. Optionally, the "See and Say" interface 105 displays a prompt message 108 for prompting the user that the "See and Say" function has been successfully turned on.

[0066] In one embodiment, after the see-and-speak function is turned on, the mobile phone 1 displays a recording icon, which indicates that the see-and-speak function is turned on. Figure 2A As shown, after the “see and speak” switch 107 is turned on, the status bar of the display interface of the mobile phone 1 displays a recording icon 10a, indicating that the see and speak function has been turned on.

[0067] In one scenario, the preset switch corresponding to Visible and Talking on the electronic device is not turned on, and the microphone of the electronic device is not turned on. When the preset switch corresponding to Visible and Talking is turned on, the electronic device starts the microphone and starts the corresponding recording channel of Visible and Talking in the system and driver. In this way, the voice (audio stream) collected by the microphone can be sent to the Visible and Talking application for processing through the recording channel corresponding to Visible and Talking, so that the user can control the electronic device through voice.

[0068] In another scenario, the preset switch corresponding to the visible and speaking function of the electronic device is not turned on, and the microphone of the electronic device works in a power-saving mode (such as searching for signals at a lower power) to pick up sounds from the surrounding environment. When the preset switch corresponding to the visible and speaking function is turned on, the corresponding recording channel of the visible and speaking function is started in the system and driver of the electronic device. In this way, the voice (audio stream) collected by the microphone can be sent to the visible and speaking application for processing through the recording channel corresponding to the visible and speaking function, so that the user can control the electronic device through voice.

[0069] After Visible is Talking is turned on, the corresponding recording channel of Visible is Talking is started in the system and driver of the electronic device, and the electronic device enters a "long reception" state to continuously collect surrounding sounds. Users can give commands to the electronic device at any time through voice without having to enter a wake-up word to wake up the electronic device.

[0070] In one implementation, when any function on an electronic device turns on the voice recording function of the electronic device (turns on the microphone and establishes a recording channel), the electronic device will send a prompt message to the user to remind the user that the electronic device is in a voice collection state. In this way, the user's privacy can be prevented from being leaked. For example, after the visible and visible function is turned on, the electronic device enters a state of continuous voice collection, and an icon is displayed on the display interface of the electronic device. The icon indicates that the recording channel is turned on, which is used to remind the user that the microphone is collecting voice. For example, Figure 2A As shown, the status bar of the display interface of the mobile phone 1 displays an icon 10b, indicating that the recording channel is turned on, which is used to prompt the user that the microphone is collecting voice.

[0071] After the See and Speak function is turned on, the electronic device establishes a recording channel and continuously collects the user's voice through the microphone. The user can input voice into the electronic device at any time. The electronic device analyzes and recognizes the voice input by the user and executes the instructions corresponding to the user's voice.

[0072] In some instances, the voice commands supported by the visible or audible voice control function include system commands and application commands. Among them, system commands can be used in any interface, and application commands support use on the application interface displayed after some applications are started. Exemplarily, system commands may include: return to the desktop, return, open the application, swipe up, swipe down, swipe left, swipe right, brightness adjustment, and volume adjustment, etc. Application commands may include: play, pause, full screen, like, favorite, next, previous, fast forward, and rewind, etc. It should be noted that the above commands are some examples of commands supported by the first voice control function, that is, when the first voice control function is started, the user can control the mobile phone 1 to perform the operations corresponding to the above voice commands by speaking the corresponding voice commands.

[0073] For controlling mobile phone 1, based on the same purpose, the voice commands spoken by different users may not be exactly the same. Therefore, each of the above voice commands can correspond to multiple different expressions. For example, for the system voice command of returning to the desktop, the user can say any of the voice expressions such as "desktop", "return to desktop", "return to desktop", "return to home screen", etc. to control mobile phone 1 to return to the desktop. Accordingly, when mobile phone 1 detects the above voice expression, it can recognize it as a voice command to return the current page to the desktop.

[0074] In one example, if Figure 2B As shown, when the mobile phone 1 displays the "see and say" interface 201, the user inputs a voice message "return to the desktop" to the mobile phone 1. In response to receiving the voice message "return to the desktop" input by the user, the mobile phone 1 displays the main desktop 202.

[0075] In another example, Figure 2C As shown, mobile phone 1 displays an interface 203 of a short video application. The user inputs a voice message "pause" to mobile phone 1. In response to receiving the voice message "pause" input by the user, mobile phone 1 executes the command corresponding to the voice message "pause" and displays interface 204. A "play" button 205 is displayed on the interface 204 to prompt the user that the short video has been paused. The user can click the "play" button 205 to continue playing the short video. Alternatively, the user can also input a voice message "play" to mobile phone 1 to continue playing the short video.

[0076] Furthermore, on the above-mentioned display interface 203, the user can also control operations such as liking and collecting the currently displayed short video through the visible and spoken voice control function.

[0077] The following is a brief description of the relevant information of the voice control function:

[0078] In a specific scenario, the electronic device detects whether the user speaks a specified voice command. If yes, the electronic device can perform corresponding operations according to the voice command spoken by the user. That is, after the free command is started, the electronic device supports voice control in response to a preset scenario trigger event.

[0079] Please refer to Figure 3A The “intelligent voice” interface 301 also includes a free command option 302. Figure 3A In response to the user's triggering operation on the free-to-heart instruction option 302, the mobile phone can display a free-to-heart instruction interface 303, which includes a free-to-heart instruction switch 304. After the user turns on the free-to-heart instruction switch 304, the mobile phone starts the free-to-heart instruction voice control function.

[0080] Further, after the user turns on the free command switch 304, the mobile phone can display the free command interface 305. In the free command interface 305, the mobile phone can also display the scenarios and applications supported by the free command voice control command. Exemplarily, the free command interface 305 displays the alarm clock scenario and the phone scenario. The user can choose to open one or more applications in the free command interface 305, and the opened applications support scenario-based voice control.

[0081] In some examples, the user selects a switch to turn on the alarm application in the free command interface 305. When the alarm sounds, the user says "turn off the alarm" or "remind me later", etc., to implement voice control of the alarm scene event.

[0082] In other examples, the user selects to turn on the switch of the phone application in the free command interface 305. When the phone rings, the user says "answer the call", "hang up the call" or "mute" to achieve voice control of the phone scene.

[0083] Taking the alarm clock scenario as an example, when the voice control function of the free command is turned on, when the alarm of mobile phone 1 starts to remind, mobile phone 1 can trigger the free command to perform voice recognition. At this time, the mobile phone can start collecting audio data based on the free command, and perform voice recognition on the collected audio data to determine whether the audio data includes voice commands supported by the free command. In this scenario, the user can control mobile phone 1 to perform corresponding operations by speaking the corresponding voice commands. Please refer to Figure 3B , which shows the main screen interface 306 of the mobile phone 1, which includes an alarm pop-up window 307 that is currently reminding. The alarm pop-up window 307 includes: the current time "08:00", the reminder content "Go to work", and the options of "Remind later" and "Cancel". Among them, the option of "Remind later" is used to make the alarm remind again after a period of time. The option of "Cancel" is used to cancel the alarm reminder.

[0084] Since the free command has been turned on, in the case of the above main screen interface 306, the user can directly control the mobile phone 1 to operate the alarm in the reminder by voice. In some examples, the mobile phone can display a prompt window 310 on the main screen interface 306 to prompt the user to control the alarm scene by speaking voice commands. For example, the user can say the voice command "remind later", at which time the mobile phone 1 will control the alarm to remind again after a period of time. At the same time, the mobile phone 1 can also prompt the user on the interface that the alarm will remind again, such as Figure 3B The pop-up window prompt information 311 is shown.

[0085] In some embodiments, when the mobile phone 1 is triggered by the free command (i.e., after starting to collect audio data based on the free command and performing voice recognition and command execution), a recording icon indicating that audio data is collected based on the free command can be displayed in the notification bar, such as Figure 3B The recording icon 308 shown in the main screen interface 306 of the mobile phone 1 is displayed. After the second voice control function of the mobile phone 1 performs the corresponding operation in response to the user's voice command, or after the mobile phone 1 exits the preset scene, the mobile phone 1 may no longer display the above-mentioned recording icon 308. For example, after the mobile phone 1 controls the alarm clock to remind again after 5 minutes in response to the voice command of "remind later" spoken by the user, the mobile phone 1 may no longer display the recording icon 308. Alternatively, usually a certain preset ringing time is set for each alarm clock ringing. If during the ringing of the alarm clock, the user does not cancel the alarm clock or postpone the alarm clock through voice control, nor does he manually operate the control to cancel the alarm clock or postpone the alarm clock, then after the duration of the alarm clock ringing reaches the preset ringing time, the alarm clock will automatically stop ringing. This means that the mobile phone has exited the preset scene "alarm ringing", and at this time, the mobile phone 1 may no longer display the recording icon 308.

[0086] Similar to "seeing is speaking", when the mobile phone 1 collects audio data based on the free command, some mobile phones can also display an icon on the interface to indicate that the mobile phone is recording, such as Figure 3B Similarly, after the mobile phone exits the preset scene, the mobile phone 1 stops collecting audio data according to the instructions. If the mobile phone 1 has no other function modules recording, the mobile phone 1 will no longer display the icon 309.

[0087] In some embodiments, when the above-mentioned free-to-use command is activated, after the mobile phone 1 enters the preset scene, the free-to-use command will be triggered to pull up the recording module for recording. At this time, the mobile phone 1 starts to collect audio data around the mobile phone 1 and recognize it. If the recognition result determines that the collected audio data contains the voice command spoken by the user, the mobile phone 1 performs the corresponding operation based on the voice command.

[0088] In the same electronic device, there may be more than two different voice control functions, such as the above-mentioned See and Speak and Free Commands. It should be noted that the voice commands supported by the first voice control function and the second voice control function respectively may be completely different, or there may be partially the same voice commands. The above-mentioned first voice control function or second voice control function may correspond to an application, or may correspond to a function in a certain application.

[0089] Take the first voice control function as Visible and Speak, and the second voice control function as Free Command as an example. In some scenarios, if the above-mentioned Visible and Speak and Free Command trigger voice recognition at the same time, it is easy to cause conflicts between the two voice control functions. If Visible and Speak and Free Command collect audio data at the same time, and perform voice recognition separately. From the perspective of user experience, both voice control functions are recording, and two icons of recording voice control functions may appear on the interface, which may easily confuse users. In addition, from the perspective of command execution, taking the partial duplication of voice commands supported by Visible and Speak and Free Command as an example, if the two voice control functions collect audio data at the same time, and perform voice recognition and command execution separately, it is possible that the results of Visible and Speak and Free Command recognition are the same. In this way, mobile phone 1 may perform operations according to the two recognition results respectively, which will cause mobile phone 1 to repeat the same operation for one voice command.

[0090] In other embodiments, taking the case where there is no duplication of voice commands supported by Visible and Speak as an example, if two voice control functions trigger voice recognition at the same time, and the execution of one of the voice control functions is temporarily interrupted, the mobile phone 1 may not be able to perform the corresponding operation according to the actual intention of the user. For example, both trigger voice recognition at the same time, and Visible and Speak is temporarily interrupted, and only the Speak command collects audio data through the recording module. And the Speak command performs voice recognition and command execution on the audio data. Then it may happen that the user actually wants to use the voice commands supported by Visible and Speak, and the Visible and Speak of the mobile phone 1 cannot be used normally. Because the voice commands supported by Visible and Speak cannot be recognized by the Speak command, the mobile phone 1 cannot accurately recognize the intention of the voice spoken by the user, and cannot accurately perform the corresponding operation.

[0091] For example, both Visible and Talk and Free Instructions are in the activated state, and mobile phone 1 detects that the alarm in mobile phone 1 starts to ring. That is, mobile phone 1 triggers the preset scenario of Free Instructions for voice recognition. At this time, the voice recognition and instruction execution of Visible and Talk are temporarily interrupted, and the recording module is pulled up by Free Instructions to collect audio data and perform voice recognition. At this time, if the audio data spoken by the user includes "return to the desktop", Figure 3ATaking the scene shown in the Xu Xin command interface 305 as an example, it can be seen that Xu Xin command does not support the voice command of "return to desktop". In other words, based on Xu Xin command, it is impossible to recognize that the audio data is a voice command that needs to be executed. Combined with the above system command example, it can be seen that the voice command "return to desktop" belongs to the voice command supported by Visible and Speak. However, since the current mobile phone temporarily interrupts the voice recognition and command execution of Visible and Speak, Visible and Speak cannot recognize the audio data. The mobile phone cannot respond to the audio data through Visible and Speak. As a result, when the two voice control functions trigger voice recognition at the same time, mobile phone 1 cannot perform corresponding operations for the voice commands spoken by some users, affecting the user experience.

[0092] Therefore, there is an urgent need for a solution that can solve the problem of possible conflict in the control of electronic devices and the omission of the execution of voice commands spoken by the user when more than two voice control functions are triggered at the same time.

[0093] Based on this, an embodiment of the present application proposes a voice control method, which uses one of the voice control functions to collect the voice input by the user when more than two voice control functions are triggered at the same time, and then distributes the collected voice to the recognition engines of the two voice control functions respectively. The recognition engines of the two voice control functions perform voice recognition on the voice respectively, and then select one of the recognition results to perform the corresponding operation according to the recognition results of the two recognition engines. In this way, the problem of conflict between the two voice control functions when the two voice control functions are triggered at the same time can be avoided. In addition, the recognition engines corresponding to the two voice control functions recognize the same voice at the same time, and then decide how to perform the operation according to the two recognition results, which can ensure that when the two voice control functions are triggered at the same time, both can be used. Avoid the situation where one of the voice control functions cannot be used when the two voice control functions are triggered at the same time.

[0094] The voice control method provided in the embodiment of the present application can be applied to electronic devices that support voice input. The above-mentioned electronic devices may include mobile phones, tablet computers, laptops, personal computers (personal computers, PCs), ultra-mobile personal computers (ultra-mobile personal computers, UMPCs), handheld computers, netbooks, smart home devices (such as smart TVs, smart screens, large screens, smart speakers, smart air conditioners, etc.), personal digital assistants (personal digital assistants, PDAs), wearable devices (such as smart watches, smart bracelets, etc.), vehicle-mounted devices, virtual reality devices, etc., and the embodiments of the present application do not impose any restrictions on this.

[0095] like Figure 4AThe figure shows a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. Exemplarily, the electronic device 100 may be the mobile phone 1 mentioned above. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a touch sensor 180B, etc.

[0096] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0097] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. For example, the processor 110 is used to execute the voice control method in the embodiment of the present application.

[0098] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0099] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0100] The USB interface 130 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device.

[0101] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0102] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and an application required for at least one function (such as a sound playback function, an image playback function, etc.).

[0103] In addition, the internal memory 121 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0104] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .

[0105] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.

[0106] In some other embodiments, the power management module 141 may also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.

[0107] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0108] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0109] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.

[0110] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0111] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.

[0112] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170 and the application processor.

[0113] The audio module 170 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio inputs into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110. The audio module 170 can include a speaker 170A and a microphone 170B.

[0114] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or conduct a video conference through the speaker 170A.

[0115] Microphone 170B, also known as a "microphone", is used to convert sound signals into electrical signals. When making a video call, video conference, or using a voice assistant, the user can speak by putting their mouth close to the microphone 170B to input the sound signal into the microphone 170B. The electronic device 100 can be provided with at least one microphone 170B. In other embodiments, the electronic device 100 can be provided with two microphones 170B, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170B to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0116] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A.

[0117] The touch sensor 180B is also called a "touch panel". The touch sensor 180B can be arranged on the display screen 194, and the touch sensor 180B and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180B is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180B can also be arranged on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0118] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0119] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.

[0120] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0121] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.

[0122] The camera 193 is used to capture still images or videos. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0123] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting or removing the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0124] The voice control methods in the following embodiments can all be implemented in the electronic device 100 having the above hardware structure.

[0125] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0126] Figure 4B It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0127] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime (ART) and native C / C++ library, hardware abstract layer (HAL) and kernel layer.

[0128] The application layer can include a series of application packages.

[0129] like Figure 4B As shown, the application package may include applications such as camera, gallery, calendar, map, music, navigation, SMS, call, video, first voice control module and second voice control module.

[0130] The first voice control module and the second voice control module can both be used to respond to the voice command spoken by the user and perform corresponding operations to achieve the effect of the user controlling the electronic device through voice. The usage scenarios of the first voice control function and the second voice control function may be different.

[0131] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0132] like Figure 4B As shown, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, an activity manager, an input manager, and a multi-modal input framework, etc.

[0133] The window manager provides window management services (WMS). WMS can be used for window management, window animation management, surface management, and as a transfer station for the input system.

[0134] Content providers are used to store and retrieve data and make it accessible to applications. This data can include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0135] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0136] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0137] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0138] The activity manager can provide activity management services (AMS), which can be used to start, switch, and schedule system components (such as activities, services, content providers, and broadcast receivers) as well as manage and schedule application processes.

[0139] The input manager can provide input management services (IMS), which can be used to manage system input, such as touch screen input, key input, sensor input, etc. IMS takes events from input device nodes and distributes them to appropriate windows through interaction with WMS.

[0140] The multi-mode input framework encapsulates various interfaces for other subsystems and applications to call. In an embodiment of the present application, after determining the operation to be performed by the voice command based on the first voice control function or the second voice control function, the first voice control function or the second voice control function can send the command to the multi-mode input framework. Afterwards, the multi-mode input framework can perform the corresponding operation in response to the command, thereby achieving the effect of voice controlling the electronic device to perform the operation.

[0141] The Android runtime includes the core library and the Android runtime. The Android runtime is responsible for converting source code into machine code. The Android runtime mainly uses the ahead of time (AOT) compilation technology and the just in time (JIT) compilation technology.

[0142] The core library is mainly used to provide basic Java class library functions, such as basic data structures, mathematics, IO, tools, databases, networks, etc. The core library provides an API for users to develop Android applications.

[0143] The native C / C++ library can include multiple functional modules, such as surface manager, media framework, libc, OpenGL ES, SQLite, Webkit, etc.

[0144] Among them, the surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media framework supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES provides drawing and operation of 2D graphics and 3D graphics in applications. SQLite provides a lightweight relational database for applications of electronic device 100.

[0145] The hardware abstraction layer runs in user space, encapsulates kernel layer drivers, and provides a calling interface to the upper layer.

[0146] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0147] The embodiment of the present application provides a voice control method, which can be applied in an electronic device. In a scenario where two or more voice control functions are triggered at the same time, it is ensured that the two or more voice control functions can be used without conflicting with each other.

[0148] The above-mentioned voice control method will be described in detail below with reference to the accompanying drawings.

[0149] Please refer to Figure 5, which shows a flow chart of a voice control method proposed in an embodiment of the present application. In this embodiment, the electronic device is a mobile phone as an example for explanation. Moreover, after the first voice control function is activated, the mobile phone supports real-time voice control, and after the second voice control function is activated, the mobile phone supports voice control in response to a preset scene triggering event. The method includes S501-S508. Among them:

[0150] S501. The mobile phone starts.

[0151] S502. In response to a first start event, start a first voice control function of the mobile phone.

[0152] In some embodiments, the first start event may be a user manually turning on the first voice control function. Figure 2A The switch 107 shown in the figure can be turned on to be visible. In other embodiments, the first start event can also be a user turning on the intelligent human-computer interaction function. In this embodiment, after the intelligent human-computer interaction function is turned on, in order to better provide the user with an interactive method for the mobile phone, the mobile phone will automatically turn on the first voice control function. In other embodiments, the first start event can also be other events.

[0153] As can be seen from the above description, after the first voice control function is activated, the mobile phone is always in a recording state through the first voice control function. Therefore, in some embodiments, the above S502 may specifically include: in response to the first activation event, the mobile phone calls the recording module through the first voice control module corresponding to the first voice control function to collect audio data.

[0154] In some embodiments, after the first voice control function is activated, the mobile phone continues to collect audio data based on the first voice control function.

[0155] In addition, after the first voice control module calls the recording module to collect audio data, if the audio data is collected, the voice recognition engine corresponding to the first voice control module needs to recognize it to determine whether it contains the voice instructions to be executed. Therefore, in some embodiments, after the first voice control module calls the recording module, the above S502 also includes: starting the first voice recognition engine corresponding to the first voice control module.

[0156] S503. In response to the second start event, start a second voice control function of the mobile phone.

[0157] In some embodiments, the second start event may be a user manually turning on the second voice control function. Figure 3AThe switch 304 shown is used to turn on the second voice control function. It can be understood that in other embodiments, the second start event can also be other events.

[0158] It should be noted that after the mobile phone is started, the above S502 may be executed first, and then S503. Alternatively, the mobile phone may first execute the above S503 and then S502. In the embodiment of the present application, the execution order of S502 and S503 is not limited.

[0159] S504. In response to a preset scenario triggering event, the mobile phone collects first audio data.

[0160] In some embodiments, the mobile phone collects the first audio data, which can specifically be the mobile phone collecting audio data around the mobile phone through a recording module (such as a microphone, etc.). In order to distinguish it from the audio data collected by the mobile phone based on the first voice control function after the first voice control function is started, in the embodiment of the present application, the audio data collected by the mobile phone after the preset scene is triggered is recorded as the first audio data.

[0161] It can be seen from the above description that after the first voice control function is started, the first voice control module corresponding to the first voice control function will call the recording module of the mobile phone to continuously collect audio data around the mobile phone. The preset scene is a scene in which the second voice control function supports voice control of the mobile phone. In some embodiments, the preset scene may specifically include: an alarm ringing, an incoming call ringing, and a call in progress, etc. For the second voice control function, the second voice control function will only trigger the collection of audio data under the preset scene. For example, when the alarm starts ringing, the mobile phone will try to collect audio data and identify whether the user says a voice command such as "turn off the alarm" in the audio data. If so, the mobile phone needs to respond to the voice command and execute the operation of turning off the alarm through the second voice control module corresponding to the second voice control function.

[0162] The voice control method proposed in the embodiment of the present application is mainly aimed at the scenario where more than two voice control functions trigger voice recognition at the same time, and conflicts may occur between the two or more voice control functions. Therefore, in S504, the mobile phone collects audio data after triggering the preset scene. It should be noted that in actual situations, after S502, the mobile phone can pull up the recording module through the first voice control module to collect audio data. And when the first voice control function is in the startup state, the mobile phone continues to be in the receiving state.

[0163] In some embodiments, when the mobile phone collects audio data through the first voice control function and through the second voice control function, the same recording module can be used, or different recording modules can be used.

[0164] As can be seen from the above description, after the first voice control function is started, the mobile phone will pull up the recording module through the first voice control module to continuously collect audio data. After the second voice control function is started, the second voice control module will call the recording module to collect audio data only when the preset scene is triggered. In the embodiment of the present application, before the above S504, the mobile phone has already started the first voice control function. That is to say, before S504, the mobile phone has already pulled up the recording module through the first voice control module and is collecting audio data. Therefore, in other embodiments of the present application, after detecting the preset scene triggering event, the mobile phone can no longer use the recording module based on the second voice control function to repeatedly collect audio data. Instead, the audio data collected by the recording module based on the first voice control function can be directly transmitted to the voice recognition engine corresponding to the second voice control function for audio recognition. Thus, it can be ensured that after the preset scene is triggered, both the first voice control function and the second voice control function are available. In addition, this can avoid the conflict problem caused by the need for the two voice control functions to use the recording module of the mobile phone to collect audio data at the same time. In some embodiments, the above S504 may specifically include: in response to a preset scene triggering event, collecting first audio data based on a first voice control function.

[0165] Afterwards, in order to ensure that the second voice control function can perform voice recognition on the first audio data collected in a preset scenario, the above method also includes: the first voice control function provides the first audio data to the second voice control function.

[0166] The first voice control function performs voice recognition on the audio data, which can be specifically implemented by the first voice recognition engine of the first voice control module. The second voice control function performs voice recognition on the audio data, which can be specifically implemented by the second voice recognition engine of the second voice control module. Furthermore, in response to a preset scene triggering event, the first voice control function provides the first audio data to the second voice control function, which can specifically include: the first recording control module of the first voice control function sends the first audio data to the second voice recognition engine of the second voice control function in response to the preset scene triggering event. Among them, the second voice recognition engine can be started when the preset scene triggering event is detected.

[0167] In the technical solution provided in the embodiment of the present application, after both voice control functions are started and the preset scene is triggered, the first audio data is collected only based on the first voice control function. At the same time, the first voice control function provides the first audio data to the second voice control function, which can ensure that after the preset scene is triggered, both the first voice control function and the second voice control function are available. In addition, this can avoid the conflict problem caused by the need for the two voice control functions to use the recording module of the mobile phone to collect audio data at the same time.

[0168] It can be seen from the description of the above embodiment that the mobile phone will trigger the second voice control module to try to pull up the recording module to collect audio data only when a preset scene triggering event is detected. Therefore, in order to achieve the effect of using the recording module to collect audio data through the first voice control module when the preset scene is triggered, the mobile phone can monitor the preset scene triggering event through the first voice control module when both voice control modules are started. In this way, the second voice control module no longer monitors the preset scene triggering event, and will not trigger the step of the second voice control module trying to pull up the recording module to collect audio data. In this way, the problem of the mobile phone repeatedly collecting audio data through the second voice control module when the preset scene is triggered can also be avoided.

[0169] Among them, when both voice control modules are started, the preset scene triggering event is monitored by the first voice control module, which can be specifically achieved by registering the preset scene in the first voice control module. After the first voice control module registers the preset scene, the first voice control module will simultaneously monitor the preset scene triggering event. In some embodiments, after the first voice control function and the second voice control function are both started, the preset scene is registered in the first voice control module. The specific implementation process of registering the preset scene can refer to the description of the relevant technology, which will not be repeated in the embodiments of the present application.

[0170] That is to say, in some embodiments, the first voice control module detects whether the mobile phone starts the second voice control function when the mobile phone starts the first voice control function. If so, the mobile phone monitors whether the preset scene is triggered based on the first voice control module. That is, when both the first voice control function and the second voice control function are in the startup state, the first voice control module replaces the second voice control module to monitor the preset scene trigger event. Since the mobile phone continues to collect audio data based on the first voice control module after the first voice control function is started. Therefore, for the first voice control module, after monitoring the preset scene trigger event, for the acquired audio data, it is necessary to add a step of sending the audio data to the second voice control module. In this way, even if the audio data is not collected based on the second voice control function, the second voice control module can also obtain the first audio data under the preset scene, perform voice recognition on it, and perform corresponding operations on it. Thereby ensuring that the user speaks the voice command supported by the second voice control function in the preset scene, and the mobile phone can perform the corresponding operation through the second voice control function. At the same time, based on the audio data collected by the first voice control function, the first voice control function module itself will also perform voice recognition on it. Therefore, after the preset scene is triggered, both the first voice control function and the second voice control function are available.

[0171] If both voice control functions are activated, the first interactive module of the first voice control module monitors the preset scene trigger event of the mobile phone, and the first voice control module does not need to determine whether other voice control modules are collecting audio data. In some embodiments, the first recording control module of the first voice control function responds to the preset scene trigger event and sends the first audio data to the second voice recognition engine of the second voice control function, which may specifically include: in response to the preset scene trigger event, the first interactive module sends a first notification message to the first recording module. The first notification message is used to enable the first recording control module to start sending the first audio data to the second voice recognition engine.

[0172] In the technical solution provided in the embodiment of the present application, when both the first voice control function and the second voice control function are in the activated state, the first voice control module monitors whether the mobile phone triggers the preset scene. Since the second voice control module no longer monitors whether the preset scene is triggered, the second voice control module will not be triggered to try to pull up the recording module to collect audio data. In this way, the problem of the mobile phone repeatedly collecting audio data through the second voice control module when the preset scene is triggered can be avoided. Thereby, the conflict problem that may occur when the two voice control functions trigger voice recognition at the same time can be reduced.

[0173] In combination with the above description, it can be seen that in some embodiments, when only the second voice control function is activated, after the preset scene is triggered, the mobile phone will also display a second recording icon in the notification bar of the interface to indicate that audio data is being collected based on the second voice control function. When the second voice control function is a free command, the second recording icon is as follows Figure 3B The recording icon 308 is shown. In the above embodiment, when the mobile phone triggers the preset scene, the mobile phone no longer collects audio data through the second voice control function. Therefore, in this embodiment, after the mobile phone enters the preset scene, the mobile phone does not need to display the recording icon 308.

[0174] In other embodiments, when both voice control functions are activated, the second interaction module of the second voice control module can also monitor preset scene events. It can be seen from the above description that when only the second voice control function is activated, after monitoring the preset scene triggering event, the second voice control module will pull up the recording module to collect audio data. Therefore, in order to achieve the effect of collecting audio data based on the first voice control function when the preset scene is triggered, it is necessary to suppress the response action of the second voice control module to pull up the recording module after the preset scene is triggered. It should be noted that in this embodiment, after the second voice control function is activated, the preset scene is registered in the second voice control module.

[0175] When a preset scene is triggered, the second voice control module may not know whether there are other voice control modules currently collecting audio data. In order to avoid the second voice control module repeatedly pulling up the recording module to collect audio data when there are other voice control modules collecting audio data, when the preset scene is detected to be triggered, the second voice control module can first determine whether there are other voice control modules currently collecting audio data. If so, the second voice control module will no longer repeatedly collect audio data. In some embodiments, please refer to Figure 6 , the above S504 may specifically include S504a-S504c:

[0176] S504a. Determine whether a preset scene triggering event is detected.

[0177] The preset scene trigger event is used to trigger the preset scene. If the judgment result of S504a is no, the second voice control module will not be triggered to collect audio data. It should be noted that the judgment result of S504a is no in the case of Figure 6 If the judgment result of S504a is yes, it means that the second voice control module is triggered to collect audio data, and the mobile phone can determine whether there are other voice control modules collecting audio data, such as S504b.

[0178] S504b. Determine whether audio data is being collected based on the first voice control function.

[0179] If the judgment result of S504b is no, it means that the current mobile phone does not collect audio data based on the first voice control function. At this time, it is necessary to pull up the recording module through the second voice control module to collect audio data. It can be understood that if the judgment result of S504b is no, Figure 6 It is not shown in the flowchart.

[0180] It is understandable that if the judgment result of S504b is yes, the second voice control module is no longer used to pull up the recording module to collect audio data, but audio data continues to be collected based on the first voice control function, such as S504c. It should be noted that the first voice control function and the second voice control function are illustrated in the embodiment of the present application. When the preset scene is triggered, it is necessary to collect audio data based on the second voice control function, and it is also possible to determine whether the current mobile phone is collecting audio data based on other voice control functions (such as the third voice control function). If so, the second voice control function can be used to collect audio data, but audio data can continue to be collected based on the third voice control function. In the embodiment of the present application, the voice control function for determining whether audio data is being collected is not limited.

[0181] S504c. The mobile phone collects first audio data based on the first voice control function.

[0182] As can be seen from the above description, in the embodiment of the present application, after the mobile phone starts the first voice control function in S502, the recording module is activated through the first voice control module and audio data is continuously collected. Therefore, in S504c, when the mobile phone triggers the preset scene, audio data is continuously collected through the recording module based on the first voice control module.

[0183] In the technical solution provided by the embodiment of the present application, when the preset scene is triggered, the mobile phone first determines whether there is another voice control module that is collecting audio data through the second voice control module. If there is, then at this time, the mobile phone will not respond to the triggering event of the preset scene for the second voice control module and repeatedly collect audio data. In this way, the conflict problem that may occur when two voice control functions trigger voice recognition at the same time can be reduced.

[0184] Only when the first voice control function is started, the first voice control function can perform voice recognition on the audio data after acquiring it. In the above embodiment, after the first voice control module collects the first audio data, it needs to send the first audio data to the second voice control module. Therefore, in some embodiments, the first recording control module of the first voice control function sends the first audio data to the second voice recognition engine in response to a preset scene trigger event, which may specifically include: the second interaction module sends a second notification message to the first recording control module. The second notification message is used to enable the first recording control module to start sending the first audio data to the second voice recognition engine.

[0185] Furthermore, in the above embodiment, after the mobile phone exits the preset scene, the first voice control module no longer needs to send audio data to the second voice control module. To achieve this effect, the second voice control module sends a third notification message to the first voice control module after detecting the exit event of the preset scene. The third notification message is used to make the first recording control module stop sending audio data to the second voice recognition engine module.

[0186] In the technical solution provided in the embodiment of the present application, in order to achieve the effect of collecting audio data based on the first voice control function when the preset scene is triggered after both voice control functions are started, the second voice control module notifies the first voice control module after monitoring the preset scene triggering event. Thereby, the first voice control module sends the first audio data to the second voice control module when the preset scene is triggered. After exiting the preset scene, the second voice control module notifies the first voice control module to stop sending audio data to the second voice control module. In this way, it can be ensured that after both voice control functions are started, when the preset scene is triggered, both are available, and there will be no problem of conflict in collecting audio data.

[0187] In the above embodiment, when two voice control functions need to collect audio data at the same time, audio data is collected based on the first voice control function. In other embodiments, when two voice control functions need to collect audio data at the same time, it is also possible to choose to suspend collecting audio data based on the first voice control function and collect audio data based on the second voice control function. Afterwards, in order to ensure that both voice control functions are available after triggering the preset scene, in response to the preset scene triggering event, the second voice control function provides the first audio data to the first voice control function.

[0188] It can be seen from the above description that in an embodiment of the present application, after the first voice control function is started, audio data will continue to be collected based on the first voice control function. Therefore, after both voice control functions are started and a preset scene trigger event is detected, it is necessary to change to collecting audio data based on the second voice control function. Specifically, in some embodiments, in response to a preset scene trigger event, the second voice control function provides the first audio data to the first voice control function, which may specifically include: in response to a preset scene trigger event, the audio data collected based on the first voice control function is changed to the audio data collected based on the second voice control function. In addition, the second recording control module of the second voice control function sends the first audio data collected by the mobile phone to the first voice recognition engine.

[0189] It can be understood that in this embodiment, after both voice control functions are started, the second interactive module of the second voice control function still monitors the preset scene triggering event. Specifically, in some embodiments, after monitoring the triggering of the preset scene, the mobile phone can first release the resources of the recording module (i.e., recording permission) from the first voice control module. Then the recording permission is assigned to the second recording control module of the second voice control module, so that the second voice control module can pull up the recording module and collect the first audio data through the recording module. In addition, the first audio data collected based on the second voice control function also needs to be sent to the first voice control function for voice recognition.

[0190] In the technical solution provided in the embodiment of the present application, after both voice control functions are started, if the preset scenario is triggered, the collection of audio data based on the first voice control function is paused, and instead the collection of audio data based on the second voice control function is switched to ensure that both are available, while avoiding the problem of conflicts caused by repeated recording of the two.

[0191] In combination with the above description, it can be known that in some embodiments, after the mobile phone starts the first voice control function to collect audio data, it will display the first recording icon in the notification bar of the interface to indicate that the first voice control function is collecting audio data. In the above embodiment, when the mobile phone triggers the preset scene, the mobile phone switches to collecting audio data based on the second voice control function. In other words, at this time, the mobile phone will temporarily interrupt the first voice control function to collect audio data. At this time, the mobile phone may no longer display the above-mentioned first recording icon, but display the second recording icon for indicating recording based on the second voice control function.

[0192] Furthermore, after the mobile phone exits the preset scene, the second voice control function may no longer collect audio data, nor provide audio data to the first voice control function. Therefore, in some embodiments, in response to the preset scene exit event, the audio data is collected based on the second voice control function and then returned to collecting audio data based on the first voice control function. In this way, after the mobile phone exits the preset scene, the first voice control function can continue to be used to respond to voice commands and perform corresponding operations.

[0193] In the embodiment of displaying the recording icon, after detecting the exit event of the preset scene, the mobile phone no longer displays the second recording icon. Since the mobile phone will collect audio data based on the first voice control function, the mobile phone will re-display the first recording icon after returning to collecting audio data based on the first voice control function.

[0194] In the technical solution provided in the embodiment of the present application, when more than two voice control functions of a mobile phone trigger voice recognition at the same time, one of the voice control functions is used to collect audio data. In addition, the mobile phone can only display the icon corresponding to the selected voice control function. For the icon corresponding to the unselected voice control function for collecting audio data, it is not necessary to display it, or the recording based on the voice control function can be temporarily interrupted through other status displays. In this way, it can avoid the user from being confused by seeing the icons of two voice control functions on the interface at the same time, thereby improving the user experience.

[0195] When both voice control functions are in the activated state, if the preset scene is triggered, the second voice recognition engine corresponding to the second voice control function needs to perform voice recognition on the first audio data collected next. Therefore, no matter which voice control module monitors whether the mobile phone triggers the preset scene, the mobile phone can start the second voice recognition engine when it is determined that the preset scene is triggered.

[0196] In some embodiments, taking the first voice control module monitoring whether a preset scene is triggered as an example, after the first voice control module detects that the preset scene is triggered, the first voice control module sends an indication message to the second voice control module. After receiving the indication message, the second voice control module starts the second voice recognition engine corresponding to the second voice control function.

[0197] In other embodiments, taking the second voice control monitoring whether a preset scene is triggered as an example, after the second voice control module detects that the preset scene is triggered, the second voice control module can start the second voice recognition engine.

[0198] In the technical solution provided by the embodiment of the present application, when it is determined that the mobile phone has triggered a preset scene, the mobile phone first starts the second voice recognition engine through the second voice control module to prepare for the subsequent recognition of audio data. In this way, after receiving the audio data, the second voice recognition engine can perform voice recognition on it in a timely manner, thereby improving the response speed.

[0199] Furthermore, in some embodiments, after starting the second voice recognition engine, the method may further include: registering voice instructions corresponding to the preset scene in the second voice recognition engine. For example, taking the preset scene of an alarm ringing as an example, the voice instructions supported by the second voice control function in the preset scene may include postponing the alarm, canceling the alarm, etc. In this way, the second voice recognition engine can subsequently identify whether the audio data includes voice instructions supported by the second voice control function.

[0200] S505. Perform voice recognition on the first audio data collected by the mobile phone based on the first voice control function to obtain a first recognition result.

[0201] In some embodiments, voice recognition is performed on audio data based on a voice control function, which may be specifically implemented through a voice recognition engine.

[0202] The speech recognition engine is used to provide services for recognizing user speech and transcribe speech into text. Its goal is to convert the vocabulary content in human speech into input that can be read by electronic devices, so that electronic devices have the ability to "listen" and realize human-computer interaction. It should be noted that the speech recognition engine involved in the embodiments of the present application can be any speech recognition engine.

[0203] S506. Perform voice recognition on the first audio data collected by the mobile phone based on the second voice control function to obtain a second recognition result.

[0204] In the embodiment of the present application, the mobile phone includes at least a first voice control function and a second voice control function. In addition, the voice recognition engines used by different voice control functions are different. In the embodiment of the present application, the voice recognition engine corresponding to the first voice control function is recorded as the first voice recognition engine, and the voice recognition engine corresponding to the second voice control function is recorded as the second voice recognition engine.

[0205] It can be seen from the above description that when the preset scenario is triggered, the second voice recognition function will be triggered to perform voice recognition on the audio data. That is to say, when the preset scenario is triggered, in addition to performing voice recognition on the audio data through the first voice recognition engine, the collected audio data also needs to be voice recognized by the second voice recognition engine, that is, S505 and S506. Furthermore, if the audio data contains voice commands supported by the second voice control function, the mobile phone needs to respond to the voice command and perform the corresponding operation through the second voice control module corresponding to the second voice control function.

[0206] The first recognition result may indicate whether the first audio data includes a voice instruction supported by the first voice control function. The second recognition result may indicate whether the first audio data includes a voice instruction supported by the second voice control function.

[0207] It should be noted that the mobile phone may execute S505 first and then S506, or may execute S506 first and then S505, or the mobile phone may execute S505 and S506 simultaneously. In the embodiment of the present application, the execution order of S505 and S506 is not limited.

[0208] S507. Determine whether the first recognition result and / or the second recognition result indicates that the first audio data includes a preset voice instruction.

[0209] In some embodiments, the mobile phone may store multiple voice commands supported by the first voice control function and multiple voice commands supported by the second voice control function. The preset voice command may be any voice command supported by the first voice control function or any voice command supported by the second voice control function.

[0210] It can be seen from the above description that the voice commands supported by the first voice control function and the second voice control function may be completely non-repetitive, that is, the voice commands supported by the first voice control function and the second voice control function are non-repetitive.

[0211] If the judgment result of S507 is no, that is, neither the first recognition result nor the second recognition result recognizes that the audio data includes the preset voice command. At this time, it means that the user may not intend to control the mobile phone by voice. Afterwards, the mobile phone can continue to collect audio data and recognize the audio data to determine whether the user says the voice command supported by the first voice control function and / or the second voice control function. That is, in the case where the judgment result of S507 is no, if the current scene is still in the preset scene, the mobile phone can continue to collect the first audio data. It should be noted that the judgment result of S507 is no in the case of Figure 5 Not shown.

[0212] Alternatively, if the judgment result of S507 is no, it is also possible that the mobile phone has an error in recognizing the audio data and has failed to accurately recognize the voice command spoken by the user. In this case, the user needs to speak the accurate voice command again. In some embodiments, if the judgment result of S507 is no, the mobile phone can display a prompt message on the interface, which is used to prompt the user to try to speak the voice command.

[0213] If the judgment result of S507 is yes, it means that the user wants to control the mobile phone to perform the corresponding operation through voice. Therefore, if the judgment result of S507 is yes, the mobile phone can execute S508.

[0214] S508. The mobile phone executes the operation corresponding to the preset voice command.

[0215] For the first voice control function, if the audio data includes a voice command supported by the first voice control function, the mobile phone should perform a corresponding operation through the first voice control module. For the second voice control function, if the audio data includes a voice command supported by the second voice control function, the mobile phone should perform a corresponding operation through the second voice control module.

[0216] As can be seen from the above description, if two voice control functions perform voice recognition and execute operations at the same time, conflicts may occur. For example, for the same voice command, two voice control functions repeatedly execute operations. Therefore, in an embodiment of the present application, for the two recognition results obtained by the two voice recognition engines for the same audio data, it is possible to make a comprehensive decision to determine whether an operation needs to be executed, and to determine which voice control function corresponding module to execute the corresponding operation.

[0217] In some embodiments, the recognition accuracy of the first speech recognition engine and the second speech recognition engine may be the same or different. When the recognition accuracy of the first speech recognition engine and the second speech recognition engine are the same, the priorities of the first recognition result and the second recognition result may be set to be the same.

[0218] The following description takes the example that the priorities of the first recognition result and the second recognition result are set to be the same: In some embodiments, the voice instructions supported by the first voice control function and the voice instructions supported by the second voice control function may also include partially repeated instructions. Figure 2A As shown, the voice instructions supported by the first voice control function may include application instructions, that is, when some applications are started, the user is supported to perform corresponding operations by voice control of the mobile phone, such as pause, play, next, previous, like, favorite, follow, etc. In some embodiments, the preset scene corresponding to the second voice control function may also include a video application scene. Correspondingly, in the scene of the video application, the voice instructions supported by the second voice control function may include instructions such as pause, play, next, previous, like, favorite, follow, etc. In other words, there are some repeated voice instructions supported by the first voice control function and the second voice control function. In this embodiment, when it is determined that the audio data includes the above-mentioned application instructions, the mobile phone can perform corresponding operations according to the voice instructions through the first voice control module or the second voice control module.

[0219] The time required for the first voice recognition engine of the mobile phone to recognize the audio data and obtain the first recognition result may be different from the time required for the second voice recognition engine to recognize the audio data and obtain the second recognition result. If there are some repeated voice commands between the first voice control function and the second voice control function, the voice commands recognized by the first recognition result and the second recognition result may be the same.

[0220] For example, the content of the first audio data is "pause". Since the voice command "pause" is a repeated voice command between the first voice control function and the second voice control function, the first recognition result and the second recognition result may be the same for the audio data. At this time, if the mobile phone obtains the first recognition result first, the mobile phone can perform the operation corresponding to the preset voice command through the first voice control module. Afterwards, the mobile phone obtains the second recognition result. Since the mobile phone has already performed the corresponding operation through the first voice control module, in order to avoid repeating the same operation, the mobile phone can no longer perform the corresponding operation through the second voice control module in response to the second recognition result. In this way, the time required for the mobile phone to respond to the voice command spoken by the user can be reduced, thereby improving the response efficiency.

[0221] In some embodiments, after the mobile phone has executed the operation corresponding to the preset voice command contained in the audio data through the first voice control module, the mobile phone can set a response identifier to indicate that a response has been made to the first audio data. And, after receiving the second recognition result, the mobile phone can determine that it is no longer necessary to perform the corresponding operation in response to the second recognition result based on the response identifier. Afterwards, the mobile phone can cancel the response identifier.

[0222] Similarly, taking the user saying "pause" as an example, if the mobile phone first obtains the second recognition result, the mobile phone can also execute the operation corresponding to the preset voice command through the second voice control module. Similarly, after that, if the mobile phone obtains the first recognition result again, it will no longer execute the corresponding operation according to the first recognition result. This can avoid the mobile phone from executing two repeated operations according to the same voice command of the same audio data.

[0223] It can be seen from the above description that after the second voice recognition engine is started, voice recognition needs to be triggered under a preset scenario. The voice commands supported under the preset scenario are usually relatively fixed, and the types of voice commands are relatively small. For example, in the scenario where the alarm rings, the voice commands supported by the second voice control function usually include the two major types of commands of "cancel the alarm" and "remind later". Therefore, for the second voice recognition engine corresponding to the second voice control function, the voice commands supported by the second voice control function can usually be better identified from the audio data. Therefore, in other embodiments, it is believed that the recognition accuracy of the second voice recognition engine is higher than that of the first voice recognition engine.

[0224] Taking the recognition accuracy of the second speech recognition engine as an example, which is higher than the recognition accuracy of the first speech recognition engine, for the audio data collected by the mobile phone, the priority of the second recognition result obtained by the second speech recognition engine can be set higher. For example, the priority of the second recognition result is higher than the first recognition result obtained by the first speech recognition engine.

[0225] In the case where the priority of the second recognition result is higher than that of the first recognition result, in order to ensure that the corresponding operation is performed according to the second recognition result first, for audio data, the mobile phone should determine whether an operation needs to be performed and the operation to be performed after obtaining the second recognition result. In other words, if the mobile phone obtains the first recognition result first, the mobile phone needs to wait for the second voice recognition engine to recognize the audio result and obtain the second recognition result, and then determine whether an operation needs to be performed and the operation to be performed based on the second recognition result and the first recognition result.

[0226] In some embodiments, the above S508 may specifically include: if the second recognition result indicates that the first audio data includes a voice instruction supported by the second voice control function, and the first recognition result has not been obtained when the second recognition result is obtained, the mobile phone performs the operation corresponding to the preset voice instruction based on the second voice control function according to the second recognition result. In other words, if the mobile phone obtains the second recognition result first, it can first determine whether the audio data includes the preset voice instruction based on the second recognition result. If so, since the priority of the second recognition result is higher than the first recognition result, even if the first recognition result has not been obtained, the mobile phone can directly perform the corresponding operation based on the second voice control function. It can be understood that after obtaining the first recognition result, if the first recognition result indicates that the first audio data includes the preset voice instruction, the mobile phone may no longer perform the operation corresponding to the preset voice instruction. If the first recognition result indicates that the first audio data does not include the preset voice instruction, the mobile phone does not need to perform the operation according to the first recognition result.

[0227] In some other embodiments, the mobile phone may obtain the first recognition result first. Still taking the second recognition result having a higher priority than the first recognition result as an example, if the first recognition result indicates that the first audio data includes a preset voice command, and the second recognition result has not been obtained when the first recognition result is obtained, the mobile phone needs to decide what operation to perform after obtaining the second recognition result.

[0228] Specifically, in some embodiments, if the first recognition result indicates that the first audio data includes a preset voice instruction, and the second recognition result has not been obtained when the first recognition result is obtained, then after obtaining the second recognition result, if the second recognition result indicates that the first audio data does not include a preset voice instruction, the operation corresponding to the preset voice instruction is performed based on the first voice control function according to the first recognition result.

[0229] In other embodiments, if the first recognition result indicates that the first audio data includes a preset voice instruction, and the second recognition result has not been obtained when the first recognition result is obtained, then after the second recognition result is obtained, if the second recognition result indicates that the first audio data includes a preset voice instruction, and the first recognition result and the second recognition result are different, the operation corresponding to the preset voice instruction is performed based on the second voice control function according to the second recognition result. In other words, if both voice control functions recognize that the first audio data includes a preset voice instruction, but the preset voice instructions recognized by the two are different, the operation is performed according to the second recognition result first.

[0230] In other embodiments, if the first recognition result indicates that the first audio data includes a preset voice instruction, and the second recognition result has not been obtained when the first recognition result is obtained, then after the second recognition result is obtained, if the second recognition result indicates that the first audio data includes a preset voice instruction, and the first recognition result and the second recognition result are the same, then the operation corresponding to the preset voice instruction is performed based on the first voice control function according to the first recognition result, or the operation corresponding to the preset voice instruction is performed based on the second voice control function according to the second recognition result. In other words, if both voice control functions recognize that the first audio data includes a preset voice instruction, and the preset voice instructions recognized by both are the same, the corresponding operation can be performed according to either recognition result.

[0231] Alternatively, in some other embodiments, the mobile phone may obtain the first recognition result and the second recognition result at the same time. In this embodiment, the mobile phone preferentially performs the operation according to the second recognition result. In the case where the second recognition result indicates that the first audio data includes a preset voice instruction, the first recognition result is discarded, and the operation corresponding to the preset voice instruction is directly performed according to the second recognition result based on the second voice control function.

[0232] In the case where the second recognition result indicates that the first audio data does not include the preset voice command, whether to perform the operation is determined according to the first recognition result. Specifically, if the first recognition result indicates that the first audio data includes the preset voice command, the mobile phone performs the operation corresponding to the preset voice command based on the first voice control function according to the first recognition result. If the first recognition result indicates that the first audio data does not include the preset voice command, the mobile phone does not need to perform the operation.

[0233] In some embodiments, still taking the example that the priority of the second recognition result is higher than the priority of the first recognition result, the above S507 and S508 may specifically include the following contents:

[0234] After the first voice recognition engine returns the first recognition result, determine whether the second voice recognition engine returns the second recognition result. 1. If the second voice recognition engine has returned the second recognition result, and the second recognition result indicates that the first audio data includes a valid instruction (preset voice instruction), the first recognition result is discarded and the second recognition result is used as the basis. 2. If the second voice recognition engine has returned the second recognition result, and the second recognition result indicates that the first audio data does not include a valid instruction, the first recognition result is used as the basis. 3. If the second voice recognition engine has not returned the second recognition result, wait for the second voice recognition engine to return the second recognition result.

[0235] After the second voice recognition engine returns the second recognition result, determine whether the first voice recognition engine returns the first recognition result. 1) If the first voice recognition engine does not return the first recognition result, and the second recognition result indicates that the first audio data includes valid instructions (preset voice instructions), there is no need to wait for the first recognition result returned by the first voice recognition engine, and the corresponding operation is performed directly according to the second recognition result. 2) If the first voice recognition engine does not return the first recognition result, and the second recognition result indicates that the first audio data does not include valid instructions, wait for the first voice recognition engine to return the first recognition result. 3) If the first voice recognition engine has returned the first recognition result, and the second recognition result indicates that the first audio data includes valid instructions, the second recognition result shall prevail and the first recognition result shall be discarded. 4) If the first voice recognition engine has returned the first recognition result, and the second recognition result indicates that the first audio data does not include valid instructions, the second recognition result shall be discarded and the first recognition result shall prevail.

[0236] In the technical solution provided by the embodiment of the present application, in the scenario where multiple voice control functions simultaneously support users to control mobile phones through voice, the corresponding operation is performed based on the second recognition result with higher recognition accuracy. In this way, the accuracy of voice recognition can be improved, the problem of the voice control function making mistakes in recognizing the intention of the user's voice can be reduced, the accuracy of voice recognition can be improved, and the user experience can be improved.

[0237] It is understandable that the above embodiments describe the situation where the time points at which the mobile phone obtains the first recognition result and the second recognition result are different. In other embodiments, the time required for the first speech recognition engine and the second speech recognition engine to recognize the audio data may also be the same. In other words, the mobile phone obtains the first recognition result and the second recognition result at the same time. Since the priority of the second recognition result is higher than the first recognition result, the mobile phone should first indicate whether the first audio data includes a preset voice instruction based on the second recognition result. If so, the mobile phone can directly perform the corresponding operation through the second voice control module according to the second recognition result. At the same time, if the first audio data includes a preset voice instruction according to the first recognition result, the mobile phone no longer performs the operation corresponding to the preset voice instruction. If the first audio data does not include a preset voice instruction according to the first recognition result, the mobile phone does not need to perform the operation according to the first recognition result.

[0238] In the above embodiment, the second recognition result is given a higher priority than the first recognition result. It is understandable that in other embodiments, the priority of the first recognition result may be set higher than the priority of the second recognition result.

[0239] As can be seen from the description of the above embodiment, in actual execution, after obtaining the first recognition result or the second recognition result, the mobile phone can first determine whether the audio data includes the preset voice command according to the obtained recognition result. In other words, after executing S505 or S506, the mobile phone can directly execute the determination step of S507. Afterwards, when receiving another recognition result, the mobile phone can determine whether the audio data includes the preset voice command for the other recognition result.

[0240] Further, in some embodiments, the mobile phone may directly execute S508 based on only one of the recognition results indicating that the first audio data includes a preset voice instruction.

[0241] It should be noted that the specific implementation process of the mobile phone executing the preset voice command through the first voice control module or the second voice control module can refer to the description in the relevant technology and will not be repeated in the embodiments of the present application.

[0242] In the technical solution provided in the embodiment of the present application, when more than two voice control functions of a mobile phone trigger voice recognition at the same time, the mobile phone collects audio data through a recording module based on only one of the voice control functions. Afterwards, the collected audio data is respectively subjected to voice recognition by the voice recognition engines corresponding to each voice control function. Finally, it is determined in combination with each recognition result whether it is detected that the user has spoken a voice command supported by voice control. If so, the mobile phone will perform the operation corresponding to the voice command through the voice control module corresponding to a corresponding voice control function. In this way, when more than two voice control functions support voice control at the same time, it can be ensured that each voice control function can be used. In addition, different voice control functions will not repeatedly perform the operation corresponding to the same voice command, avoiding conflicts between multiple voice control functions.

[0243] The following combination Figure 7 , the interaction process between the various modules in the mobile phone during the execution of the above-mentioned voice control method is described. In this embodiment, a mobile phone including a first voice control module, a second voice control module, a decision module, a recording module and a display module is used as an example for description. Among them, the first voice control module includes a first interaction module, a first recording control module, a first voice recognition engine and a first instruction execution module, and the second voice control module includes a second interaction module, a second recording control module, a second voice recognition engine and a second instruction execution module. The second recording control module is Figure 6 Not shown.

[0244] S601. The mobile phone starts.

[0245] S602. The first interaction module detects a first start event.

[0246] S603: In response to the first start event, enable the first voice control function.

[0247] S604. The first recording control module sends a first calling request to the recording module.

[0248] S605. In response to the first call request, the recording module allocates the recording permission to the first recording control module.

[0249] At this point, the mobile phone has begun to collect audio data through the first voice control function. Afterwards, if audio data is collected, the first recording control module can obtain the audio data. Afterwards, the first recording control module can send the audio data to the first voice recognition engine, and the first voice recognition engine determines whether the first audio data contains voice instructions supported by the first voice control function based on the analysis of the audio data. After the recognition result indicates that the first audio data contains voice instructions supported by the first voice control function, the first instruction execution module can respond to the voice instruction and perform corresponding operations.

[0250] S606. The first interaction module sends a first icon display request to the display module.

[0251] S607. In response to the first icon display request, the display module displays the first recording icon.

[0252] In some embodiments, when the first voice control function is visible and can be spoken, the first recording icon can be as follows: Figure 2A The recording icon 10a is shown.

[0253] In other embodiments, after S605, the mobile phone system detects that the current recording permission is occupied, and may also display a message in the notification bar of the mobile phone. Figure 2A The recording icon 10b shown. It should be noted that this step Figure 7 Not shown in the illustrated process flow.

[0254] S608. The second interaction module detects a second start event.

[0255] S609. In response to the second start event, enable the second voice control function.

[0256] S610: Determine whether a preset scene triggering event is detected.

[0257] If no preset scene trigger event is detected, that is, the judgment result of S610 is no, then the first voice control function of the mobile phone operates normally. The first recording control module obtains the collected audio data through the recording module. Afterwards, the first recording control module sends the audio data to the first voice recognition engine. The first voice recognition engine performs voice recognition on the audio data to obtain a recognition result. Then, based on the recognition result, it is determined whether the first audio data contains a preset voice instruction. If so, the first voice recognition engine notifies the first instruction execution module to execute the operation corresponding to the voice instruction contained in the audio data. It should be noted that in the case where the judgment step of S610 is no, Figure 6 Not shown.

[0258] If a preset scene triggering event is monitored, the second voice control module is triggered to start voice recognition. Under normal circumstances, after the preset scene is triggered, the second voice control module needs to start collecting audio data. In an embodiment of the present application, in order to avoid conflicts that may occur when two voice control functions trigger voice recognition at the same time, audio data is collected through the first voice control module. It can be seen from the description of the above embodiment that when both voice control functions are turned on, the first voice control module can be used to monitor whether the preset scene is triggered. In other words, the above S610 is executed by the first interaction module of the first voice control module.

[0259] S611. The first interaction module sends an instruction message to the second speech recognition engine.

[0260] The indication message is used to notify the second voice recognition engine that the mobile phone triggers a message of a preset scenario.

[0261] S612. In response to the instruction message, the second speech recognition engine is started.

[0262] S613. The recording module sends the first audio data to the first recording control module.

[0263] S614. The first recording control module sends the first audio data to the first speech recognition engine.

[0264] S615. The first recording control module sends the first audio data to the second speech recognition engine.

[0265] S616. The first speech recognition engine performs speech recognition on the first audio data to obtain a first recognition result.

[0266] S617. The second speech recognition engine performs speech recognition on the first audio data to obtain a second recognition result.

[0267] S618. The decision module obtains the first recognition result and the second recognition result.

[0268] S619. The decision module determines whether the first recognition result and / or the second recognition result indicates that the first audio data contains a preset voice instruction.

[0269] If the first recognition result and / or the second recognition result indicates that the first audio data contains a preset voice command, that is, the user wants to control the mobile phone to perform a corresponding operation by voice, then the mobile phone needs to respond to the preset voice command and perform the corresponding operation.

[0270] Reference Figure 7 It can be seen that in this example, the decision module is set in the first voice module. It should be noted that in other embodiments, the decision module can be set in the second voice control module, or the decision module can be set independently of the first voice control module and the second voice control module.

[0271] As can be seen from the description of the above embodiment, the priority of the second recognition result can be set to the priority of the first recognition result. The mobile phone can perform operations according to the second recognition result first.

[0272] In some embodiments, the preset voice instructions include: voice instructions supported by the first voice control function, and voice instructions supported by the second voice control function. Specifically, the judgment result of S619 may include the following situations:

[0273] The first case (the judgment result of S619 is yes): the second recognition result indicates that the first audio data contains a preset voice instruction, and the first recognition result indicates that the first audio data contains a preset voice instruction.

[0274] The second case (the judgment result of S619 is yes): the second recognition result indicates that the first audio data includes the preset voice command, and the first recognition result indicates that the first audio data does not include the preset voice command.

[0275] The third case (the judgment result of S619 is yes): the second recognition result indicates that the first audio data does not include the preset voice instruction, and the first recognition result indicates that the first audio data includes the preset voice instruction.

[0276] The fourth case (the judgment result of S619 is No): the second recognition result indicates that the first audio data does not include the preset voice command, and the first recognition result indicates that the first audio data does not include the preset voice command.

[0277] In combination with the description of the above embodiment, it can be known that when the priority of the second recognition result is set higher than that of the first recognition result, in both the first and second cases, the second recognition result can determine that the first audio data includes the preset voice command. Therefore, regardless of whether the first recognition result recognizes that the first audio data includes the preset voice command, the corresponding operation is performed according to the second recognition result, such as S620-S621. It should be noted that in Figure 7 In the flowchart shown, the first case and the second case in the judgment result of S619 are represented by r1.

[0278] S620. The decision module sends a preset voice instruction to the second instruction execution module.

[0279] S621. The second instruction execution module executes an operation corresponding to the preset voice instruction in response to the preset voice instruction.

[0280] In the third and fourth cases of the judgment result of S619 above, the second recognition result indicates that the first audio data does not contain the preset voice command. Afterwards, the mobile phone can determine whether the first audio data includes the preset voice command based on the first recognition result. Specifically, in the third case, the first recognition result indicates that the first audio data includes the preset voice command, then the mobile phone can perform corresponding operations according to the preset voice command, such as S622-S623. Figure 7 In the flowchart shown, the third case in the determination result of S619 is represented by r2. In the fourth case, the first recognition result indicates that the first audio data also does not contain the preset voice command, so the mobile phone does not need to perform any operation.

[0281] S622. The decision module sends a preset voice instruction to the first instruction execution module.

[0282] S623. The first instruction execution module executes the operation corresponding to the preset voice instruction in response to the preset voice instruction.

[0283] In combination with the above description, it can be known that the preset scene that triggers the second voice control module to perform voice recognition can be an alarm ringing, an incoming call ringing, a call in progress, etc. After exiting the preset scene (such as the alarm stops ringing, the incoming call stops ringing, or the phone is hung up, etc.), the second voice control module will also stop collecting audio data. Therefore, in some embodiments, after the above S610, the first interaction module can continue to monitor the preset scene exit event. In addition, after monitoring the preset scene exit event, the first interaction module can notify the first recording control module to stop sending audio data to the second voice recognition engine.

[0284] like Fig. 9The structure diagram of the first voice control module and the second voice control module of the mobile phone in some embodiments of the present application is shown. In this embodiment, the decision module is set in the first voice control module as an example for explanation.

[0285] In the technical solution provided by the embodiment of the present application, when both the first voice control function and the second voice control function are in the startup state, the first voice control module monitors whether the mobile phone triggers the preset scene. After the first voice control module monitors the triggering of the preset scene, the audio data obtained after this moment needs to be sent not only to the first voice recognition engine corresponding to the first voice control module, but also to the second voice recognition engine corresponding to the second voice control module. In this way, even if the preset scene is triggered, the audio data is not collected by the second voice control module, and the audio data can be recognized and the corresponding operation can be performed by the second voice control module. That is, it is ensured that in the preset scene, whether the user speaks the voice command supported by the first voice control function or the voice command supported by the second voice control function, the mobile phone can recognize and perform the corresponding operation. That is, in the case of triggering the preset scene, the first voice control function and the second voice control function of the mobile phone can be used normally, and the possible conflict between the two functions in the collection of audio data and voice control can be reduced.

[0286] It can be seen from the description of the above embodiment that when both voice control functions are in the activated state, the second voice control module can also monitor whether the preset scene is triggered. In this embodiment, the second interaction module of the second voice control module monitors whether the preset scene is triggered. That is, the above S610 is executed by the second interaction module. Please refer to Figure 8 , S610-S612 in S601-S623 are replaced by S701-S704.

[0287] S701. The second interaction module determines whether a preset scene triggering event is detected.

[0288] If the result of S701 is yes, S702 is executed. Figure 8 In the flowchart shown, the case where the judgment result of S702 is No is not shown.

[0289] S702: Start the second speech recognition engine.

[0290] Since the second voice control module cannot determine whether there is another voice control module in the current mobile phone that is collecting audio data, a judgment may be made first, namely S703.

[0291] S703: Determine whether there is a voice control module collecting audio data.

[0292] If the judgment result of S703 is yes, it means that no other voice control module is currently collecting audio data. At this time, the second voice control module can normally execute the recording module to collect audio data and perform voice recognition on the collected audio data. After determining that the first audio data contains a voice instruction supported by the second voice control function, the second voice control module needs to respond to the voice instruction and perform the corresponding operation. It should be noted that Figure 8 In the flowchart shown, the case where the judgment result of S703 is No is not shown. In some embodiments, S703 may be executed by the second recording control module of the second voice control module.

[0293] In the embodiment of the present application, since the first voice control function has been started before and audio data is being collected based on the first voice control function, the judgment result of S703 is yes. At this time, in order to avoid repeated recording, the second recording control module does not execute the step of calling the recording module. At the same time, the second interaction module does not request the display module to display the second recording icon.

[0294] In addition, the second interaction module needs to notify the first recording control module that the preset scene is currently triggered, so that the first recording control module sends the audio data to the second speech recognition engine after receiving the notification message, such as S704.

[0295] S704. Send a second notification message to the first recording control module.

[0296] The second notification message is used to enable the first recording control module to start sending the first audio data to the second speech recognition engine.

[0297] It is understandable that after the second voice control module detects the preset scene exit event, the second voice control module can also send a third notification message to the first recording control module of the first voice control module again. After receiving the third notification message, the first recording control module does not need to send the collected audio data to the second voice recognition engine.

[0298] Alternatively, in other embodiments, a separate module may be used to monitor the preset scene triggering event. In some embodiments, the module may be named a voice control management module. In some embodiments, the voice control management module may be started when it is detected that two or more voice control functions are turned on at the same time in the mobile phone, and the preset scene triggering event is monitored by the voice control management module. If the mobile phone only turns on one voice control function at the same time, such as the second voice control function, the mobile phone may monitor the preset scene triggering event through the second interaction module of the second voice control function.

[0299] Furthermore, after the voice control management module detects that the preset scene is triggered, the voice control management module sends a fourth notification message to the second voice control module. After the second voice control module receives the fourth notification message, it will not execute the step of pulling up the recording module to collect audio data through the second recording control module. At the same time, the second voice control module will not request the display module to display the second recording icon through the second interaction module, such as Figure 3B The recording icon 308 is shown. This avoids the problem of repeated recording and displaying icons corresponding to two voice control functions at the same time.

[0300] In addition, when the voice control management module detects that a preset scene is triggered, the voice control management module also needs to send a fifth notification message to the first recording control module. After receiving the fifth notification message, the first recording control module can send the first audio data collected later to the second voice recognition engine.

[0301] Further, the voice control management module may continue to monitor the preset scene exit event. It is understandable that after the voice control management module monitors the preset scene exit event, it may also send a sixth notification message to the first recording control module. After receiving the sixth notification message, the first recording control module stops sending the audio data to the second voice recognition engine.

[0302] In the technical solution provided in the embodiment of the present application, the mobile phone monitors whether there are more than two voice control modules that trigger voice recognition at the same time through the voice control management module, and sends notification messages to the two voice control modules respectively in the scenario of simultaneous triggering. In order to achieve the scenario where more than two voice control modules trigger voice recognition at the same time, the mobile phone collects audio data through one of the voice control modules, but the more than two voice control modules can perform voice recognition on the collected audio data. In this way, it is helpful to reduce the conflict problem caused by the situation where more than two voice control modules trigger voice control at the same time. In addition, in the scenario where more than two voice control modules trigger voice recognition at the same time, ensure that both voice control functions are available.

[0303] Some other embodiments of the present application provide an electronic device, which may be the mobile phone mentioned above. The electronic device may include: a memory, a display screen, a recording module and one or more processors. The memory, the display screen and the recording module are coupled to the processors respectively. The display screen is used to display the interface of the electronic device, and the recording module is used to collect audio data. The memory is also used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute the various functions or steps executed by the mobile phone 1 in the above method embodiment. When the electronic device is an electronic device, its structure can refer to Figure 4AThe structure of the electronic device 100 is shown.

[0304] The present application also provides a chip system, such as Fig.10 As shown, the chip system 100 includes at least one processor 1001 and at least one interface circuit 1002. The processor 1001 and the interface circuit 1002 can be interconnected via lines. For example, the interface circuit 1002 can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit 1002 can be used to send signals to other devices (such as the processor 1001). Exemplarily, the interface circuit 1002 can read instructions stored in the memory and send the instructions to the processor 1001. When the instruction is executed by the processor 1001, the electronic device can execute the various steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of the present application.

[0305] The embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device (such as mobile phone 1), the electronic device executes each function or step executed by mobile phone 1 in the above-mentioned method embodiment.

[0306] The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the mobile phone 1 in the above method embodiment. The computer may be an electronic device, such as the mobile phone 1.

[0307] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0308] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0309] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0310] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0311] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0312] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A voice control method, characterized in that: The method is applied to an electronic device, the electronic device having a first voice control function and a second voice control function; after the first voice control function is activated, the electronic device supports real-time voice control, and after the second voice control function is activated, the electronic device supports voice control in response to a preset scene triggering event, the preset scene triggering event including at least one of an alarm ringing, an incoming call ringing, and a call being made; the method includes: After the first voice control function is activated, continuously collecting audio data; After both the first voice control function and the second voice control function are activated, in response to the preset scene triggering event, voice recognition is performed on the first audio data collected by the electronic device based on the first voice control function to obtain a first recognition result, and voice recognition is performed on the first audio data based on the second voice control function to obtain a second recognition result; If the first recognition result and / or the second recognition result indicates that the first audio data includes a preset voice instruction, an operation corresponding to the preset voice instruction is performed.

2. The method according to claim 1, characterized in that The electronic device pre-stores multiple voice commands supported by the first voice control function and multiple voice commands supported by the second voice control function; the preset voice command is any voice command supported by the first voice control function or any voice command supported by the second voice control function.

3. The method according to claim 2, characterized in that If the first recognition result and / or the second recognition result indicates that the first audio data includes a preset voice instruction, performing an operation corresponding to the preset voice instruction includes: If the second recognition result indicates that the first audio data includes the preset voice instruction, and the first recognition result has not been obtained when the second recognition result is obtained, performing the operation corresponding to the preset voice instruction based on the second voice control function according to the second recognition result; If the first recognition result indicates that the first audio data includes the preset voice instruction, and the second recognition result has not been obtained when the first recognition result is obtained, after obtaining the second recognition result, if the second recognition result indicates that the first audio data does not include the preset voice instruction, performing the operation corresponding to the preset voice instruction based on the first voice control function according to the first recognition result; After obtaining the second recognition result, if the second recognition result indicates that the first audio data includes the preset voice instruction, and the first recognition result and the second recognition result are different, performing an operation corresponding to the preset voice instruction based on the second voice control function according to the second recognition result; After obtaining the second recognition result, if the second recognition result indicates that the first audio data includes the preset voice instruction, and the first recognition result and the second recognition result are the same, then the operation corresponding to the preset voice instruction is performed based on the first voice control function according to the first recognition result, or the operation corresponding to the preset voice instruction is performed based on the second voice control function according to the second recognition result.

4. The method according to claim 2, characterized in that: If the first recognition result and / or the second recognition result indicates that the first audio data includes a preset voice instruction, performing an operation corresponding to the preset voice instruction includes: If the second recognition result indicates that the first audio data includes the preset voice instruction, and the first recognition result indicates that the first audio data does not include the preset voice instruction, performing an operation corresponding to the preset voice instruction based on the second voice control function according to the second recognition result; If the second recognition result indicates that the first audio data does not include the preset voice instruction, and the first recognition result indicates that the first audio data includes the preset voice instruction, performing an operation corresponding to the preset voice instruction based on the first voice control function according to the first recognition result; If the second recognition result indicates that the first audio data includes the preset voice instruction, and the first recognition result indicates that the first audio data includes the preset voice instruction, and the first recognition result and the second recognition result are different, then performing the operation corresponding to the preset voice instruction based on the second voice control function according to the second recognition result; If the second recognition result indicates that the first audio data includes the preset voice instruction, and the first recognition result indicates that the first audio data includes the preset voice instruction, and the first recognition result is the same as the second recognition result, then the operation corresponding to the preset voice instruction is performed based on the first voice control function according to the first recognition result, or the operation corresponding to the preset voice instruction is performed based on the second voice control function according to the second recognition result.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: After both the first voice control function and the second voice control function are activated, in response to the preset scene triggering event, the first voice control function provides the first audio data to the second voice control function.

6. The method according to claim 5, characterized in that In response to the preset scene triggering event, the first voice control function provides the first audio data to the second voice control function, including: In response to the preset scene triggering event, the second voice recognition engine corresponding to the second voice control function is started; wherein, the first voice control function is started, and the first voice recognition engine corresponding to the first voice control function is started; The first recording control module of the first voice control function sends the first audio data to the second voice recognition engine in response to the preset scene triggering event.

7. The method according to claim 6, characterized in that The method further comprises: After both the first voice control function and the second voice control function are activated, the first interaction module of the first voice control function monitors the preset scene triggering event; The first recording control module of the first voice control function sends the first audio data to the second voice recognition engine in response to the preset scene triggering event, including: In response to the preset scenario triggering event, the first interaction module sends a first notification message to the first recording control module; the first notification message is used to enable the first recording control module to start sending the first audio data to the second speech recognition engine.

8. The method according to claim 6, characterized in that The method further comprises: After both the first voice control function and the second voice control function are activated, the second interaction module of the second voice control function monitors the preset scene triggering event; The first recording control module of the first voice control function sends the first audio data to the second voice recognition engine in response to the preset scene triggering event, including: In response to the preset scenario triggering event, the second interaction module sends a second notification message to the first recording control module; the second notification message is used to enable the first recording control module to start sending the first audio data to the second speech recognition engine.

9. The method according to claim 8, characterized in that The method further comprises: After the second interaction module detects a preset scene exit event, the second interaction module sends a third notification message to the first recording control module; the third notification message is used to make the first recording control module stop sending the first audio data to the second speech recognition engine.

10. The method according to any one of claims 1 to 4, characterized in that The method further comprises: After both the first voice control function and the second voice control function are activated, in response to the preset scene triggering event, the second voice control function provides the first audio data to the first voice control function.

11. The method according to claim 10, characterized in that In response to the preset scene triggering event, providing the first audio data to the first voice control function by the second voice control function includes: In response to the preset scene triggering event, the second voice recognition engine corresponding to the second voice control function is started; wherein, the first voice control function is started, and the first voice recognition engine corresponding to the first voice control function is started; In response to the preset scene triggering event, the audio data collection based on the first voice control function is changed to the audio data collection based on the second voice control function; Furthermore, the second recording control module of the second voice control function sends the first audio data collected by the electronic device to the first voice recognition engine.

12. The method according to claim 11, characterized in that The method further comprises: In the process of the electronic device continuously collecting audio data based on the first voice control function, the electronic device displays a first recording icon corresponding to the first voice control function; After the audio data collection based on the first voice control function is changed to the audio data collection based on the second voice control function, the method further includes: canceling the display of the first recording icon; and displaying a second recording icon corresponding to the second voice control function.

13. The method according to claim 11 or 12, characterized in that: The method further comprises: In response to the preset scene exit event, the audio data collection based on the second voice control function is changed to the audio data collection based on the first voice control function.

14. The method according to claim 12, characterized in that The method further comprises: In response to the preset scene exit event, the second recording icon is canceled and the first recording icon is displayed.

15. An electronic device, characterized in that: The electronic device comprises: a processor, a memory, a display screen and a recording module; the memory, the display screen and the recording module are respectively coupled to the processor; The display screen is used to display the interface of the electronic device, and the recording module is used to collect audio data; the memory stores computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-14.

16. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 14.

Citation Information

Patent Citations

  • Control method and apparatus of multiple voice assistants, and computer readable storage medium

    CN107919123A

  • Method, apparatus and system for controlling multiple voice assistants, and computer-readable storage medium

    CN111954868A

  • Voice recognition engine calling method and electronic equipment

    CN119229859A

  • Voice control method and device, and storage medium

    CN119232838A

  • Device and method for controlling application program using voice command under preset condition

    US20190005957A1