Method and device for preventing mutual interference between loudspeaker and microphone and electronic equipment
After receiving the wake-up command in the smart appliance, the microphone and speakers are controlled to switch operations respectively, which solves the problem of mutual interference between speaker sound and microphone recording, and improves the use effect of voice control function.
Patent Information
- Application Number
- CN202411941720.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art is difficult to fundamentally solve the problem of mutual interference between speaker sound and microphone recording, especially in smart appliances, which leads to poor use of voice control functions.
By receiving and responding to a wake-up command, the microphone and speakers are respectively controlled to perform switching operations after wake-up, so that they are in a mutual shielding state in the front and after stages of receiving and replying the command, thereby avoiding mutual interference.
It effectively avoids the problem of mutual interference between speakers and microphones during work, and improves the use effect and user experience of voice control functions.
Smart Images

Figure CN119767207A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart electrical appliances, and more specifically, to a method, device, computer-readable storage medium, and electronic device for preventing a speaker and a microphone from interfering with each other. Background Art
[0002] Currently, all kinds of products on the market generally integrate voice control functions. These products usually combine voice recognition, interactive dialogue and control logic, and use voice commands to control the device. Such a design not only reduces the manual operation burden of users, but also improves the usability of the product and optimizes the user experience.
[0003] Many smart electrical appliances on the market today have voice control functions, but these products encounter many challenges during use. The main problems include: interference between speaker sound and microphone recording.
[0004] In order to reduce the mutual interference between the speaker sound and the microphone recording, the current solution is usually to place the microphone and speaker separately. However, due to the limited space inside the appliance, even if they are placed relatively far apart, the interference can only be reduced to a certain extent, and the problem cannot be fundamentally solved. Summary of the invention
[0005] The main purpose of the present application is to provide a method, device, computer-readable storage medium and electronic device to prevent mutual interference between a speaker and a microphone, so as to at least solve the problem that the current solution of separate placement is difficult to fundamentally solve the mutual interference between the speaker sound and the microphone recording.
[0006] In order to achieve the above-mentioned purpose, according to the first aspect of the present application, a method for preventing a speaker and a microphone from interfering with each other is provided, comprising: receiving and responding to a wake-up instruction to wake up a voice system, and after waking up the voice system, controlling the microphone to turn off and the speaker to turn on, so that the speaker plays a response voice; after the speaker plays the response voice, controlling the speaker to turn off and the microphone to turn on to wait for receiving an actual voice instruction, if the actual voice instruction is received within a preset time period, controlling the microphone to turn off and the speaker to turn on, and if the actual voice instruction is a valid voice instruction, executing the actual voice instruction and controlling the speaker to play the execution result.
[0007] Optionally, before receiving and responding to a wake-up instruction to wake up the voice system, the method further includes: controlling the wake-up voice system to be in a wake-up state, in which the speaker is in a turned-off state and the microphone is in a standby state.
[0008] Optionally, the method further includes: if the actual voice instruction is not received within the preset time period, controlling the wake-up voice system to enter the waiting-to-wake-up state again.
[0009] Optionally, the method also includes: if the actual voice command is received within the preset time period, controlling the microphone to turn off and controlling the speaker to turn on, and if the actual voice command is an invalid voice command, controlling the speaker to play the voice that has not received a valid command, and waiting again to receive a new actual voice command.
[0010] Optionally, the wake-up instruction is issued by a user, and the method further includes: acquiring user behavior habits, the user behavior habits including the frequency of the user waking up the voice system within a predetermined period; and determining the preset time period according to the user behavior habits.
[0011] Optionally, the method also includes: while executing the actual voice instruction and controlling the speaker to play the execution result, determining whether the execution is completed and whether the speaker has finished broadcasting; if the execution is completed and the speaker has finished broadcasting, waiting again to receive a new actual voice instruction; if the execution is not completed, waiting until the execution is completed; if the execution is completed but the speaker has not finished broadcasting, waiting until the speaker has finished broadcasting.
[0012] Optionally, controlling the microphone to be turned off and the speaker to be turned on after waking up the voice system includes: after waking up the voice system, controlling the microphone to be turned off, and controlling the speaker to be turned on within a preset time period after the microphone is turned off.
[0013] According to a second aspect of the present application, a device for preventing a speaker and a microphone from interfering with each other is provided, comprising: a first processing unit, for receiving and waking up a voice system in response to a wake-up instruction, and after waking up the voice system, controlling the microphone to turn off and the speaker to turn on, so that the speaker plays a response voice; a second processing unit, for controlling the speaker to turn off and the microphone to turn on to wait for receiving an actual voice instruction after the speaker plays the response voice, and if the actual voice instruction is received within a preset time period, controlling the microphone to turn off and the speaker to turn on, and if the actual voice instruction is a valid voice instruction, executing the actual voice instruction and controlling the speaker to play the execution result.
[0014] According to a third aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods for preventing mutual interference between a speaker and a microphone.
[0015] According to a fourth aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the methods for preventing mutual interference between a speaker and a microphone.
[0016] By applying the technical solution of the present application, the voice system is awakened by receiving and responding to the wake-up command, and after the voice system is awakened, the microphone is controlled to be turned off and the speaker is controlled to be turned on, so that the speaker plays the response voice; after the speaker plays the response voice, the speaker is controlled to be turned off and the microphone is controlled to be turned on to wait for receiving the actual voice command, and if the actual voice command is received within a preset time period, the microphone is controlled to be turned off and the speaker is controlled to be turned on, and if the actual voice command is a valid voice command, the actual voice command is executed and the speaker is controlled to play the execution result. By turning the microphone and the speaker on and off respectively in the stages before and after command reception and command reply, the two parts are in a mutually shielded state and will not work at the same time, thereby avoiding mutual interference between the parts during the working process. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A hardware structure block diagram of a mobile terminal for executing a method for preventing a speaker and a microphone from interfering with each other provided in an embodiment of the present application is shown;
[0019] Figure 2 A schematic flow chart of a method for preventing a loudspeaker and a microphone from interfering with each other according to an embodiment of the present application is shown;
[0020] Figure 3 A flowchart of a specific method for preventing a loudspeaker and a microphone from interfering with each other is shown according to an embodiment of the present application;
[0021] Figure 4 A structural block diagram of a device for preventing a loudspeaker and a microphone from interfering with each other is shown according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] As introduced in the background technology, it is difficult to fundamentally solve the mutual interference between the speaker sound and the microphone recording by adopting the separate placement solution in the prior art. In order to solve the problem that it is difficult to fundamentally solve the mutual interference between the speaker sound and the microphone recording by adopting the separate placement solution, the embodiments of the present application provide a method, device, computer-readable storage medium and electronic device for preventing mutual interference between speakers and microphones.
[0026] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0027] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for preventing a speaker and a microphone from interfering with each other according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for preventing the speaker and the microphone from interfering with each other in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0029] In this embodiment, a method for preventing a speaker and a microphone from interfering with each other is provided, which runs on a mobile terminal, a computer terminal or a similar computing device. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] Figure 2 FIG. 1 is a flow chart of a method for preventing a speaker and a microphone from interfering with each other according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0031] Step S201, receiving and responding to a wake-up instruction to wake up the voice system, and after waking up the voice system, controlling the microphone to be turned off and the speaker to be turned on, so that the speaker plays a response voice;
[0032] In the above, the voice system is awakened in response to the voice indication.
[0033] Specifically, there are valid wake-up commands in the voice system. Users can issue commands through the wake-up commands in the vocabulary. The voice system performs corresponding operations by recognizing keywords, thereby achieving the effect of controlling the product using voice. After the user outputs the wake-up command specified in the vocabulary, the voice control system program is awakened and started.
[0034] Before receiving and responding to a wake-up instruction to wake up the voice system, the method further includes: controlling the wake-up voice system to be in a waiting state, in which the speaker is in a turned-off state and the microphone is in a standby state.
[0035] Step S202, after the above-mentioned speaker plays the above-mentioned response voice, control the above-mentioned speaker to be turned off and control the above-mentioned microphone to be turned on to wait for receiving the actual voice instruction. If the above-mentioned actual voice instruction is received within the preset time period, control the above-mentioned microphone to be turned off and control the above-mentioned speaker to be turned on. If the above-mentioned actual voice instruction is a valid voice instruction, execute the above-mentioned actual voice instruction and control the above-mentioned speaker to play the execution result.
[0036] Specifically, there are multiple voice commands in the voice system vocabulary, and keyword matching technology can be used to determine whether the actual voice command is a valid voice command.
[0037] Specifically, the actual voice commands include: turn on the lights in the room, turn off the lights in the room, increase the brightness of the lights, reduce the brightness of the lights, turn on the air conditioner, turn off the air conditioner, set the air conditioner temperature to 25 degrees Celsius, switch the air conditioner to energy-saving mode, turn on the dehumidification function of the air conditioner, turn on the TV, turn off the TV, increase the volume of the TV, display the current temperature of the refrigerator, open the curtains, close the curtains, adjust the curtains to half-open, etc.
[0038] In addition, the actual voice command may also include some combined commands, for example, turning on the main light while turning on the air conditioner in the living room, turning on the humidifier in the bedroom while turning on the air conditioner in the bedroom, and so on.
[0039] The method of preventing the speaker and the microphone from interfering with each other in the present application wakes up the voice system by receiving and responding to the wake-up command, and after waking up the voice system, controls the microphone to be turned off and the speaker to be turned on, so that the speaker plays the response voice; after the speaker plays the response voice, controls the speaker to be turned off and the microphone to be turned on to wait for receiving the actual voice command, and if the actual voice command is received within a preset time period, controls the microphone to be turned off and the speaker to be turned on, and if the actual voice command is a valid voice command, executes the actual voice command and controls the speaker to play the execution result. By turning the microphone and the speaker on and off respectively in the stages before and after command reception and command reply, the two parts are in a mutually shielded state and will not work at the same time, thereby avoiding mutual interference between the parts during the working process.
[0040] Furthermore, the method further includes: if the actual voice command is not received within the preset time period, controlling the wake-up voice system to enter the waiting-to-wake-up state again.
[0041] For example, if the actual voice command is not received within 10s, 15s, or 20s, the wake-up voice system is controlled to enter the waiting-to-wake-up state again. That is to say, if the actual voice command is not received within the preset time period, it will no longer wait for reception, but enter the waiting-to-wake-up state again.
[0042] Furthermore, the method further includes: if the actual voice instruction is received within the preset time period, the microphone is controlled to be turned off and the speaker is controlled to be turned on, and if the actual voice instruction is an invalid voice instruction, the speaker is controlled to play the voice that has not received a valid instruction, and waits for receiving a new actual voice instruction again. That is, if the actual voice instruction is received within the preset time period, but the actual voice instruction is invalid, the speaker plays for prompting, and waits for receiving a new actual voice instruction. However, the waiting state will not be entered again, that is, in this case, it is assumed to have been awakened.
[0043] Optionally, the wake-up command is issued by the user, and the method further includes: obtaining the user's behavior habits, including the frequency of the user waking up the voice system within a predetermined period; and determining the preset time period according to the user's behavior habits. Specifically, based on the research on user behavior habits and the collected experimental data, as well as the comprehensive analysis of the duration of the command in the command entry, monitoring whether there is an instruction within the preset time period can prevent the user from waking up by mistake or preventing the voice system from being turned on after no instruction.
[0044] Optionally, the method further includes: while executing the actual voice command and controlling the speaker to play the execution result, determining whether the execution is completed and whether the speaker has finished broadcasting; if the execution is completed and the speaker has finished broadcasting, waiting to receive a new actual voice command again; if the execution is not completed, waiting until the execution is completed; if the execution is completed but the speaker has not finished broadcasting, waiting until the speaker has finished broadcasting. That is, each actual voice command is broadcasted after execution is completed, and completion of execution and broadcasting indicates the end.
[0045] Optionally, after waking up the voice system, controlling the microphone to be turned off and the speaker to be turned on includes: after waking up the voice system, controlling the microphone to be turned off, and controlling the speaker to be turned on within a preset time period after the microphone is turned off. For example, a specific time delay is designed, and after receiving a valid instruction in the vocabulary, the microphone is turned off within a few milliseconds, and then the speaker is turned on within a few milliseconds, and the microphone and the speaker are turned on and off alternately to ensure that the audio of the speaker is not captured by the microphone.
[0046] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for preventing mutual interference between a speaker and a microphone of the present application will be described in detail below in combination with specific embodiments.
[0047] This embodiment relates to a specific method for preventing a loudspeaker and a microphone from interfering with each other. Figure 3 As shown, including:
[0048] 1. Waiting state: In the waiting state, the speaker is turned off and the microphone is in standby state;
[0049] 2. Wake-up phase: The user wakes up the voice system by inputting a specified wake-up command, and the voice control system program is started. After the voice system is started, the microphone is turned off, the speaker is turned on, and the response voice is broadcast. After completion, it enters the waiting for receiving commands phase;
[0050] 3. Waiting for command reception stage: the speaker is turned off, the microphone is turned on, and the device waits for actual voice commands (commands that actually control the device actions, such as turning on and off the air conditioner). It is determined whether there is an actual voice command within 10 seconds. If so, it enters the command judgment stage. If not, it returns to the waiting state and waits for wake-up.
[0051] 4. Command judgment stage: After the actual voice command is generated within 10 seconds, the microphone is turned off and the speaker is turned on to determine whether the actual voice command is a valid voice command. If so, it proceeds to the command execution stage. If not, the speaker replies to the user "no valid command received" and returns to the state of waiting to receive commands;
[0052] 5. Command execution stage: If it is a valid voice command, after executing the user's instruction, the speaker replies to the user and determines whether the execution and reply are completed. If so, it proceeds to the waiting command stage. If not, it repeats this step until it enters the waiting command stage;
[0053] This solution turns the microphone and speaker on and off before and after receiving and responding to user commands, so that the two parts are shielded from each other and do not work at the same time, thereby avoiding mutual interference between the parts during operation and problems such as the microphone being unable to clearly receive user commands or receiving erroneous commands, making the user experience smoother and enhancing the user experience.
[0054] The embodiment of the present application also provides a device for preventing a loudspeaker and a microphone from interfering with each other. It should be noted that the device for preventing a loudspeaker and a microphone from interfering with each other in the embodiment of the present application can be used to execute the method for preventing a loudspeaker and a microphone from interfering with each other provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0055] The following is an introduction to a device for preventing a speaker and a microphone from interfering with each other provided in an embodiment of the present application.
[0056] Figure 4 is a schematic diagram of a device for preventing a speaker and a microphone from interfering with each other according to an embodiment of the present application. Figure 4 As shown, the device comprises:
[0057] The first processing unit 41 is used to receive and respond to the wake-up instruction to wake up the voice system, and after waking up the voice system, control the microphone to turn off and the speaker to turn on, so that the speaker plays the response voice;
[0058] The second processing unit 42 is used for controlling the above-mentioned speaker to turn off and the above-mentioned microphone to turn on to wait for receiving the actual voice instruction after the above-mentioned speaker plays the above-mentioned response voice. If the above-mentioned actual voice instruction is received within a preset time period, the above-mentioned microphone is controlled to turn off and the above-mentioned speaker is controlled to turn on. If the above-mentioned actual voice instruction is a valid voice instruction, the above-mentioned actual voice instruction is executed and the above-mentioned speaker is controlled to play the execution result.
[0059] The device for preventing the speaker and the microphone from interfering with each other in the present application comprises the following steps: the first processing unit wakes up the voice system by receiving and responding to the wake-up command, and after waking up the voice system, controls the microphone to be turned off and the speaker to be turned on, so that the speaker plays the response voice; the second processing unit controls the speaker to be turned off and the microphone to be turned on after the speaker plays the response voice to wait for receiving the actual voice command, and if the actual voice command is received within a preset time period, controls the microphone to be turned off and the speaker to be turned on, and if the actual voice command is a valid voice command, executes the actual voice command and controls the speaker to play the execution result. By turning on and off the microphone and the speaker respectively in the stages before and after command reception and command reply, the two parts are in a mutually shielded state and will not work at the same time, thereby avoiding mutual interference between the parts during the working process.
[0060] In an optional solution, the device further includes a first control unit, which is used to control the wake-up voice system to be in a standby state before receiving and responding to a wake-up instruction to wake up the voice system, wherein the speaker is in a turned-off state and the microphone is in a standby state.
[0061] As an optional solution, the above-mentioned device also includes a second control unit, and the second control unit is used to control the above-mentioned wake-up voice system to enter the above-mentioned waiting for wake-up state again if the above-mentioned actual voice instruction is not received within the above-mentioned preset time period.
[0062] An optional solution, the above-mentioned device also includes a third control unit, which is used to control the above-mentioned microphone to be turned off and the above-mentioned speaker to be turned on if the above-mentioned actual voice instruction is received within the above-mentioned preset time period, and in the case that the above-mentioned actual voice instruction is an invalid voice instruction, control the above-mentioned speaker to play the voice that has not received a valid instruction, and wait for receiving a new actual voice instruction again.
[0063] An optional solution, the wake-up instruction is issued by the user, and the device also includes an acquisition unit and a first determination unit, the acquisition unit is used to acquire the user's behavior habits, and the user's behavior habits include the frequency of the user waking up the voice system within a predetermined period; the first determination unit is used to determine the preset time period according to the user's behavior habits.
[0064] An optional solution, the above-mentioned device also includes a second determination unit, a first waiting unit and a second waiting unit, the second determination unit is used to determine whether the execution is completed and whether the above-mentioned speaker has finished broadcasting while executing the above-mentioned actual voice instruction and controlling the above-mentioned speaker to play the above-mentioned execution result; the first waiting unit is used to wait for receiving a new actual voice instruction again if the execution is completed and the above-mentioned speaker has finished broadcasting; the second waiting unit is used to wait until the execution is completed if the execution is not completed, and wait until the speaker has finished broadcasting if the execution is completed but the speaker has not finished broadcasting.
[0065] An optional solution, the first processing unit includes a control module, the control module is used to control the microphone to turn off and the speaker to turn on after waking up the above-mentioned voice system, and the control module is specifically implemented to control the above-mentioned microphone to turn off after waking up the above-mentioned voice system, and control the above-mentioned speaker to turn on within a preset time period after the above-mentioned microphone is turned off.
[0066] The device for preventing the speaker and the microphone from interfering with each other comprises a processor and a memory, wherein the first processing unit and the second processing unit are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0067] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the speaker and the microphone can be prevented from interfering with each other by adjusting the kernel parameters.
[0068] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0069] An embodiment of the present invention provides an electronic device, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the above-mentioned methods for preventing mutual interference between a speaker and a microphone.
[0070] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program. When the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for preventing mutual interference between a speaker and a microphone.
[0071] Specifically, the method of preventing the speaker and the microphone from interfering with each other includes:
[0072] Step S201, receiving and responding to a wake-up instruction to wake up the voice system, and after waking up the voice system, controlling the microphone to be turned off and the speaker to be turned on, so that the speaker plays a response voice;
[0073] Step S202, after the above-mentioned speaker plays the above-mentioned response voice, control the above-mentioned speaker to be turned off and control the above-mentioned microphone to be turned on to wait for receiving the actual voice instruction. If the above-mentioned actual voice instruction is received within the preset time period, control the above-mentioned microphone to be turned off and control the above-mentioned speaker to be turned on. If the above-mentioned actual voice instruction is a valid voice instruction, execute the above-mentioned actual voice instruction and control the above-mentioned speaker to play the execution result.
[0074] Optionally, before receiving and responding to a wake-up instruction to wake up the voice system, the method further includes: controlling the wake-up voice system to be in a waiting state, in which the speaker is in a turned-off state and the microphone is in a standby state.
[0075] Optionally, the method further includes: if the actual voice command is not received within the preset time period, controlling the wake-up voice system to enter the waiting-to-wake-up state again.
[0076] Optionally, the method further includes: if the actual voice command is received within the preset time period, controlling the microphone to be turned off and controlling the speaker to be turned on, and if the actual voice command is an invalid voice command, controlling the speaker to play the voice for which no valid command has been received, and waiting again to receive a new actual voice command.
[0077] Optionally, the wake-up instruction is issued by a user, and the method further includes: acquiring user behavior habits, the user behavior habits including the frequency of the user waking up the voice system within a predetermined period; and determining the preset time period according to the user behavior habits.
[0078] Optionally, the method further includes: while executing the actual voice command and controlling the speaker to play the execution result, determining whether the execution is completed and whether the speaker has finished broadcasting; if the execution is completed and the speaker has finished broadcasting, waiting again to receive a new actual voice command; if the execution is not completed, waiting until the execution is completed; if the execution is completed but the speaker has not finished broadcasting, waiting until the speaker has finished broadcasting.
[0079] Optionally, after waking up the voice system, controlling the microphone to turn off and the speaker to turn on includes: after waking up the voice system, controlling the microphone to turn off, and controlling the speaker to turn on within a preset time period after the microphone is turned off.
[0080] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the method for preventing a speaker and a microphone from interfering with each other is executed when the program is run.
[0081] Specifically, the method of preventing the speaker and the microphone from interfering with each other includes:
[0082] Step S201, receiving and responding to a wake-up instruction to wake up the voice system, and after waking up the voice system, controlling the microphone to be turned off and the speaker to be turned on, so that the speaker plays a response voice;
[0083] Step S202, after the above-mentioned speaker plays the above-mentioned response voice, control the above-mentioned speaker to be turned off and control the above-mentioned microphone to be turned on to wait for receiving the actual voice instruction. If the above-mentioned actual voice instruction is received within the preset time period, control the above-mentioned microphone to be turned off and control the above-mentioned speaker to be turned on. If the above-mentioned actual voice instruction is a valid voice instruction, execute the above-mentioned actual voice instruction and control the above-mentioned speaker to play the execution result.
[0084] Optionally, before receiving and responding to a wake-up instruction to wake up the voice system, the method further includes: controlling the wake-up voice system to be in a waiting state, in which the speaker is in a turned-off state and the microphone is in a standby state.
[0085] Optionally, the method further includes: if the actual voice command is not received within the preset time period, controlling the wake-up voice system to enter the waiting-to-wake-up state again.
[0086] Optionally, the method further includes: if the actual voice command is received within the preset time period, controlling the microphone to be turned off and controlling the speaker to be turned on, and if the actual voice command is an invalid voice command, controlling the speaker to play the voice for which no valid command has been received, and waiting again to receive a new actual voice command.
[0087] Optionally, the wake-up instruction is issued by a user, and the method further includes: acquiring user behavior habits, the user behavior habits including the frequency of the user waking up the voice system within a predetermined period; and determining the preset time period according to the user behavior habits.
[0088] Optionally, the method further includes: while executing the actual voice command and controlling the speaker to play the execution result, determining whether the execution is completed and whether the speaker has finished broadcasting; if the execution is completed and the speaker has finished broadcasting, waiting again to receive a new actual voice command; if the execution is not completed, waiting until the execution is completed; if the execution is completed but the speaker has not finished broadcasting, waiting until the speaker has finished broadcasting.
[0089] Optionally, after waking up the voice system, controlling the microphone to turn off and the speaker to turn on includes: after waking up the voice system, controlling the microphone to turn off, and controlling the speaker to turn on within a preset time period after the microphone is turned off.
[0090] An embodiment of the present invention provides a device, the device including a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:
[0091] Step S201, receiving and responding to a wake-up instruction to wake up the voice system, and after waking up the voice system, controlling the microphone to be turned off and the speaker to be turned on, so that the speaker plays a response voice;
[0092] Step S202, after the above-mentioned speaker plays the above-mentioned response voice, control the above-mentioned speaker to be turned off and control the above-mentioned microphone to be turned on to wait for receiving the actual voice instruction. If the above-mentioned actual voice instruction is received within the preset time period, control the above-mentioned microphone to be turned off and control the above-mentioned speaker to be turned on. If the above-mentioned actual voice instruction is a valid voice instruction, execute the above-mentioned actual voice instruction and control the above-mentioned speaker to play the execution result.
[0093] Optionally, before receiving and responding to a wake-up instruction to wake up the voice system, the method further includes: controlling the wake-up voice system to be in a waiting state, in which the speaker is in a turned-off state and the microphone is in a standby state.
[0094] Optionally, the method further includes: if the actual voice command is not received within the preset time period, controlling the wake-up voice system to enter the waiting-to-wake-up state again.
[0095] Optionally, the method further includes: if the actual voice command is received within the preset time period, controlling the microphone to be turned off and controlling the speaker to be turned on, and if the actual voice command is an invalid voice command, controlling the speaker to play the voice for which no valid command has been received, and waiting again to receive a new actual voice command.
[0096] Optionally, the wake-up instruction is issued by a user, and the method further includes: acquiring user behavior habits, the user behavior habits including the frequency of the user waking up the voice system within a predetermined period; and determining the preset time period according to the user behavior habits.
[0097] Optionally, the method further includes: while executing the actual voice command and controlling the speaker to play the execution result, determining whether the execution is completed and whether the speaker has finished broadcasting; if the execution is completed and the speaker has finished broadcasting, waiting again to receive a new actual voice command; if the execution is not completed, waiting until the execution is completed; if the execution is completed but the speaker has not finished broadcasting, waiting until the speaker has finished broadcasting.
[0098] Optionally, after waking up the voice system, controlling the microphone to turn off and the speaker to turn on includes: after waking up the voice system, controlling the microphone to turn off, and controlling the speaker to turn on within a preset time period after the microphone is turned off.
[0099] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0100] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:
[0101] Step S201, receiving and responding to a wake-up instruction to wake up the voice system, and after waking up the voice system, controlling the microphone to be turned off and the speaker to be turned on, so that the speaker plays a response voice;
[0102] Step S202, after the above-mentioned speaker plays the above-mentioned response voice, control the above-mentioned speaker to be turned off and control the above-mentioned microphone to be turned on to wait for receiving the actual voice instruction. If the above-mentioned actual voice instruction is received within the preset time period, control the above-mentioned microphone to be turned off and control the above-mentioned speaker to be turned on. If the above-mentioned actual voice instruction is a valid voice instruction, execute the above-mentioned actual voice instruction and control the above-mentioned speaker to play the execution result.
[0103] Optionally, before receiving and responding to a wake-up instruction to wake up the voice system, the method further includes: controlling the wake-up voice system to be in a waiting state, in which the speaker is in a turned-off state and the microphone is in a standby state.
[0104] Optionally, the method further includes: if the actual voice command is not received within the preset time period, controlling the wake-up voice system to enter the waiting-to-wake-up state again.
[0105] Optionally, the method further includes: if the actual voice command is received within the preset time period, controlling the microphone to be turned off and controlling the speaker to be turned on, and if the actual voice command is an invalid voice command, controlling the speaker to play the voice for which no valid command has been received, and waiting again to receive a new actual voice command.
[0106] Optionally, the wake-up instruction is issued by a user, and the method further includes: acquiring user behavior habits, the user behavior habits including the frequency of the user waking up the voice system within a predetermined period; and determining the preset time period according to the user behavior habits.
[0107] Optionally, the method further includes: while executing the actual voice command and controlling the speaker to play the execution result, determining whether the execution is completed and whether the speaker has finished broadcasting; if the execution is completed and the speaker has finished broadcasting, waiting again to receive a new actual voice command; if the execution is not completed, waiting until the execution is completed; if the execution is completed but the speaker has not finished broadcasting, waiting until the speaker has finished broadcasting.
[0108] Optionally, after waking up the voice system, controlling the microphone to turn off and the speaker to turn on includes: after waking up the voice system, controlling the microphone to turn off, and controlling the speaker to turn on within a preset time period after the microphone is turned off.
[0109] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0110] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0111] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0114] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0115] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0116] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0117] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0118] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0119] 1) The method of preventing the speaker and the microphone from interfering with each other in the present application is to wake up the voice system by receiving and responding to the wake-up command, and after waking up the voice system, the microphone is controlled to be turned off and the speaker is controlled to be turned on, so that the speaker plays the response voice; after the speaker plays the response voice, the speaker is controlled to be turned off and the microphone is controlled to be turned on to wait for receiving the actual voice command, and if the actual voice command is received within a preset time period, the microphone is controlled to be turned off and the speaker is controlled to be turned on, and if the actual voice command is a valid voice command, the actual voice command is executed and the speaker is controlled to play the execution result. By turning on and off the microphone and the speaker respectively in the stages before and after command reception and command reply, the two parts are in a mutually shielded state and will not work at the same time, thereby avoiding mutual interference between the parts during the working process.
[0120] 2) The device for preventing the speaker and the microphone from interfering with each other in the present application, the first processing unit wakes up the voice system by receiving and responding to the wake-up command, and after waking up the voice system, controls the microphone to be turned off and the speaker to be turned on, so that the speaker plays the response voice; after the speaker plays the response voice, the second processing unit controls the speaker to be turned off and the microphone to be turned on to wait for receiving the actual voice command, if the actual voice command is received within a preset time period, controls the microphone to be turned off and the speaker to be turned on, and if the actual voice command is a valid voice command, executes the actual voice command and controls the speaker to play the execution result. By turning on and off the microphone and the speaker respectively in the stages before and after command reception and command reply, the two parts are in a mutually shielded state and will not work at the same time, thereby avoiding mutual interference between the parts during the working process.
[0121] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for preventing a loudspeaker and a microphone from interfering with each other, characterized in that: include: Receiving and responding to a wake-up instruction to wake up the voice system, and after waking up the voice system, controlling the microphone to turn off and the speaker to turn on, so that the speaker plays a response voice; After the speaker plays the response voice, the speaker is controlled to be turned off and the microphone is controlled to be turned on to wait for receiving the actual voice instruction. If the actual voice instruction is received within a preset time period, the microphone is controlled to be turned off and the speaker is controlled to be turned on. If the actual voice instruction is a valid voice instruction, the actual voice instruction is executed and the speaker is controlled to play the execution result.
2. The method according to claim 1, characterized in that Before receiving and responding to the wake-up instruction to wake up the voice system, the method further includes: The wake-up voice system is controlled to be in a waiting state, in which the speaker is in a closed state and the microphone is in a standby state.
3. The method according to claim 2, characterized in that The method further comprises: If the actual voice command is not received within the preset time period, the wake-up voice system is controlled to enter the waiting-to-wake-up state again.
4. The method according to claim 1, characterized in that: The method further comprises: If the actual voice command is received within the preset time period, the microphone is controlled to be turned off and the speaker is controlled to be turned on. If the actual voice command is an invalid voice command, the speaker is controlled to play the voice without receiving a valid command, and wait for receiving a new actual voice command again.
5. The method according to claim 4, characterized in that The wake-up instruction is issued by a user, and the method further includes: Acquiring user behavior habits, wherein the user behavior habits include a frequency of the user waking up the voice system within a predetermined period; The preset time period is determined according to the user's behavior habits.
6. The method according to claim 1, characterized in that The method further comprises: While executing the actual voice instruction and controlling the speaker to play the execution result, determining whether the execution is completed and whether the speaker has finished broadcasting; If the execution is completed and the speaker has finished broadcasting, wait again for receiving a new actual voice command; If the execution is not completed, wait until it is completed. If the execution is completed but the speaker has not announced the completion, wait until the speaker announces the completion.
7. The method according to claim 1, characterized in that After waking up the voice system, controlling the microphone to be turned off and the speaker to be turned on includes: After waking up the voice system, the microphone is controlled to be turned off, and the speaker is controlled to be turned on within a preset time period after the microphone is turned off.
8. A device for preventing a speaker and a microphone from interfering with each other, characterized in that: include: A first processing unit, configured to receive and respond to a wake-up instruction to wake up the voice system, and after waking up the voice system, control the microphone to turn off and the speaker to turn on, so that the speaker plays a response voice; The second processing unit is used for controlling the speaker to turn off and the microphone to turn on to wait for receiving the actual voice instruction after the speaker plays the response voice. If the actual voice instruction is received within a preset time period, the microphone is controlled to turn off and the speaker is controlled to turn on. If the actual voice instruction is a valid voice instruction, the actual voice instruction is executed and the speaker is controlled to play the execution result.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for preventing mutual interference between a speaker and a microphone according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing the method for preventing a speaker and a microphone from interfering with each other as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Voice-control voice recording device
CN103258550A
Method for enhancing human voice recognition applied to intelligent sound box, micro controller unit and intelligent sound box
CN108064007A
Voice recognition device
JP1995311589A
Method for controlling voice-recognition function of portable terminal and radiocommunications system
US20100105435A1