Voice control method and device, and storage medium
By using the situational perception module and the voice processing module to pause or enable the voice recognition function in a specific scene event in the voice control scheme, the problem of low efficiencies in voice control in the prior art is solved, and the user has realized that the voice is not turned on without voice The instant response capability of the switch is improved to improve the voice control experience.
Patent Information
- Application Number
- CN202310794709.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2024-12-31
AI Technical Summary
The existing voice control scheme relies on voice assistants, resulting in time delay and low wake-up efficiency. Users cannot respond to voice commands instantly without turning on the first voice control switch, affecting the user experience.
By turning off the first voice control function when the user turns off the first voice control switch and turning on the second voice control function when the second voice control switch is turned on, the situation perception module and the voice processing module are used to pause or turn on the corresponding event in a specific scene event using the situation perception module or voice processing module. Function to enable short or continuous voice recognition in response to user commands.
Without the first voice control switch turned on, the device can still respond to the user's voice commands for scene events, improving the voice control experience and avoiding the immediate response problem caused by the lack of voice control.
Smart Images

Figure CN119232838A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a voice control method, device and storage medium. Background Art
[0002] With the continuous development of artificial intelligence technology, the functions of smart electronic devices are becoming more and more powerful. For example, users control electronic devices through voice. When users control electronic devices through voice, they first need to say the wake-up word to wake up the voice assistant of the electronic device. After the voice assistant is awakened, the user can use voice to control the electronic device to perform operations such as adjusting the volume, setting the alarm, and querying information. Usually, when electronic devices leave the factory, equipment manufacturers will set a default wake-up word for the voice assistant of the electronic device. For example, "Hello, YOYO". Of course, in order to improve the user experience, in actual applications, users are usually allowed to customize the wake-up word according to their personal preferences, such as "Turn on YOYO", "Hi, YOYO", etc. However, the above-mentioned voice control scheme relies on the voice assistant, resulting in problems such as extended time and low wake-up efficiency. Summary of the invention
[0003] The embodiments of the present application provide a voice control method, device and storage medium, so that when the user does not turn on the first voice control switch, the device can still respond to the user's voice command for the first scene event, thereby improving the user's voice control experience.
[0004] In a first aspect, an embodiment of the present application proposes a voice control method, which includes: in response to a user turning off a first voice control switch, the electronic device turns off a first voice control function, and the first voice control function is used to perform sound recognition during a time period from the start to the end of a first scene event; in response to a user turning on a second voice control switch, the electronic device turns on a second voice control function, and the second voice control function is used to continuously perform sound recognition; when the first voice control function is turned off and the second voice control function is turned on, when the first scene event is initiated, the second voice control function is paused and the first voice control function is turned on.
[0005] The first voice control switch can be used to control the opening or closing of the first voice control function. The module corresponding to the first voice control function is, for example, Fig.11 The first voice processing module shown. The first scene event can be an alarm ringing, a phone ringing, etc. The first voice processing module can be used to perform sound recognition (or short sound recognition) during the time period from the alarm ringing to the alarm turning off, or to perform sound recognition during the time period from the phone ringing to the phone hanging up (or the phone answering). The first voice control function is also called a scene-based command function.
[0006] The second voice control switch can be used to control the opening or closing of the second voice control function. The module corresponding to the second voice control function is, for example, Fig.11 The second voice processing module shown. The second voice processing module can be used to perform continuous sound reception recognition after the fence on which the second voice processing module depends is triggered. The second voice control function is also called the see-and-speak function.
[0007] When the user turns off the first voice control switch and turns on the second voice control switch, after the first scene event (such as the alarm ringing) is activated, based on the existing solution, the electronic device cannot respond to the first scene event because the first voice control function is not turned on. However, based on the above solution, the electronic device can suspend the second voice control function and turn on the first voice control function after the first scene event is activated, so that the electronic device can perform short sound reception recognition and perform corresponding service operations (such as turning off the alarm) during the time period from the start to the end of the first scene event, so that the user can still respond to the user's voice command for the first scene event when the first voice control switch is not turned on, thereby improving the user's voice control experience. This can avoid the problem of being unable to respond to the user's voice command immediately due to the user not turning on the first voice control switch.
[0008] In an optional embodiment of the first aspect, the electronic device includes a context awareness module, a business processing module and a second voice processing module. In response to the user turning on the second voice control switch, the electronic device turns on the second voice control function, including: in response to the user turning on the second voice control switch, the business processing module subscribes to the fence on which the second voice control function depends to the context awareness module; when the fence on which the second voice control function depends is triggered, the context awareness module notifies the business processing module, and the business processing module controls to pull up the second voice processing module, and the second voice processing module continues to perform sound reception and recognition.
[0009] In the above scheme, after the user turns on the second voice control switch, when the electronic device monitors the triggering of the fence that the second voice control function depends on, it will pull up the second voice processing module corresponding to the second voice control function to perform continuous sound collection and recognition to respond to the user's voice control operation. The user does not need to say the wake-up word, but directly speaks the voice command to control the electronic device to perform the corresponding service operation. For example, when the user is watching a video, he says "pause" and the device pauses playing the video.
[0010] In an optional embodiment of the first aspect, the electronic device also includes a first voice processing module, and the method also includes: after the second voice processing module of the electronic device is pulled up, the second voice processing module sends a first message to the first voice processing module, and the first message is used to notify the first voice processing module to determine the state of the first voice control switch; when the first voice processing module determines that the first voice control switch is not turned on, the first voice processing module subscribes to the fence of the first scene event to the situational awareness module of the electronic device.
[0011] In this embodiment, the first message may correspond to Fig.11 The third notification message (S1106) is shown.
[0012] In the above scheme, when the user turns on the second voice control switch, if the fence on which the second voice control function depends is triggered, the electronic device can pull up the second voice processing module, and the second voice processing module can directly notify the first voice processing module to check the switch state of the first voice control switch, so that the first voice processing module can subscribe to the fence of the first scene event directly to the scenario perception module of the electronic device when the first voice control switch is not turned on, so that when the fence of the first scene event is triggered, the first voice processing module is pulled up for short sound recognition to respond to the first scene event.
[0013] In an optional embodiment of the first aspect, when the first scene event is initiated, the second voice control function is paused and the first voice control function is started, including: when the first voice processing module of the electronic device learns that the first scene event is initiated, the first voice processing module notifies the second voice processing module of the electronic device to pause sound reception recognition; the first voice processing module starts sound reception recognition.
[0014] In the above scheme, the first voice processing module learns from the situational awareness module that the first scene event is initiated. Before starting the sound reception recognition, it first notifies the second voice processing module to suspend the sound reception recognition to seize the sound reception recognition channel of the second voice processing module and perform short sound reception recognition.
[0015] In an optional embodiment of the first aspect, the first voice processing module of the electronic device learns that the first scene event is initiated, including: when the fence of the first scene event is triggered, the situational awareness module of the electronic device sends a second message to the first voice processing module, and the second message is used to notify the initiation of the first scene event.
[0016] In this embodiment, the second message may correspond to Fig.11 The second subscription response (S1110) is shown.
[0017] In the above solution, since the first voice processing module subscribes to the first scene event from the scene perception module, when the first scene event is initiated, the first voice processing module can be informed of the initiation of the first scene event from the scene perception module.
[0018] In an optional embodiment of the first aspect, the method further includes: after the first scene event ends, turning off the first voice control function and turning on the second voice control function.
[0019] In the above scheme, since the first voice processing module corresponding to the first voice control function performs sound recognition during the time period from the start to the end of the first scene event, after the first scene event ends, the electronic device will turn off the first voice processing module and reopen the second voice processing module.
[0020] In an optional embodiment of the first aspect, after the first scene event ends, the first voice control function is turned off and the second voice control function is turned on, including: the first voice processing module of the electronic device is informed that the first scene event ends, and the first voice processing module turns off the sound reception recognition; the first voice processing module notifies the second voice processing module of the electronic device to re-enable the sound reception recognition.
[0021] In the above solution, after the first scene event ends, the first voice processing module returns the sound reception recognition channel to the second voice processing module, which will not affect the subsequent continuous sound reception recognition by the second voice processing module.
[0022] In an optional embodiment of the first aspect, the first voice processing module of the electronic device learns that the first scene event has ended, including: after the first application corresponding to the first scene event executes the corresponding service operation, the first application sends a third message to the first voice processing module through the service management module of the electronic device, and the third message is used to indicate the end of the first scene event.
[0023] In this embodiment, the third message may correspond to Fig.11 The control response shown (S1115).
[0024] In the above solution, the first application notifies the first voice processing module through the service management module that the first scene event ends, so that the first voice processing module returns the sound reception recognition channel to the second voice processing module.
[0025] In a second aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the method described in any one of the first aspects.
[0026] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspects is implemented.
[0027] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the method described in any one of the first aspects.
[0028] In a fifth aspect, an embodiment of the present application provides a chip system, which includes at least one processor and at least one interface circuit, the interface circuit is used to receive or send a signal, and the processor is used to call a computer program in a memory to execute a method as described in any one of the first aspects.
[0029] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of an interface change provided in an embodiment of the present application;
[0031] Figure 2 A schematic diagram of an interface change provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of an interface change provided in an embodiment of the present application;
[0033] Figure 4 A schematic diagram of an interface change provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of an interface provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of an interface provided in an embodiment of the present application;
[0036] Figure 7 A schematic diagram of an interface provided in an embodiment of the present application;
[0037] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0038] Fig. 9 A software structure block diagram of an electronic device provided in an embodiment of the present application;
[0039] Fig.10 A flow chart of a voice control method provided in an embodiment of the present application;
[0040] Fig.11 A flow chart of a voice control method provided in an embodiment of the present application;
[0041] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0042] Fig.13 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:
[0044] 1) Voice Assistant: This is the name of a voice control function. Users can turn on or off the voice assistant by turning on or off a preset switch on an electronic device. After the voice assistant function is turned on, the user needs to say the wake-up word first, and then say the voice command after the voice assistant of the electronic device is awakened to control the electronic device to perform the corresponding service operation.
[0045] 2) See and Speak: It is the name of another voice control function. Users can turn on or off the See and Speak function by turning on or off the preset switch on the electronic device. Unlike voice assistants, after the switch of the See and Speak function is turned on, after the fence that the See and Speak function depends on is triggered, the electronic device enters a continuous reception state (or long reception state). The microphone of the electronic device will continuously collect surrounding sounds. Users do not need to say the wake-up word, but directly say voice commands to control the electronic device to perform the corresponding service operation. After performing the service operation, the electronic device does not turn off the reception.
[0046] 3) Scenario-based commands: This is the name of another voice control function. Users can turn on or off the scenario-based command function by turning on or off the preset switch on the electronic device. Unlike the voice assistant and see-and-speak functions, after the scenario-based command function is turned on, when a specific scene (for example, an alarm rings) is triggered, the electronic device enters a short reception state, and the user directly speaks a voice command to control the electronic device to perform the corresponding service operation (for example, turn off the alarm). After the specific scene ends (for example, the alarm turns off), the electronic device turns off the reception.
[0047] 4) Fence: In the embodiment of the present application, the fence mainly refers to the fence of scene events, such as the fence of alarm scene events, the fence of phone scene events, etc. The context awareness module of the electronic device is used to create fences, register fences, and monitor fence events.
[0048] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish between the same items or similar items with substantially the same functions and effects. For example, the first voice processing module and the second voice processing module are only used to distinguish between different voice processing modules, and the order of precedence is not limited. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit them to be different.
[0049] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent a, b, c, ab, ac, bc or abc, where a, b, c can be single or multiple.
[0050] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0051] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to voice data used for analysis, storage, and display, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0052] In some embodiments, the user can turn on the voice assistant function by turning on the "voice wake-up" switch on the electronic device. For example, if the electronic device is a mobile phone, Figure 1As shown, the user clicks the icon of the "Settings" application on the mobile phone desktop. In response to the user's click operation on the icon of the "Settings" application, the mobile phone displays the "Settings" interface 101. The "Settings" interface 101 includes a "Smart Voice" option 1011, and the "Smart Voice" option 1011 is used to set the smart voice function. In one example, in response to the user's click operation on the "Smart Voice" option 1011, the mobile phone displays the "Smart Voice" interface 102, and the "Smart Voice" interface 102 includes a "Voice Wake-up" option 1021. The user can click the "Voice Wake-up" option 1021 to set options related to the voice wake-up function. In one example, in response to the user's click operation on the "Voice Wake-up" option 1021, the mobile phone displays the "Voice Wake-up" interface 103. Optionally, the "Voice Wake-up" interface 103 includes a "Voice Wake-up" switch 1031, an option 1032 for setting a wake-up word, and an option 1033 for customizing a response word. The mobile phone defaults to the "Voice Wake-up" switch 1031 being off. In one example, the user can click on the "voice wake-up" switch 1031. In response to the user's click on the "voice wake-up" switch 1031, the mobile phone displays the "voice wake-up" interface 104, and the "voice wake-up" switch 1041 of the "voice wake-up" interface 104 is turned on, and the mobile phone turns on the voice assistant function. In addition, the user can select the default wake-up word (for example, "Hello, YOYO") or a custom wake-up word in the option 1032 for setting the wake-up word, and can also click "Re-enter the wake-up word" to update the custom wake-up word. The user can also click on the option 1033 of "Customized answer language" to enter a customized question and answer language.
[0053] After the voice assistant function is turned on, the user can wake up the voice assistant of the electronic device by saying the wake-up word. After the voice assistant of the electronic device is awakened, the user can say a voice command to control the electronic device to perform the corresponding service operation. There are problems such as low wake-up efficiency, poor voice control experience caused by difficulty in wake-up, and time extension caused by dependence on the voice assistant. In scenarios where it is necessary to continuously control the mobile phone for a long time, such as scenarios where users watch videos, in order to avoid frequently waking up the voice assistant, the embodiment of the present application proposes a visible and speakable function. In order to avoid wake-up and immediately respond to the user's voice command for a certain application event, the embodiment of the present application proposes a scenario-based command function. The following is a detailed description of these two functions.
[0054] In some embodiments, the user can enable the see-and-speak function by turning on the “see-and-speak” switch on the electronic device. For example, if the electronic device is a mobile phone, Figure 2As shown, the user clicks the icon of the "Settings" application on the mobile phone desktop. In response to the user's click operation on the icon of the "Settings" application, the mobile phone displays the "Settings" interface 201. The "Settings" interface 201 includes a "Smart Assistant" option 2011, and the "Smart Assistant" option 2011 is used to set related functions of smart services and smart interactions. In one example, in response to the user's click operation on the "Smart Assistant" option 2011, the mobile phone displays the "Smart Assistant" interface 202, and the "Smart Assistant" interface 202 includes a "Voice Control" option 2021. The user can click the "Voice Control" option 2021 to set options related to the voice control function. In one example, in response to the user's click operation on the "Voice Control" option 2021, the mobile phone displays the "Voice Control" interface 203, and the "Voice Control" interface 203 includes a "See and Say" option 2031. The user can click the "See and Say" option 2031 to set options related to the See and Say function. In one example, in response to a user clicking on the "Speak as Visible" option 2031, the mobile phone displays a "Speak as Visible" interface 204. Optionally, the "Speak as Visible" interface 204 includes a prompt page 2041, and the prompt page 2041 includes prompt information for prompting the user how to use the "Speak as Visible" function. The "Speak as Visible" interface 204 also includes an "Allow" button 2042 and a "Reject" button 2043. The "Allow" button 2042 is used to confirm the activation of the "Speak as Visible" function, and the "Reject" button 2043 is used to cancel the activation of the "Speak as Visible" function. In one example, in response to a user clicking on the "Allow" button 2042, the mobile phone activates the "Speak as Visible" function.
[0055] In one example, after the switch of the "see and speak" function is turned on, the mobile phone displays a first prompt icon, and the first prompt icon is used to prompt that the switch of the "see and speak" function is turned on. Figure 2 The status bar of the “see and say” interface 205 shown displays a prompt icon 2051 .
[0056] In one example, after the switch of the see-and-speak function is turned on, after the fence that the see-and-speak function depends on is triggered, such as when the fence of playing a video is triggered, the electronic device enters a continuous sound receiving state, and a second prompt icon is displayed on the display interface of the electronic device. The second prompt icon is used to prompt that the microphone is turned on, so as to avoid the user's privacy being leaked. Exemplary, Figure 3 The status bar of the interface 301 shown displays a prompt icon 3011 , which indicates that the microphone is turned on.
[0057] For example, Figure 3As shown, after the switch of the "see and say" function is turned on, the mobile phone displays the short video playback interface 301 of the short video application. The short video playback interface 301 is playing a short video. The user speaks the voice command "pause", and the mobile phone executes the command corresponding to the voice "pause" to pause the playback of the short video. In one example, a "play" button 3021 is displayed on the short video playback interface 302 to prompt the user that the short video has been paused. After that, the user can click the "play" button 3021, or say the voice "play", and the mobile phone continues to play the short video. During the above process, the mobile phone keeps receiving the sound, and the prompt icon 3011 in the status bar will disappear only after the mobile phone turns off the sound.
[0058] An embodiment of the present application provides a voice control method. After the switch of the See-and-Speak function is turned on and the fence that the See-and-Speak function depends on is triggered, the electronic device enters a continuous sound receiving state, and the microphone of the electronic device continuously collects surrounding sounds. The user does not need to say a wake-up word and can control the electronic device to perform corresponding service operations through voice commands, thereby improving the voice control efficiency of the electronic device.
[0059] In some embodiments, the user can enable the scenario-based instruction function by turning on the "scenario-based instruction" switch on the electronic device. For example, the electronic device is a mobile phone. Figure 2 As shown, the "voice control" interface 203 may also include a "scenario-based instruction" switch 2032, and the mobile phone defaults to the "scenario-based instruction" switch 2032 being in an off state. In one example, the user may click the "scenario-based instruction" switch 2032, and in response to the user's click operation on the "scenario-based instruction" switch 2032, the mobile phone displays the "voice control" interface 206, and the "scenario-based instruction" switch 2061 of the "voice control" interface 206 is in an on state, and the mobile phone turns on the scenario-based instruction function.
[0060] After the scenario-based command function is turned on, when an event in a specific scenario is triggered, the electronic device enters a short reception state, and the electronic device will turn off the reception after the event in the specific scenario ends. For example, when the alarm rings or the phone rings, the electronic device enters a short reception state, and the microphone of the electronic device will turn off the reception after the alarm turns off or the phone is answered.
[0061] In one example, a user can manage scenes on an electronic device. For example, if the electronic device is a mobile phone, Figure 4As shown, the "voice control" interface 401 includes a "scenario-based instruction" option 4011, and the "scenario-based instruction" option 4011 is used to set the related functions of the scenario-based instruction. In one example, in response to the user's click operation on the "scenario-based instruction" option 4011, the mobile phone displays the "scenario-based instruction" interface 402, and the "scenario-based instruction" interface 402 includes a voice control switch 4022 of the alarm clock application and a voice control switch 4023 of the phone application. Taking the alarm clock scene as an example, the mobile phone defaults to the voice control switch 4022 of the alarm clock application as off. In response to the user's click operation on the voice control switch 4022 of the alarm clock application, the mobile phone displays the "scenario-based instruction" interface 404, and the voice control switch 4041 of the alarm clock application in the "scenario-based instruction" interface 404 is on, and the mobile phone turns on the voice instruction function of the alarm clock scene. Optionally, the "scenario-based instruction" interface 402 also includes an icon 4021, and the user can click the icon 4021 to view the method of using the voice control function in the alarm clock scene. In one example, in response to the user clicking on icon 4021, the mobile phone displays a "scenario-based instruction" interface 403, and the "scenario-based instruction" interface 403 displays a prompt box 4031, which includes prompt information, and the prompt information is used to prompt the user how to use the voice control function in the alarm clock scenario. In addition, the user clicks the "got it" control 4032 in the prompt box 4031, and the mobile phone closes the prompt box 4031. The activation of the voice control function in the phone scenario is similar to the activation of the voice control function in the alarm clock scenario. Please refer to the relevant description of the alarm clock scenario, which will not be expanded here.
[0062] Optionally, switches for more applications may be expanded in the "scenario-based instructions" to enable voice command functions for scenarios corresponding to more applications, which is not limited to the embodiments of the present application.
[0063] After the switch of the scenario-based command function is turned on, when an event in a specific scenario is triggered, the electronic device turns on the sound reception. In response to receiving the voice input by the user, the electronic device recognizes the voice and executes the command corresponding to the user's voice. After the command is executed, the sound reception is turned off.
[0064] For example, Figure 5 As shown, after the switch of the scenario-based command function is turned on, when the alarm rings, the mobile phone displays a lock screen interface 501, and a prompt message 5011 is displayed on the lock screen interface 501. The user can say the voice command "turn off the alarm" according to the prompt message, and the mobile phone executes the operation of turning off the alarm.
[0065] For example, Figure 6As shown, after the switch of the scenario-based command function is turned on, when the alarm rings, the mobile phone displays the main interface 601, a prompt window 6012 pops up above the main interface 601, and a prompt message 6011 is displayed below the prompt window 6012. The user can say the voice command "turn off the alarm" according to the prompt message, and the mobile phone will execute the operation of turning off the alarm.
[0066] For example, Figure 7 As shown, after the switch of the scenario-based command function is turned on, the mobile phone displays a short video playback interface 701, and the short video playback interface 701 is playing a short video. When the alarm rings, the mobile phone pauses playing the short video. In one example, a "play" button 7013 is displayed on the short video playback interface 701 to prompt the user that the short video has been paused. At the same time, a prompt window 7012 will pop up above the short video playback interface 701, and a prompt message 7011 will be displayed below the prompt window 7012. The user can say the voice command "turn off the alarm" according to the prompt message, and the mobile phone will execute the operation of turning off the alarm.
[0067] In one example, after the switch of the scenario-based command function is turned on, when an event in a specific scenario is triggered, the electronic device enters a short receiving state, and a third prompt icon is displayed on the display interface of the electronic device. The third prompt icon is used to prompt that the microphone is turned on and the electronic device is in the receiving state, thereby preventing the user's privacy from being leaked.
[0068] For example, after the scene-based command function is turned on, when the alarm rings, the phone displays Figure 5 In the lock screen interface 501 shown in the figure, the status bar of the lock screen interface 501 displays a prompt icon 5012, which is used to prompt that the microphone is turned on. The user speaks a voice command such as "turn off the alarm clock", and after the mobile phone executes the operation of turning off the alarm clock, the prompt icon 5012 is no longer displayed, and the mobile phone turns off the radio. For another example, after the switch of the scene-based command function is turned on, when the alarm clock rings, the mobile phone displays Figure 6 The main interface 601 shown in the figure has a status bar 6013, and the prompt icon 6013 is used to prompt that the microphone is turned on. For another example, after the scene-based command function is turned on, when the alarm rings, the mobile phone displays Figure 7 The short video playback interface 701 shown, the status bar of the short video playback interface 701 displays 7014, and the prompt icon 7014 is used to prompt that the microphone is turned on.
[0069] An embodiment of the present application provides a voice control method. After the switch of the scenario-based command function is turned on, the electronic device subscribes to the event fence of the specific scenario supported by the scenario-based command function. When a specific scenario (for example, the alarm rings) is triggered, the electronic device enters a short radio state, and the microphone of the electronic device continuously collects surrounding sounds for a period of time. At this time, the user does not need to say the wake-up word, and can control the electronic device to perform service operations for specific scenarios through voice commands, which can improve the efficiency of voice control. After the electronic device performs a service operation (for example, turning off the alarm or delaying the alarm), turn off the radio, which can save device power consumption.
[0070] It should be noted that the voice control solution provided in the embodiment of the present application can be executed on the terminal side (electronic device side), and the terminal side does not need to be connected to the network side, that is, the terminal side can execute the above-mentioned voice control solution in an offline state.
[0071] The voice control method provided in the embodiment of the present application can be applied to any electronic device with a voice control function, and the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile Internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a smart screen, an artificial intelligence (AI) speaker, a headset, a terminal in industrial control, a terminal in self-driving, a terminal in remote medical surgery, a terminal in a smart grid, a terminal in transportation safety, a terminal in a smart city, a terminal in a smart home, a personal digital assistant (PDA), etc., and the embodiment of the present application does not make any limitation to this.
[0072] For example, Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 8As shown, 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 speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. It can be understood that the structure illustrated in this embodiment 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 illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0073] 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 video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, a display processing unit (displayprocess unit, DPU), and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110. Among them, 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 opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. The memory may save instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the electronic device 100 system.
[0074] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. Among them, the USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect headphones and play audio through the headphones.
[0075] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0076] 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 a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.
[0077] 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, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0078] The wireless communication function of the electronic device 100 can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the 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 the antenna. For example, antenna 1 can be reused as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0079] 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, etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process 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. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0080] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0081] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (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 the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0082] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, GNSS, WLAN, NFC, FM, and / or IR technology. The above-mentioned GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0083] The electronic device 100 can realize the display function through the GPU, the display screen 194, and the 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, which execute instructions to generate or change display information.
[0084] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), 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.
[0085] The electronic device 100 can implement a shooting function through an ISP, one or more cameras 193, a video codec, a GPU, one or more display screens 194, and an application processor.
[0086] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0087] 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. For example, data files such as music, photos, and videos are stored in the external memory card.
[0088] The internal memory 121 can be used to store one or more computer programs, which include instructions. The processor 110 can enable the electronic device 100 to perform various functional applications and data processing by running the above 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; the program storage area can also store one or more applications (such as a gallery, contacts, etc.). The data storage area can store data (such as photos, contacts, etc.) created during the use of the electronic device 100. 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. In some embodiments, the processor 110 can enable the electronic device 100 to perform various functional applications and data processing by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor 110.
[0089] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0090] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input 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.
[0091] 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 listen to a hands-free call through the speaker 170A.
[0092] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0093] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, 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 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0094] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130, a 3.5 mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0095] The sensor 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
[0096] 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 inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0097] 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.
[0098] The software system of the electronic device 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 as an example to illustrate the software structure of the electronic device. Fig. 9 A software structure block diagram of an electronic device provided in an embodiment of the present application. The layered architecture divides the software system of the electronic device into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided into four layers, namely, the application layer (applications), the application framework layer (application framework), the Android runtime (Android runtime) and the system library, and the kernel layer (kernel).
[0099] The application layer may include a series of application packages. In the embodiment of the present application, Fig. 9 As shown, the application layer includes applications such as alarm clock, camera, phone, video, music, gallery, calendar, map, navigation, Bluetooth, short message, etc. The application can be a system application or a third-party application.
[0100] The application framework layer provides an application programming interface (API) and a programming framework for the application programs in the application layer. Fig. 9 As shown, the application framework layer includes a business processing module, a context awareness module, a service management module, a speech processing module, an echo cancellation module, and a speech recognition module.
[0101] The service processing module can make multi-modal decisions based on the device status and scene event data, and determine whether to pull up the voice processing module based on the decision results, where the device status includes but is not limited to the device display status, motion status, folding screen status, application running status, etc. In other embodiments, the service processing module can also pull up gesture services or eye movement services based on the decision results.
[0102] The context awareness module can form event fences based on the received events.
[0103] The service management module can perform corresponding service operations on the application according to the instructions transmitted by the voice processing module.
[0104] The speech processing module includes a first speech processing module and a second speech processing module.
[0105] The first voice processing module is used for voice control in the short voice reception state. The first voice processing module can also be called a scenario-based command voice processing module. After the scenario-based command function is turned on, when an event in a specific scene is triggered, the electronic device pulls up the first voice processing module, the first voice processing module performs short voice reception recognition, and performs voice control. After the event in the specific scene ends, the first voice processing module stops voice reception recognition.
[0106] The second voice processing module is used for voice control in the long sound receiving state. The second voice processing module can also be called the visible and speak voice processing module. After the switch of the visible and speak function is turned on, after the fence that the visible and speak function depends on is triggered, the electronic device pulls up the second voice processing module, and the second voice processing module performs continuous sound receiving recognition and voice control. If the visible and speak function is not turned off, the second voice processing module continues to perform sound receiving recognition.
[0107] The echo cancellation module is used to eliminate noise, echo, etc. in the audio signal to improve the audio clarity.
[0108] The voice recognition module provides voice recognition capability for recognizing the user's voice commands. In some embodiments, the voice recognition module may also be referred to as a smart capability module.
[0109] In some embodiments, the application framework layer may include an input manager service (IMS). Of course, the application framework layer may also include a display policy service, a power management service (PMS), a display management service (DMS), an activity manager, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc., which are not limited in the embodiments of the present application.
[0110] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0111] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0112] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0113] The system library can include multiple functional modules. For example: state monitoring service, surface manager, media library, 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc. The state monitoring service is used to determine the specific orientation of the mobile phone, the physical state of the flexible screen, etc. according to the monitoring data reported by the kernel layer. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library 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. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing.
[0114] The kernel layer is a layer between hardware and software. The kernel layer at least includes display driver, camera driver, audio driver, sensor driver, etc., and the present application embodiment does not impose any restrictions on this.
[0115] The following specific embodiments are used to describe the technical solution of the present application in detail. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0116] For example, Fig.10 A flow chart of a voice control method provided in an embodiment of the present application. Fig.10 As shown, the voice control method can be applied to any electronic device with a voice control function, and the method includes:
[0117] S1001. In response to the user turning on the first voice control switch, the business processing module subscribes to the fence of the first scene event from the scenario awareness module.
[0118] The first voice control switch is the control switch of the first voice processing module. The first voice processing module is used for voice control in the short reception state. The first voice processing module can also be called a scenario-based command voice processing module. Turning on the first voice control switch does not mean directly pulling up the first voice processing module. When the first scenario event is triggered, the electronic device pulls up the first voice processing module, and the first voice processing module performs reception recognition and voice control. Among them, the first scenario event includes an alarm scenario event (alarm ringing), a phone scenario event (phone ringing), etc.
[0119] In an optional embodiment, the first voice control switch is Figure 2 The “scenario-based instruction” switch 2061 in the “voice control” interface 206 shown, in response to the user turning on the “scenario-based instruction” switch 2061, the business processing module subscribes to the fences of the alarm scenario event and the phone scenario event to the context awareness module.
[0120] In an optional embodiment, the first voice control switch is Figure 4 The voice control switch 4022 of the alarm application in the "scenario-based instruction" interface 402 is shown. In response to the user turning on the voice control switch 4022 of the alarm application, the business processing module subscribes to the fence of the alarm scenario event to the scenario perception module.
[0121] In an optional embodiment, the first voice control switch is Figure 4 The voice control switch 4023 of the phone application in the "scenario-based instruction" interface 402 is shown. In response to the user turning on the voice control switch 4023 of the phone application, the business processing module subscribes to the fence of the phone scenario event from the context awareness module.
[0122] The business processing module subscribes to the fence of the first scene event from the context perception module, and the context perception module registers the fence of the first scene event, such as registering the fence of the alarm scene event and registering the fence of the phone scene event. In some embodiments, the context perception module can also register the motion state fence of the electronic device, the screen folding state fence, etc.
[0123] S1002. When the first scenario event is initiated, the first application sends the first scenario event data to the business processing module.
[0124] In an optional embodiment, the first scene event data includes an identifier of the first application and an identifier of the first scene event.
[0125] Exemplarily, the first scene event is an alarm scene event, such as an alarm ringing, and the first application is an alarm application. Exemplarily, when the alarm rings, the alarm application sends alarm scene event data to the service processing module, and the alarm scene event data includes an identifier of the alarm application and an identifier of the alarm ringing event.
[0126] Exemplarily, the first scenario event is a telephone scenario event, such as a phone ringing, and the first application is a phone application. Exemplarily, when the phone rings, the phone application sends phone scenario event data to the service processing module, and the phone scenario event data includes an identifier of the phone application and an identifier of the phone ringing event.
[0127] S1003. The business processing module performs scene event verification based on the first scene event data.
[0128] After the scene event verification passes, execute S1004, otherwise, end this process.
[0129] In an optional embodiment, the scene event verification includes format verification of the first scene event data, etc. If the format of the first scene event data meets the preset format requirement, S1004 is executed; or if the format of the first scene event data does not meet the preset format requirement, this process ends.
[0130] S1004. The business processing module sends the first scene event data to the situation awareness module.
[0131] The business processing module stores preset data format requirements for different scene event data. The business processing module verifies the data format of the scene event data based on the preset data format requirements to ensure that the transmitted scene event data meets the data format requirements.
[0132] In an optional embodiment, the first scene event data received by the business processing module is alarm scene event data. By querying the preset data format of the alarm scene event, it is checked whether the alarm scene event data meets the preset data format of the alarm scene event. If so, the business processing module sends the alarm scene event data to the scenario perception module.
[0133] In an optional embodiment, the first scene event data received by the business processing module is telephone scene event data. By querying the preset data format of the telephone scene event, it is verified whether the telephone scene event data meets the preset data format of the telephone scene event. If so, the business processing module sends the telephone scene event data to the scenario perception module.
[0134] S1005. The situational awareness module determines whether to trigger the fence of the first scene event based on the first scene event data.
[0135] If the situational awareness module determines that the fence triggers the first scene event, S1006 is executed, otherwise the process ends.
[0136] S1006. The context awareness module sends a first subscription response to the business processing module.
[0137] The context perception module receives the first scenario event data, determines whether the business processing module has subscribed to the fence of the first scenario event, and if it is determined that the business processing module has subscribed to the fence of the first scenario event, the context perception module determines the fence that triggers the first scenario event, and the context perception module sends a first subscription response to the business processing module, and the first subscription response is used to notify the business processing module that the first scenario event is started. Optionally, the first subscription response includes the first scenario event data, and the first scenario event data may include an identifier of the first application and an identifier of the first scenario event.
[0138] In an optional embodiment, the first scene event data received by the scenario perception module is alarm scene event data, and the scenario perception module determines whether the business processing module has subscribed to the fence of the alarm scene event. If it is determined that the business processing module has subscribed to the fence of the alarm scene event, the scenario perception module sends a first subscription response to the business processing module, and the first subscription response is used to notify the business processing module that the alarm scene event is started, wherein the first subscription response may include an identifier of the alarm application and an identifier of the alarm ringing event.
[0139] In an optional embodiment, the first scenario event data received by the scenario perception module is telephone scenario event data, and the scenario perception module determines whether the business processing module has subscribed to the fence of the telephone scenario event. If it is determined that the business processing module has subscribed to the fence of the telephone scenario event, the scenario perception module sends a first subscription response to the business processing module, and the first subscription response is used to notify the business processing module that the telephone scenario event is initiated, wherein the first subscription response may include an identifier of the telephone application and an identifier of the telephone ringing event.
[0140] S1007. The business processing module makes a multi-mode decision to determine whether to pull up the first voice processing module.
[0141] If the service processing module determines to pull up the first voice processing module, S1008 is executed; otherwise, this process ends.
[0142] In an optional embodiment, the business processing module can make a multi-mode decision based on the first scene event data and the mobile phone status, and determine whether to pull up the first voice processing module based on the decision result. The first voice processing module is used for voice control in a short reception state, or in other words, the first voice processing module performs reception recognition in the time period from the start to the end of the first scene event. The first voice processing module can also be called a scenario-based command voice processing module. The mobile phone status includes but is not limited to the mobile phone display status, motion status, folding screen status, application running status, etc.
[0143] In one example, the correspondence between the scene events and the voice processing modules is pre-stored in the business processing module. Exemplarily, the correspondence between the scene events and the voice processing modules is shown in Table 1. For example, the voice processing module corresponding to the alarm ringing and the phone ringing is the first voice processing module. The business processing module can determine the first scene event according to the identifier of the first scene event in the first scene event data, and determine to pull up the first voice processing module corresponding to the first scene event by querying the correspondence between the scene event and the voice processing module.
[0144] Table 1
[0145]
[0146]
[0147] In another example, the correspondence between the application and the voice processing module is pre-stored in the business processing module. Exemplarily, the correspondence between the application and the voice processing module is shown in Table 2. For example, the voice processing module corresponding to the alarm clock application and the telephone application is the first voice processing module. The business processing module can determine the application name according to the identifier of the first application in the first scene event data, and determine to pull up the first voice processing module corresponding to the first scene event by querying the correspondence between the application and the voice processing module.
[0148] Table 2
[0149] Application Name Speech Processing Module Alarm Clock App The first speech processing module Phone App The first speech processing module
[0150] It should be noted that the above Tables 1 and 2 are only exemplary of the correspondence between scene events / applications and voice processing modules. In other embodiments, the business processing module may obtain the correspondence between scene events / applications and voice processing modules in other ways. For example, the correspondence between scene events / applications and voice processing modules may not be in the form of a configuration table. For example, the correspondence between scene events / applications and voice processing modules may be different from the above examples.
[0151] Exemplarily, the first scene event is an alarm scene event, such as an alarm ringing. When the alarm rings, the alarm application sends the alarm scene event data to the business processing module by calling the software development kit (SDK). The business processing module verifies the alarm scene event data. If the verification passes, the business processing module sends the alarm scene event data to the scenario perception module. The scenario perception module determines whether the business processing module subscribes to the fence of the alarm scene event based on the alarm scene event data. The scenario perception module determines that the business processing module has subscribed to the fence of the alarm scene event based on the alarm scene event data, and the scenario perception module sends a first subscription response to the business processing module, and the first subscription response is used to notify the business processing module that the alarm scene event is started. Optionally, the first subscription response includes an alarm application identifier and an alarm scene event identifier. The business processing module determines to pull up the first voice processing module based on the alarm application identifier / alarm scene event identifier in the first subscription response.
[0152] Exemplarily, the first scene event is a telephone scene event, such as a ringing phone. When the phone rings, the telephone application sends the telephone scene event data to the business processing module by calling the SDK. The business processing module verifies the telephone scene event data. If the verification passes, the business processing module sends the telephone scene event data to the scenario perception module. The scenario perception module determines whether the business processing module subscribes to the fence of the telephone scene event based on the telephone scene event data. The scenario perception module determines that the business processing module has subscribed to the fence of the telephone scene event based on the telephone scene event data, and the scenario perception module sends a first subscription response to the business processing module, and the first subscription response is used to notify the business processing module that the telephone scene event is started. Optionally, the first subscription response includes an identifier of the telephone application and an identifier of the telephone scene event. The business processing module determines to pull up the first voice processing module based on the identifier of the telephone application / identifier of the telephone scene event in the first subscription response.
[0153] S1008. The service processing module sends a first notification message to the first voice processing module, where the first notification message is used to notify the first voice processing module of starting up.
[0154] Among them, the first notification message may include first scene event data.
[0155] S1009. The first voice processing module starts voice recognition according to the first notification message.
[0156] S1010. When a preset instruction word of the first scene event is recognized, the first voice processing module sends a control message to the service management module, where the control message includes an identifier of the first application and a control instruction corresponding to the preset instruction word.
[0157] S1011. The service management module sends a control instruction to the first application according to the control message.
[0158] S1012. The first application executes corresponding service operations according to the control instruction.
[0159] In an optional embodiment, the first voice processing module acquires the voice input by the user by calling the sound receiving module, and acquires the voice recognition text by calling the voice recognition module to perform semantic understanding and recognition on the voice input by the user. Optionally, the first voice processing module acquires the user voice processed by the echo cancellation module by calling the sound receiving module and the echo cancellation module to improve the voice clarity.
[0160] In an optional embodiment, the first voice processing module obtains the preset instruction words of the first scene event based on the first scene event data in the first notification message, and compares the voice recognition text with the preset instruction words of the first scene event. If the voice recognition text matches any one of the preset instruction words of the first scene event, the first voice processing module sends a control instruction to the first application through the service management module, so that the first application performs corresponding service operations according to the control instruction.
[0161] It should be noted that the matching of the speech recognition text and the preset instruction word of the first scene event can be that the two have the same semantics or are close in semantics, or the speech recognition text contains the preset instruction word of the first scene event, etc., and it is not necessary for the speech recognition text to be exactly the same as the preset instruction word of the first scene event. Figure 5 In the scenario of the alarm ringing, the user inputs the voice "turn off the alarm", and the preset instruction words for this scenario include "turn off the alarm". "Turn off the alarm" and "turn off the alarm" have the same semantics, that is, the two match.
[0162] In one example, the first voice processing module pre-stores the correspondence between scene events and preset command words, and the first voice processing module can periodically obtain the correspondence between scene events and preset command words from the cloud server. Exemplarily, the correspondence between scene events and preset command words is shown in Table 3.
[0163] Table 3
[0164] Scene Events Preset command words Alarm Clock Turn off alarm, snooze alarm, etc. Phone Ringing Answer the call, hang up, mute, etc.
[0165] In another example, the first voice processing module pre-stores the correspondence between the application and the preset command word, and the first voice processing module can periodically obtain the correspondence between the application and the preset command word from the cloud server. Exemplarily, the correspondence between the application and the preset command word is shown in Table 4.
[0166] Table 4
[0167] Application Name Preset command words Alarm Clock App Turn off alarm, snooze alarm, etc. Phone App Answer the call, hang up, mute, etc.
[0168] In some embodiments, after the first application performs a corresponding service operation according to the control instruction, the voice control method may further include:
[0169] S1013. The first application sends a control response to the service management module, where the control response is used to indicate that the service operation of the first application has been completed, wherein the control response includes an identifier of the first application.
[0170] S1014. The service management module sends a control response to the first voice processing module according to the control response.
[0171] The service management module determines to send a control response to the first voice processing module according to the identifier of the first application in the control response.
[0172] S1015. After receiving the control response, the first voice processing module turns off the voice recognition.
[0173] For example, the first scene event is an alarm scene event. After the alarm application is closed or the alarm is delayed, the first voice processing module turns off the sound reception recognition to save device power consumption. If the alarm is delayed, when the alarm rings again, S1002 to S1015 are re-executed.
[0174] For example, the first scenario event is a phone scenario event, and after the phone application hangs up the call, the first voice processing module turns off the voice recognition to save device power consumption. If the phone rings again, S1002 to S1015 are executed again.
[0175] The above embodiment shows a voice control method, in response to the user's operation of turning on the first voice control switch, the business processing module subscribes to the fence of the first scene event to the scenario perception module; when the first scene event is initiated, the business processing module first verifies the first scene event data, and after the verification is passed, the business processing module sends the first scene event data to the scenario perception module, and the scenario perception module determines whether to trigger the fence of the first scene event; after the fence of the first scene event is triggered, the business processing module decides to pull up the first voice processing module, and the first voice processing module starts the sound reception recognition, which can realize instant response to the user's voice command when the first scene event occurs. The user does not need to wake up the device first and then speak the voice command, thereby improving the voice control efficiency and the user's voice control experience.
[0176] For example, Fig.11 A flow chart of a voice control method provided in an embodiment of the present application. Fig.11 As shown, the voice control method can be applied to any electronic device with a voice control function, and the method includes:
[0177] S1101. In response to the user turning on the second voice control switch, the business processing module subscribes to the fence on which the second voice processing module depends from the context awareness module.
[0178] S1102. When the fence that the second voice processing module depends on is triggered, the context awareness module sends a second subscription response to the service processing module.
[0179] S1103. The business processing module makes a multi-mode decision to determine whether to pull up the second voice processing module.
[0180] If the service processing module determines to pull up the second voice processing module, S1104 is executed; otherwise, this process ends.
[0181] S1104. The service processing module sends a second notification message to the second voice processing module, where the second notification message is used to notify the second voice processing module of starting up.
[0182] S1105. The second voice processing module starts voice recognition according to the second notification message.
[0183] The second voice control switch is a control switch of the second voice processing module. The second voice processing module is used for voice control in a long voice reception state, or the second voice processing module continuously performs voice reception recognition. The second voice processing module can also be called a visible and audible voice processing module.
[0184] It should be noted that turning on the second voice control switch does not mean that the second voice processing module directly turns on the sound reception recognition. Similar to the conditions for turning on the sound reception recognition of the first voice processing module, after the user turns on the second voice control switch, the business processing module needs to first subscribe to the fence that the second voice processing module depends on to the scenario perception module. At this time, the second voice processing module is not turned on. After the scenario perception module informs the business processing module that the fence that the second voice processing module depends on is triggered, the business processing module makes a multi-mode decision and determines whether to pull up the second voice processing module based on the decision result.
[0185] Among them, the fence that the second voice processing module depends on may include a fence of the mobile phone's motion state, a fence of the application's running state, etc., for example, a fence of the mobile phone in a stationary state, a fence of the mobile phone playing a video (or opening a video application), etc.
[0186] Exemplarily, after the second voice control switch is turned on, when the situational awareness module determines that the motion state of the mobile phone is stationary and the mobile phone is playing a video, the situational awareness module notifies the business processing module of the fence trigger on which the second voice processing module depends. After the business processing module makes a multi-mode decision, it determines to pull up the second voice processing module, and the second voice processing module continues to perform sound reception recognition. In this way, the user can directly say "pause playback" or "play next episode" while watching the video. After the second voice processing module recognizes the voice, it controls the video application to execute the voice "pause playback" or "play next episode" corresponding instructions.
[0187] Exemplarily, after the second voice control switch is turned on, when the situational awareness module determines that the mobile phone has turned on the e-book application, the situational awareness module notifies the business processing module to turn on the fence trigger of the e-book application. After the business processing module makes a multi-modal decision, it determines to pull up the second voice processing module, and the second voice processing module continues to perform sound recognition. In this way, the user can directly say "return to the desktop" when browsing the e-book. After the second voice processing module recognizes the voice, it controls the execution of the corresponding instruction of "return to the desktop" and displays the desktop interface.
[0188] Exemplarily, after the second voice control switch is turned on, when the situational awareness module determines that the mobile phone has opened a pop-up application (or a floating window application), the situational awareness module notifies the business processing module to open the fence trigger of the pop-up application. After the business processing module makes a multi-mode decision, it determines to pull up the second voice processing module, and the second voice processing module continues to perform sound recognition. In this way, the user can directly say "close", "allow", "confirm", "reject", "I understand", etc. when any pop-up window is displayed to control the execution of the corresponding instructions of the pop-up window.
[0189] Based on the above examples, it should be noted that the scenarios corresponding to the second voice processing module include but are not limited to audio and video scenarios, e-book scenarios, permission pop-up scenarios, etc. In contrast, the scenarios corresponding to the first voice processing module in the above embodiment include alarm clock scenarios and telephone scenarios, and the scenarios corresponding to the first voice processing module and the second voice processing module are different.
[0190] The second voice processing module starts the sound reception recognition according to the second notification message, that is, the second voice processing module enters the continuous sound reception state, at which time a second prompt icon can be displayed on the display interface of the device. The second prompt icon can refer to Figure 3 The prompt icon 3011 is shown.
[0191] There is a possible situation where both the first voice control switch and the second voice control switch are turned on, for example, Figure 2In the interface 203 shown, the switches of the visible-to-speak function and the scenario-based instruction function are both turned on. If the scene corresponding to the second voice processing module (visible-to-speak voice processing module) is triggered, such as video playback, the second voice processing module can call the sound receiving module and the voice recognition module to perform continuous sound receiving recognition. At this time, if the scene corresponding to the first voice processing module (scenario-based instruction voice processing module) is triggered, such as the alarm ringing, the first voice processing module also needs to call the sound receiving module and the voice recognition module to perform sound receiving recognition, and there is a conflict in the sound receiving recognition function.
[0192] For the case where both the first voice control switch and the second voice control switch are turned on, for example, Figure 2 In the interface 203 shown, the switches of the visible and speakable function and the scenario-based instruction function are both turned on. The embodiment of the present application proposes a voice control method. When the scene corresponding to the first voice processing module (scenario-based instruction voice processing module) is triggered, such as the ringing of an alarm clock, the first voice processing module can seize the sound reception recognition channel of the second voice processing module (visible and speakable voice processing module) to perform voice control. Moreover, after the scene corresponding to the first voice processing module ends, such as the alarm clock is turned off, the sound reception recognition channel can be returned to the second voice processing module, which does not affect the subsequent sound reception recognition of the second voice processing module, thereby solving the problem of conflict in sound reception recognition.
[0193] For example, when the user turns on the first voice control switch and the second voice control switch, the second voice processing module performs sound recognition and voice control while the user is watching a video. The user can directly say "pause playback" or "play the next episode", etc., and the second voice processing module controls the video application to execute the corresponding voice commands of "pause playback" or "play the next episode". When the user is watching a video, the alarm rings, and the first voice processing module can seize the sound recognition channel of the second voice processing module to perform sound recognition and voice control. After the alarm is turned off, the first voice processing module returns the sound recognition channel to the second voice processing module, which does not affect the subsequent sound recognition of the second voice processing module, thereby solving the problem of conflict in sound recognition.
[0194] There is a possible situation where the first voice control switch is not turned on and the second voice control switch is turned on, e.g. Figure 2In the interface 203 shown, the switch of the scenario-based instruction function is not turned on, and the switch of the visible and speakable function is turned on. The second voice processing module (scenario-based instruction voice processing module) can call the sound receiving module and the voice recognition module to perform sound receiving recognition. If the scene corresponding to the first voice processing module (visible and speakable voice processing module) is triggered, such as the alarm ringing, since the business processing module has not subscribed to the fence of the scene corresponding to the first voice processing module to the context perception module, the business processing module cannot pull up the first voice processing module for sound receiving recognition, and the user cannot directly control the first application (for example, the alarm application) through voice to perform corresponding service operations (for example, turning off or delaying the alarm).
[0195] For the case where the first voice control switch is not turned on and the second voice control switch is turned on, for example Figure 2 In the interface 203 shown, the switch of the scenario-based instruction function is not turned on, and the switch of the visible and speakable function is turned on. The embodiment of the present application proposes a voice control method. After the second voice control switch is turned on, the business processing module can pull up the second voice processing module (visible and speakable voice processing module), and the second voice processing module notifies the first voice processing module (scenario-based instruction voice processing module) to check the switch state of the first voice control switch (the switch of the scenario-based instruction function). If the first voice control switch is not turned on, the first voice processing module subscribes to the fence of the first scenario event (such as the alarm ringing) to the scenario perception module. In this way, when the first scenario event is triggered, the first voice processing module can receive a subscription response from the scenario perception module, and based on the subscription response, seize the sound reception recognition channel of the second voice processing module to perform voice control, avoiding the problem of being unable to respond to the user's voice command immediately due to the user not turning on the first voice control switch, and can improve the user's voice control experience. In addition, when the scene corresponding to the first voice processing module ends, the sound reception recognition channel can be returned to the second voice processing module, which does not affect the subsequent sound reception recognition function of the second voice processing module, and solves the problem of conflict in sound reception recognition. In this embodiment, the priority of the first voice processing module to seize the sound reception recognition channel is higher than that of the second voice processing module, that is, the priority of the scenario-based command voice processing module is higher than that of the visible and audible voice processing module.
[0196] Continue to refer to the attached Fig.11 In some embodiments, the voice control method may further include:
[0197] S1106. The second voice processing module sends a third notification message to the first voice processing module, where the third notification message is used to notify the first voice processing module to check the switch state of the first voice control switch.
[0198] S1107. The first voice processing module checks the switch state of the first voice control switch according to the third notification message.
[0199] The switch state of the first voice control switch includes on or off.
[0200] In one example, the switch state of the first voice control switch is not turned on, and S1108 is executed.
[0201] In one example, the switch state of the first voice control switch is on, and the process can jump to S1109. After the first voice control switch is turned on, the process can be executed. Fig.10 S1001 of the illustrated embodiment.
[0202] S1108. The first voice processing module subscribes to the fence of the first scene event from the context awareness module.
[0203] and Fig.10 The difference between S1001 of the illustrated embodiment is that, when the first voice control switch is not turned on and the second voice control switch is turned on, the first voice processing module can check the switch state of the first voice control switch based on the notification of the second voice processing module, and when the first voice control switch is not turned on, directly subscribe to the fence of the first scene event to the scenario perception module, rather than subscribing to the scenario perception module through the business processing module, so as to complete the fence subscription of the first scene event in advance.
[0204] S1109. When the first scene event is initiated, the first application sends the first scene event data to the context awareness module.
[0205] In an optional embodiment, the first scene event data includes an identifier of the first application and an identifier of the first scene event.
[0206] S1110. The context awareness module sends a second subscription response to the first voice processing module.
[0207] The context awareness module receives the first scene event data, determines that the first voice processing module has subscribed to the fence of the first scene event, and sends a second subscription response to the first voice processing module. Optionally, the second subscription response includes the first scene event data, and the first scene event data may include an identifier of the first application and an identifier of the first scene event.
[0208] S1111. The first voice processing module notifies the second voice processing module to suspend voice reception and recognition.
[0209] It should be noted that the first voice processing module notifies the second voice processing module to suspend the sound reception recognition, which does not affect the switch state of the second voice control switch, that is, the second voice control switch remains turned on, so the prompt icon (such as Figure 2 The icon 2051) shown will not disappear.
[0210] S1112. The first voice processing module starts voice recognition.
[0211] The first voice processing module performs voice recognition by calling the voice receiving module and the voice recognition module.
[0212] After the first voice processing module notifies the second voice processing module to suspend the sound reception recognition, the sound reception recognition is started, so that the first voice processing module seizes the sound reception recognition channel of the second voice processing module.
[0213] It should be noted that the first voice processing module starts the sound reception recognition and seizes the sound reception recognition channel of the second voice processing module, but does not affect the switch state of the first voice control switch, that is, the first voice control switch remains in the closed state.
[0214] S1113. When the preset instruction word of the first scene event is recognized, the first voice processing module sends a control instruction to the first application through the service management module.
[0215] S1114. The first application executes corresponding service operations according to the control instruction.
[0216] In some embodiments, after S1114, the method further includes:
[0217] S1115. The first application sends a control response to the first voice processing module through the service management module.
[0218] S1116. The first voice processing module turns off the sound reception recognition according to the control response.
[0219] S1112 to S1116 of this embodiment can refer to Fig.10 S1010 to S1015 of the illustrated embodiment are not described in detail here.
[0220] S1117. The first voice processing module notifies the second voice processing module to restart voice reception recognition.
[0221] After the first voice processing module turns off the sound reception recognition, it notifies the second voice processing module to restart the sound reception recognition, so that the first voice processing module returns the sound reception recognition channel to the second voice processing module.
[0222] In some other embodiments, after S1114, the method further includes: after the context awareness module learns that the first scene event has ended, the context awareness module sends a message to the voice processing module through the business processing module to trigger the voice processing module to turn off the voice recognition. In this embodiment, the business processing module pre-subscribes to the fence of the end of the first scene event.
[0223] In the voice control method shown in the above embodiment, in response to the user's operation of turning on the second voice control switch, the business processing module subscribes to the fence that the second voice processing module depends on to the scenario perception module. After the fence that the second voice processing module depends on is triggered, the business processing module pulls up the second voice processing module and turns on the sound reception recognition. At this time, the second voice processing module can send a notification to the first voice processing module to enable the first voice processing module to check whether the first voice control switch is turned on. If not, the first voice processing module subscribes to the fence of the first scene event to the scenario perception module. This can avoid the problem of not being able to respond to the user's voice command immediately due to the user not turning on the first voice control switch, thereby improving the user's voice control experience.
[0224] In addition, after the second voice control switch is turned on, the second voice processing module continues to use the sound reception recognition channel. At this time, if the fence of the first scene event is triggered, the first voice processing module can seize the sound reception recognition channel of the second voice processing module to solve the problem of conflict in sound reception recognition. After the first scene event ends, the sound reception recognition channel is returned to the second voice processing module, so as not to affect the subsequent sound reception recognition function of the second voice processing module.
[0225] Based on the above-mentioned embodiments, an embodiment of the present application proposes a voice control method, which includes: in response to the user turning off the first voice control switch, the electronic device turns off the first voice control function, and the first voice control function is used to perform sound recognition during the time period from the start to the end of the first scene event; in response to the user turning on the second voice control switch, the electronic device turns on the second voice control function, and the second voice control function is used to continuously perform sound recognition; when the first voice control function is turned off and the second voice control function is turned on, when the first scene event is started, the second voice control function is paused and the first voice control function is turned on.
[0226] The first voice control switch can be used to control the opening or closing of the first voice control function. The module corresponding to the first voice control function is, for example, Fig.11 The first voice processing module shown. The first scene event can be an alarm ringing, a phone ringing, etc. The first voice processing module can be used to perform sound recognition (or short sound recognition) during the time period from the alarm ringing to the alarm turning off, or to perform sound recognition during the time period from the phone ringing to the phone hanging up (or the phone answering). The first voice control function is also called a scene-based command function.
[0227] The second voice control switch can be used to control the opening or closing of the second voice control function. The module corresponding to the second voice control function is, for example, Fig.11The second voice processing module shown. The second voice processing module can be used to perform continuous sound reception recognition after the fence on which the second voice processing module depends is triggered. The second voice control function is also called the see-and-speak function.
[0228] When the user turns off the first voice control switch and turns on the second voice control switch, after the first scene event (such as the alarm ringing) is activated, based on the existing solution, the electronic device cannot respond to the first scene event because the first voice control function is not turned on. However, based on the above solution, the electronic device can suspend the second voice control function and turn on the first voice control function after the first scene event is activated, so that the electronic device can perform short sound reception recognition and perform corresponding service operations (such as turning off the alarm) during the time period from the start to the end of the first scene event, so that the user can still respond to the user's voice command for the first scene event when the first voice control switch is not turned on, thereby improving the user's voice control experience. This can avoid the problem of being unable to respond to the user's voice command immediately due to the user not turning on the first voice control switch.
[0229] In an optional embodiment, the electronic device includes a situational awareness module, a business processing module and a second voice processing module. In response to the user turning on the second voice control switch, the electronic device turns on the second voice control function, including: in response to the user turning on the second voice control switch, the business processing module subscribes to the fence on which the second voice control function depends to the situational awareness module; when the fence on which the second voice control function depends is triggered, the situational awareness module notifies the business processing module, and the business processing module controls to pull up the second voice processing module, and the second voice processing module continues to perform sound reception and recognition.
[0230] In the above scheme, after the user turns on the second voice control switch, when the electronic device monitors the triggering of the fence that the second voice control function depends on, it will pull up the second voice processing module corresponding to the second voice control function to perform continuous sound collection and recognition to respond to the user's voice control operation. The user does not need to say the wake-up word, but directly speaks the voice command to control the electronic device to perform the corresponding service operation. For example, when the user is watching a video, he says "pause" and the device pauses playing the video.
[0231] In an optional embodiment, the electronic device further includes a first voice processing module, and the method further includes: after the second voice processing module of the electronic device is pulled up, the second voice processing module sends a first message to the first voice processing module, and the first message is used to notify the first voice processing module to determine the state of the first voice control switch; when the first voice processing module determines that the first voice control switch is not turned on, the first voice processing module subscribes to the fence of the first scene event to the context perception module of the electronic device. The first message can correspond to Fig.11 The third notification message (S1106) is shown.
[0232] In the above scheme, when the user turns on the second voice control switch, if the fence on which the second voice control function depends is triggered, the electronic device can pull up the second voice processing module, and the second voice processing module can directly notify the first voice processing module to check the switch state of the first voice control switch, so that the first voice processing module can subscribe to the fence of the first scene event directly to the scenario perception module of the electronic device when the first voice control switch is not turned on, so that when the fence of the first scene event is triggered, the first voice processing module is pulled up for short sound recognition to respond to the first scene event.
[0233] In an optional embodiment, when the first scene event is initiated, the second voice control function is paused and the first voice control function is activated, including: when the first voice processing module of the electronic device learns that the first scene event is initiated, the first voice processing module notifies the second voice processing module of the electronic device to pause sound reception recognition; the first voice processing module activates sound reception recognition.
[0234] In the above scheme, the first voice processing module learns from the situational awareness module that the first scene event is initiated. Before starting the sound reception recognition, it first notifies the second voice processing module to suspend the sound reception recognition to seize the sound reception recognition channel of the second voice processing module and perform short sound reception recognition.
[0235] In an optional embodiment, the first voice processing module of the electronic device learns that the first scene event is started, including: when the fence of the first scene event is triggered, the context awareness module of the electronic device sends a second message to the first voice processing module, and the second message is used to notify the first scene event to start. The second message may correspond to Fig.11 The second subscription response (S1110) is shown.
[0236] In the above solution, since the first voice processing module subscribes to the first scene event from the scene perception module, when the first scene event is initiated, the first voice processing module can be informed of the initiation of the first scene event from the scene perception module.
[0237] In an optional embodiment, the method further includes: after the first scene event ends, turning off the first voice control function and turning on the second voice control function.
[0238] In the above scheme, since the first voice processing module corresponding to the first voice control function performs sound recognition during the time period from the start to the end of the first scene event, after the first scene event ends, the electronic device will turn off the first voice processing module and reopen the second voice processing module.
[0239] In an optional embodiment, after the first scene event ends, the first voice control function is turned off and the second voice control function is turned on, including: the first voice processing module of the electronic device is informed that the first scene event ends, and the first voice processing module turns off the sound reception recognition; the first voice processing module notifies the second voice processing module of the electronic device to re-enable the sound reception recognition.
[0240] In the above solution, after the first scene event ends, the first voice processing module returns the sound reception recognition channel to the second voice processing module, which will not affect the subsequent continuous sound reception recognition by the second voice processing module.
[0241] In an optional embodiment, the first voice processing module of the electronic device learns that the first scene event ends, including: after the first application corresponding to the first scene event performs the corresponding service operation, the first application sends a third message to the first voice processing module through the service management module of the electronic device, and the third message is used to indicate that the first scene event ends. The third message may correspond to Fig.11 The control response shown (S1115).
[0242] In the above solution, the first application notifies the first voice processing module through the service management module that the first scene event ends, so that the first voice processing module returns the sound reception recognition channel to the second voice processing module.
[0243] It is understandable that, in order to realize the above functions, the above electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
[0244] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0245] In the case of an integrated unit, Fig.12A possible structural diagram of the electronic device involved in the above embodiment is shown. The electronic device 1200 includes: a processing unit 1201 , a storage unit 1202 , an audio unit 1203 and a display unit 1204 .
[0246] The processing unit 1201 is used to control and manage the actions of the electronic device 1200. For example, it can be used to parse and recognize the user's voice when the user's voice is received, and / or used for other processes of the technology described herein.
[0247] The storage unit 1202 is used to store program codes and data of the electronic device 1200. For example, it stores preset instruction words, etc. The processing unit 1201 calls the program code stored in the storage unit 1202 to execute each step in the above method embodiment.
[0248] The audio unit 1203 is used to collect the voice uttered by the user and play the voice.
[0249] The display unit 1204 is used to display the interface of the electronic device 1200 .
[0250] Of course, the unit modules in the electronic device 1200 include but are not limited to the processing unit 1201, the storage unit 1202, the audio unit 1203 and the display unit 1204. For example, the electronic device 1200 may also include a power supply unit, a communication unit, etc. The power supply unit is used to supply power to the electronic device 1200. The communication unit is used to support the communication between the electronic device 1200 and other devices.
[0251] Among them, the processing unit 1201 can be a processor or a controller, for example, a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The processor may include an application processor and a baseband processor. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The storage unit 1202 may be a memory. The audio unit 1203 may include a microphone, a speaker, a receiver, etc. The display unit 1204 may be a display screen, etc. The communication unit may be a transceiver, a transceiver circuit or a communication interface, etc.
[0252] For example, the processing unit 1201 is a processor (such as Figure 8 The processor 110 shown in FIG. 1 ), the storage unit 1202 may be a memory (eg, Figure 8 The audio unit 1203 may include a microphone (eg, Figure 8 Microphone 170C shown), speaker (such as Figure 8 Speaker 170A shown), receiver (such as Figure 8 The display unit 1204 may be a display screen (eg, Figure 8 The communication unit includes a mobile communication module (such as Figure 8 The mobile communication module 120 shown in FIG. Figure 8 The mobile communication module and the wireless communication module may be collectively referred to as a communication interface.
[0253] The electronic device 1200 provided in the embodiment of the present application can be Figure 8 The electronic device 100 shown in the figure. The processor, memory, microphone, display screen and communication interface can be coupled together, for example, via a bus. The processor calls the program code stored in the memory to execute each step in the above method embodiment.
[0254] An embodiment of the present application provides an electronic device, including: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device performs each function or step in the above method embodiment.
[0255] The present application also provides a chip system (eg, a system on a chip (SoC)), such as Fig.13 As shown, the chip system includes at least one processor 1301 and at least one interface circuit 1302. The processor 1301 and the interface circuit 1302 can be interconnected via lines. For example, the interface circuit 1302 can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit 1302 can be used to send signals to other devices (such as a processor 1301 or a touch screen of an electronic device). Exemplarily, the interface circuit 1302 can read instructions stored in the memory and send the instructions to the processor 1301. When the instructions are executed by the processor 1301, 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.
[0256] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the electronic device executes each function or step in the above method embodiment.
[0257] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute each function or step executed by the electronic device in the above method embodiment.
[0258] Among them, the electronic device, chip system, computer-readable storage medium or computer program product provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0259] 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.
[0260] 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 the modules or units is only a logical function division. 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.
[0261] 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.
[0262] 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.
[0263] 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 method described in each embodiment 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.
[0264] The above is only a specific implementation 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 should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A voice control method, characterized in that: include: In response to the user turning off the first voice control switch, the electronic device turns off the first voice control function, where the first voice control function is used to perform sound reception recognition during the time period from the start to the end of the first scene event; In response to the user turning on the second voice control switch, the electronic device turns on the second voice control function, where the second voice control function is used to continuously perform sound reception recognition; When the first voice control function is turned off and the second voice control function is turned on, when the first scene event is activated, the second voice control function is paused and the first voice control function is turned on.
2. The method according to claim 1, characterized in that: The electronic device includes a context awareness module, a service processing module, and a second voice processing module. In response to a user turning on a second voice control switch, the electronic device turns on a second voice control function, including: In response to the user turning on the second voice control switch, the service processing module subscribes to the context awareness module for the fence on which the second voice control function depends; When the fence on which the second voice control function depends is triggered, the situational awareness module notifies the business processing module, and the business processing module controls to pull up the second voice processing module, and the second voice processing module continues to perform sound reception and recognition.
3. The method according to claim 1 or 2, characterized in that: The electronic device further includes a first voice processing module, and the method further includes: After the second voice processing module of the electronic device is pulled up, the second voice processing module sends a first message to the first voice processing module, where the first message is used to notify the first voice processing module to determine the state of the first voice control switch; When the first voice processing module determines that the first voice control switch is not turned on, the first voice processing module subscribes to the fence of the first scene event from the context awareness module of the electronic device.
4. The method according to any one of claims 1 to 3, characterized in that: When the first scene event is initiated, pausing the second voice control function and enabling the first voice control function includes: When the first voice processing module of the electronic device learns that the first scene event is started, the first voice processing module notifies the second voice processing module of the electronic device to suspend sound reception and recognition; The first voice processing module starts voice recognition.
5. The method according to claim 4, characterized in that The first voice processing module of the electronic device learns that the first scene event is started, including: When the fence of the first scene event is triggered, the context awareness module of the electronic device sends a second message to the first voice processing module, where the second message is used to notify the start of the first scene event.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: After the first scene event ends, the first voice control function is turned off and the second voice control function is turned on.
7. The method according to claim 6, characterized in that After the first scene event ends, turning off the first voice control function and turning on the second voice control function includes: The first voice processing module of the electronic device learns that the first scene event ends, and the first voice processing module turns off the sound reception recognition; The first voice processing module notifies the second voice processing module of the electronic device to restart the sound reception recognition.
8. The method according to claim 7, characterized in that The first voice processing module of the electronic device learns that the first scene event ends, including: After the first application corresponding to the first scene event executes the corresponding service operation, the first application sends a third message to the first voice processing module through the service management module of the electronic device, and the third message is used to indicate the end of the first scene event.
9. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Voice control method and electronic equipment
CN119229860A
