Microphone control method, device and electronic equipment
By detecting and applying voltage directly to the microphone while the target application is running, it solves the clutter problem when electronic devices record speech and ensures the integrity of the speech.
Patent Information
- Application Number
- CN202210601605.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-05-30
AI Technical Summary
When electronic equipment records speech, it takes a certain amount of time for the microphone to be powered on, causing the first 100ms of sound to be cut off, causing the problem of missing speech.
By detecting whether the electronic device is running the target application, and directly applying the target voltage to the microphone after detection, it is in a stable state and avoids the generation of clutter, thereby ensuring the integrity of the voice.
It effectively avoids clutter problems during voice recording, ensures the integrity of the voice, and prevents the first 100ms of the user's voice from being cut off.
Smart Images

Figure CN114979355B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a microphone control method, device and electronic equipment. Background Art
[0002] With the continuous development of electronic devices, the functions and applications of mobile phones are becoming more and more abundant. Users often use chat software for instant voice chat (for example: in the chat box of the "WeChat" application, first click the voice button on the left, and then long press "Press and Hold to Talk" to send an instant voice to the contact), or use the camera to shoot videos, etc.
[0003] In the above process, it is necessary to use a microphone to record sound. When the electronic device starts recording sound, it will apply voltage to the microphone. However, it takes a certain amount of time (for example: 100ms) from applying voltage to the microphone to the microphone being able to work normally. In the first 100ms, since the microphone has just been powered on, a lot of noise will be generated. Therefore, when the electronic device stores the voice, it will cut off the sound in the first 100ms. In this way, if the user speaks directly when the electronic device is just triggered to record, the sound of the first 100ms of speaking will be cut off, which will cause the voice recorded by the electronic device to be missing. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a microphone control method, device and electronic device, which can solve the problem of missing voice recorded by electronic equipment.
[0005] In order to solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for controlling a microphone, which method includes: detecting whether an electronic device is running a target application; when the electronic device is running the target application, applying a target voltage to the microphone; wherein the target application is an application with a voice recording function.
[0007] In a second aspect, an embodiment of the present application provides a control device for a microphone, the control device for the microphone comprising: a detection module and a processing module. The detection module is used to detect whether the electronic device is running a target application. The processing module is used to apply a target voltage to the microphone when the electronic device is running the target application; wherein the target application is an application with a voice recording function.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0012] In an embodiment of the present application, the electronic device can detect whether the electronic device is running a target application, and apply a target voltage to the microphone when it is detected that the electronic device is running the target application. In this solution, the electronic device directly applies the target voltage to the microphone when it is detected that the electronic device is running the target application, and does not start to apply the voltage to the microphone when the microphone is in use, so that the voltage of the microphone can be in a stable state, that is, the problem of noise generated when the electronic device records voice can be avoided, so that the recorded voice does not need to be intercepted when the voice is stored, thus ensuring the integrity of the voice recorded by the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a schematic diagram of the placement of a mobile phone microphone provided in an embodiment of the present application;
[0014] Figure 2 It is a schematic diagram of an audio framework and flow direction of a mobile phone system provided in an embodiment of the present application;
[0015] Figure 3 is a schematic diagram of a microphone control method provided in an embodiment of the present application;
[0016] Figure 4 This is a schematic diagram of an example of a mobile phone interface provided in an embodiment of the present application;
[0017] Figure 5 is a structural schematic diagram of a microphone control device provided in an embodiment of the present application;
[0018] Figure 6 This is one of the hardware structure diagrams of an electronic device provided in an embodiment of the present application;
[0019] Figure 7 This is the second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are 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 are within the scope of protection of this application.
[0021] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0022] The following describes in detail the microphone control method provided in the embodiment of the present application through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0023] The microphone control method in the embodiment of the present application can be applied to the scenario where an electronic device records sound.
[0024] At present, dual microphones have basically become standard for mobile phones, and the placement of the two microphones is relatively fixed, basically at the top and bottom of the phone, such as Figure 1 As shown, the mobile phone has a first microphone 20 and a second microphone 21; and, with the development of technology, the functions and applications of mobile phones are becoming more and more abundant. With the popularization of chat tools, more and more users use chat software to replace telephone calls. The "instant voice" function in these software (that is, the user clicks on the microphone control in the software, presses and holds it, starts talking, and releases it after finishing talking. The electronic device will send the content just spoken to the other party) is easy to use and is loved by the majority of users. At present, the software process for sending instant voice is as follows: the user clicks on the microphone control → the software controls the codec (codec) to turn on the micbias (microphone bias circuit) and power the microphone → the system controls the codec to start the analog to digital converter (ADC). Specifically, the audio framework and flow of the mobile phone system are as follows: Figure 2As shown. It takes about 100ms for the microphone to work normally after the micbias is powered on. Since the micbias has just been powered on, the microphone output will generate a lot of noise at this time. Therefore, when the system stores these recordings, it will cut off the first 100ms of sound to prevent users from hearing these noises. However, many users are accustomed to speaking directly after pressing the microphone control, which will cause the first 100ms of sound to be cut off, usually one word or half a word. In this way, the voice sent by the user will be missing, resulting in a bad user experience.
[0025] The implementation case of the present invention provides a microphone control solution. When the user enters a corresponding scene or software that may need to apply the microphone, the user powers on the micbias in advance to put the microphone in a stable state. When the ADC samples the microphone recording signal, there is no need to cut off the first 100ms of sound, that is, the problem of the user's speaking voice being cut off will not occur.
[0026] In the solution provided in the embodiment of the present application, the electronic device can detect whether the electronic device is running a target application, and apply a target voltage to the microphone when it is detected that the electronic device is running the target application. In this solution, when the electronic device detects that the electronic device is running the target application, the target voltage is directly applied to the microphone, and the voltage is not applied to the microphone when the microphone is in use, so that the voltage of the microphone can be in a stable state, which can avoid the problem of noise when the electronic device records voice, so that there is no need to intercept the recorded voice when storing the voice, thus ensuring the integrity of the voice recorded by the electronic device.
[0027] The present application provides a method for controlling a microphone. Figure 3 A flowchart of a microphone control method provided by an embodiment of the present application is shown, and the method can be applied to electronic devices. Figure 3 As shown, the microphone control method provided in the embodiment of the present application may include the following steps 201 and 202.
[0028] Step 201: The electronic device detects whether the electronic device is running a target application.
[0029] In the embodiment of the present application, the above-mentioned target application is an application with a voice recording function.
[0030] In an embodiment of the present application, the electronic device can detect whether the electronic device is running a target application. When it is detected that the electronic device is running the target application, a target voltage is applied to the microphone, that is, the bias circuit of the electronic device is controlled to power on the microphone with the target voltage.
[0031] Optionally, in the embodiment of the present application, the target voltage may be a first voltage or a second voltage.
[0032] Optionally, in an embodiment of the present application, the target application may be any one of the following: a calling application, a recording application, a photographing application, or a chatting application.
[0033] Optionally, in the embodiment of the present application, before the above step 201, the microphone control method provided in the embodiment of the present application further includes the following step 301.
[0034] Step 301: The electronic device detects whether the voice wake-up function is enabled.
[0035] In an embodiment of the present application, the electronic device can detect whether the user has turned on the voice wake-up function in the setting interface. When the voice wake-up function is turned on, the electronic device applies an operating voltage in the low power consumption mode to the microphone.
[0036] It can be understood that in order to ensure that the voice wake-up function can be used normally, the electronic device can control the microphone bias circuit of the electronic device to always power on the microphone with the operating voltage in the low power mode, that is, the microphone is always in a working state.
[0037] Optionally, in the embodiment of the present application, the above step 201 can be specifically implemented by the following step 201a.
[0038] Step 201a: When the voice wake-up function is not enabled on the electronic device, the electronic device detects whether the target application is running on the electronic device.
[0039] Optionally, in an embodiment of the present application, when the electronic device detects that the user has not enabled the voice wake-up function (i.e., the electronic device has not applied voltage to the microphone), the electronic device still needs to detect whether the electronic device is running a target application so as to apply a target voltage to the microphone when the electronic device is running the target application.
[0040] Optionally, in an embodiment of the present application, when the electronic device detects that the user has enabled the voice wake-up function (i.e., the electronic device has been applying an operating voltage in low power mode to the microphone), the electronic device does not need to detect whether the electronic device is running a target application, and only needs to keep applying the operating voltage in low power mode to the microphone.
[0041] It can be understood that the electronic device is already applying the operating voltage in low power mode to the microphone. At this time, when the electronic device runs the target application, it can directly determine the operating voltage of the microphone in low power mode as the target voltage, that is, control the electronic device to keep applying the operating voltage in low power mode to the microphone.
[0042] Step 202: When the electronic device runs a target application, the electronic device applies a target voltage to the microphone.
[0043] In an embodiment of the present application, when the electronic device detects that the electronic device is running a target application (for example, opening the target application), the codec of the electronic device is controlled to open the microphone bias circuit so that the microphone bias circuit applies a target voltage to the microphone.
[0044] Optionally, in an embodiment of the present application, the target voltage is a second voltage, and the second voltage is an operating voltage of the microphone in a normal operating mode.
[0045] Optionally, in the embodiment of the present application, the operating voltage (ie, the second voltage) of the microphone in the normal working mode may be an operating voltage of 2.7V.
[0046] It can be understood that when the electronic device detects that the user has not turned on the voice wake-up function in the setting interface, that is, the microphone bias circuit has not powered on the microphone, if the electronic device detects that the user has turned on the target application, the operating voltage of the microphone in the normal working mode (that is, the second voltage) is directly determined as the target voltage, thereby directly controlling the microphone bias circuit of the electronic device to power on the microphone with the operating voltage in the normal working mode. In this way, no matter whether the user sends instant voice in the subsequent process, or switches from the instant voice interface to the video shooting interface to shoot a video, the microphone is powered on with the operating voltage in the normal working mode to meet the user's usage needs, that is, it avoids the microphone bias circuit switching the voltage back and forth to power on the microphone, so that the voltage of the microphone is always in a stable state.
[0047] For example, taking the electronic device as a mobile phone and the target application as application A, the user opens application A. At this time, the mobile phone detects that the user has opened application A, thereby controlling the microphone bias circuit of the mobile phone to power on the microphone with the operating voltage in the normal operating mode (for example: 2.7V operating voltage).
[0048] The embodiment of the present application provides a method for controlling a microphone, wherein an electronic device can detect whether the electronic device is running a target application, and when the electronic device is detected to be running the target application, a target voltage is applied to the microphone. In this solution, when the electronic device is detected to be running the target application, the target voltage is directly applied to the microphone, and the voltage is not applied to the microphone until the microphone is in use, so that the voltage of the microphone can be kept in a stable state, and the problem of noise generated when the electronic device is recording voice can be avoided, so that the recorded voice does not need to be intercepted when the voice is stored, thus ensuring the integrity of the voice recorded by the electronic device.
[0049] Optionally, in the embodiment of the present application, the above step 202 can be specifically implemented by the following step 202a.
[0050] Step 202a: When the electronic device runs the target application and detects an instant voice sending operation in the target application, the electronic device applies a target voltage to the microphone.
[0051] In the embodiment of the present application, the target voltage is a first voltage, which is an operating voltage of the microphone in a low power consumption mode.
[0052] In an embodiment of the present application, when the electronic device detects that the electronic device is running a target application and an instant voice sending operation is performed in the target application, the electronic device can determine a first voltage corresponding to the instant voice sending operation (i.e., the operating voltage of the microphone in low power consumption mode), thereby applying the operating voltage in low power consumption mode to the microphone.
[0053] It can be understood that the user's instant voice sending operation in the target application is an operation in which the user long presses the microphone control in the instant voice sending interface to trigger the electronic device to start recording instant voice, that is, when the electronic device detects that the user is pressing and holding the microphone control, it controls the microphone bias circuit of the electronic device to power on the microphone with the operating voltage in low power mode.
[0054] Optionally, in the embodiment of the present application, the operating voltage (ie, the first voltage) of the microphone in the low power consumption mode may be an operating voltage of 1.8V.
[0055] It should be noted that for scenarios with large sound pressure levels, such as recording scenarios, video recording scenarios, etc., the microphone bias circuit is required to power on the microphone with the operating voltage in the normal working mode (for example, 2.7v operating voltage). However, due to the instant voice sending operation, there is basically no need to use a high boost level scenario, so the microphone bias circuit can power on the microphone with the operating voltage in the low power consumption mode (for example, 1.8v operating voltage), that is, the microphone can use a 1.8v operating voltage to meet the needs of the instant voice sending operation.
[0056] For example, after opening application A, the user enters the chat interface 10 with contact B, and then clicks the microphone icon 11 in the lower left corner, as shown in FIG. Figure 4 The chat interface 10 can be switched to the instant voice interface 12, such as Figure 4 As shown in (B), long pressing the microphone control (i.e., "press and hold to speak" 13) can trigger the microphone of the mobile phone to record the user's voice. When the mobile phone detects that the mobile phone is running application A and the user presses and holds "press and hold to speak", the mobile phone controls the microphone bias circuit of the mobile phone to power on the microphone with the operating voltage in low power mode (e.g., 1.8V operating voltage).
[0057] Optionally, in an embodiment of the present application, when the microphone has been powered on with a first voltage (i.e., the electronic device has enabled the voice wake-up function), if it is detected that the electronic device is running a target application and in the case of an instant voice sending operation in the target application, the electronic device determines the first voltage as the target voltage, that is, the operating voltage of the microphone in low power consumption mode is still determined as the target voltage, and the operating voltage in low power consumption mode is kept applied to the microphone.
[0058] It can be understood that when the microphone of an electronic device has been powered by the operating voltage in low power consumption mode, if the electronic device detects that the user is performing an instant voice sending operation in a target application, the microphone bias circuit of the electronic device is controlled to keep powering the microphone with the operating voltage in low power consumption mode. That is, there is no need to first control the microphone bias circuit of the electronic device to turn off to power on the microphone when the user is performing an instant voice sending operation in the target application, and then power on the microphone again with the voltage corresponding to the user operation, thereby keeping the voltage of the microphone in a stable state.
[0059] In an embodiment of the present application, when the microphone of an electronic device has been powered by the operating voltage in low power mode, if the electronic device detects an instant voice sending operation by the user in a target application, the microphone bias circuit of the electronic device can be controlled to keep the microphone powered by the operating voltage in low power mode, thereby avoiding the microphone bias circuit from switching the voltage back and forth to power the microphone, so that the voltage of the microphone is in a stable state, thereby ensuring that the electronic device records the complete voice.
[0060] Optionally, in the embodiment of the present application, the above step 202 can be specifically implemented by the following step 202b.
[0061] Step 202b: When the electronic device runs the target application and detects an operation of opening the instant voice sending interface in the target application, the electronic device applies a target voltage to the microphone.
[0062] In the embodiment of the present application, the target voltage is a second voltage, and the second voltage is an operating voltage of the microphone in a normal working mode.
[0063] In an embodiment of the present application, when the electronic device detects that the electronic device is running a target application and that an instant voice sending interface is turned on in the target application, the electronic device determines the second voltage (i.e., the operating voltage of the microphone in the normal working mode) as the target voltage, thereby controlling the microphone bias circuit of the electronic device to power on the microphone with the operating voltage in the normal working mode.
[0064] Optionally, in an embodiment of the present application, the operation of the user opening the instant voice sending interface in the target application can be an operation of the user opening a chat interface in the target application or an operation of opening the instant voice sending interface (i.e., switching the chat interface to the instant voice sending interface).
[0065] Optionally, in an embodiment of the present application, the chat interface includes a microphone icon, and the user can input (for example, click to input) the microphone icon to trigger the electronic device to switch the chat interface to an instant voice interface.
[0066] For example, after the user opens application A, he enters the chat interface 10 with contact B, such as Figure 4 As shown in (A), when the mobile phone detects that the user opens the chat interface 10 with contact B, the microphone bias circuit of the mobile phone is controlled to power on the microphone with the working voltage in the normal working mode (for example, 2.7V working voltage), or the user opens application A, enters the chat interface 10 with contact B, and clicks the microphone icon 11 in the lower left corner to switch the chat interface 10 to the instant voice interface 12, as shown in FIG. Figure 4 As shown in (B), at this time, the mobile phone detects that the user opens the instant voice sending interface 12, thereby controlling the microphone bias circuit of the mobile phone to power on the microphone with the working voltage in the normal working mode.
[0067] In an embodiment of the present application, when the electronic device detects that the user has not turned on the voice wake-up function and the user has turned on the instant voice sending interface in the target application, the electronic device can directly control the microphone bias circuit of the electronic device to power on the microphone with the operating voltage in the normal working mode, so that the voltage of the microphone is always in a stable state, thereby ensuring that the electronic device records the complete voice.
[0068] Optionally, in the embodiment of the present application, after the above step 202, the microphone control method provided in the embodiment of the present application further includes the following step 401.
[0069] Step 401: After detecting that the instant voice sending interface is closed, the electronic device keeps applying a target voltage to the microphone within a preset time period. If the instant voice sending interface is not opened within the preset time period, the electronic device stops applying voltage to the microphone.
[0070] In an embodiment of the present application, after the electronic device detects that a user has opened an instant voice sending interface in a target application and applies an operating voltage (i.e., a second voltage) in a normal working mode to the microphone, if it detects that the user has closed the instant voice sending interface, the target voltage is continued to be applied to the microphone for a preset time period.
[0071] It can be understood that after the electronic device detects that the user has closed the instant voice sending interface, the bias circuit of the microphone is controlled to continue to power on the microphone within a preset time period, so that when the user opens the instant voice sending interface again within the preset time period, the microphone bias circuit of the electronic device can be controlled to keep powering the microphone with the operating voltage in the normal working mode, without the need to power on the microphone again, so that the voltage of the microphone is always in a stable state.
[0072] Optionally, in an embodiment of the present application, the preset duration may be 5 seconds, 8 seconds, 10 seconds, etc., which is not limited in the embodiment of the present application.
[0073] In an embodiment of the present application, after the electronic device detects that the user has opened an instant voice sending interface in a target application, it controls the microphone bias circuit of the electronic device to power on the microphone with the operating voltage (i.e., the second voltage) in the normal working mode. If it is detected that the user has closed the instant voice sending interface and has not opened the instant voice sending interface again within a preset time period, the voltage is stopped from being applied to the microphone.
[0074] It can be understood that after the electronic device detects that the user closes the instant voice sending interface, the bias circuit that controls the microphone continues to power the microphone within a preset time. If the user does not open the instant voice sending interface again within the preset time, that is, does not return to the instant voice sending interface within the preset time, the microphone bias circuit that controls the electronic device stops powering the microphone.
[0075] In an embodiment of the present application, after the electronic device detects that the user closes the instant voice sending interface, the electronic device continues to apply the second voltage to the microphone within a preset time period, so that when the user opens the instant voice sending interface again within the preset time period, there is no need to re-apply the second voltage to the microphone, so that the voltage of the microphone is always in a stable state, thereby ensuring that the electronic device records the complete voice.
[0076] It should be noted that the microphone control method provided in the embodiment of the present application can be executed by an electronic device, a microphone control device, or a control module in a microphone control device. In the embodiment of the present application, an electronic device executing the microphone control method is taken as an example to illustrate the microphone control device provided in the embodiment of the present application.
[0077] Figure 5 FIG. 1 is a schematic diagram showing a possible structure of a microphone control device involved in an embodiment of the present application. Figure 5 As shown, the microphone control device 70 may include: a detection module 71 and a processing module 72 .
[0078] The detection module 71 is used to detect whether the electronic device is running a target application program. The processing module 72 is used to apply a target voltage to the microphone when the electronic device is running a target application program.
[0079] An embodiment of the present application provides a control device for a microphone. When the electronic device detects that the electronic device is running a target application, the target voltage is directly applied to the microphone instead of applying the voltage to the microphone when the microphone is in use. Therefore, when the electronic device powers on the microphone with the target voltage, the voltage of the microphone can be in a stable state, thereby avoiding the problem of noise generated when the electronic device records voice, and thus there is no need to intercept the recorded voice when storing the voice, thereby ensuring the integrity of the voice recorded by the electronic device.
[0080] In one possible implementation, the above-mentioned detection module 71 is also used to detect whether the electronic device has enabled the voice wake-up function before detecting whether the electronic device is running the target application; the detection module 71 is specifically used to detect whether the electronic device is running the target application when the voice wake-up function is not enabled.
[0081] In one possible implementation, the processing module 72 is specifically used to apply a target voltage to the microphone when the electronic device runs a target application and detects an instant voice sending operation in the target application. The target voltage is a first voltage, which is the operating voltage of the microphone in low power consumption mode.
[0082] In one possible implementation, the above-mentioned processing module 72 is specifically used to apply a target voltage to the microphone when the electronic device runs a target application and detects an operation of opening an instant voice sending interface in the target application. The target voltage is a second voltage, and the second voltage is the operating voltage of the microphone in normal working mode.
[0083] In one possible implementation, the processing module 72 is also used to, when the electronic device is running a target application, apply a target voltage to the microphone, and after detecting that the instant voice sending interface is closed, keep applying the target voltage to the microphone for a preset time period, and stop applying voltage to the microphone if the instant voice sending interface is not opened within the preset time period.
[0084] The control device of the microphone in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in an electronic device. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.
[0085] The control device of the microphone in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0086] The microphone control device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.
[0087] Alternatively, if Figure 6 As shown, an embodiment of the present application also provides an electronic device 900, including a processor 901 and a memory 902, wherein the memory 902 stores programs or instructions that can be executed on the processor 901, and when the program or instructions are executed by the processor 901, the various steps of the above-mentioned microphone control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described again here.
[0088] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0089] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0090] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.
[0091] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0092] The processor 110 is used to detect whether the electronic device is running a target application and to apply a target voltage to the microphone when the electronic device is running the target application.
[0093] An embodiment of the present application provides an electronic device. When the electronic device detects that the electronic device is running a target application, the electronic device directly applies a target voltage to the microphone instead of applying voltage to the microphone when the microphone is in use. Therefore, when the electronic device powers on the microphone with the target voltage, the voltage of the microphone can be in a stable state, thereby avoiding the problem of noise generated when the electronic device records voice, and thus there is no need to intercept the recorded voice when storing the voice, thereby ensuring the integrity of the voice recorded by the electronic device.
[0094] Optionally, the processor 110 is also used to detect whether the electronic device has a voice wake-up function enabled before detecting whether the electronic device is running a target application; the processor 110 is specifically used to detect whether the electronic device is running a target application when the voice wake-up function is not enabled.
[0095] Optionally, the processor 110 is specifically used to apply a target voltage to the microphone when the electronic device runs a target application and detects an instant voice sending operation in the target application. The target voltage is a first voltage, which is an operating voltage of the microphone in a low power consumption mode.
[0096] Optionally, the processor 110 is specifically used to apply a target voltage to the microphone when the electronic device runs a target application and detects an operation of opening an instant voice sending interface in the target application. The target voltage is a second voltage, and the second voltage is the operating voltage of the microphone in a normal operating mode.
[0097] Optionally, the processor 110 is also used to, when the electronic device is running a target application, apply a target voltage to the microphone, and after detecting that the instant voice sending interface is closed, keep applying the target voltage to the microphone for a preset time period, and stop applying voltage to the microphone if the instant voice sending interface is not opened within the preset time period.
[0098] The electronic device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0099] The beneficial effects of various implementations in this embodiment can be specifically referred to the beneficial effects of the corresponding implementations in the above method embodiment. To avoid repetition, they will not be described again here.
[0100] It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0101] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0102] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.
[0103] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0104] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0105] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0106] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0107] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the microphone control method embodiment as described above, and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0108] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0109] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0110] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for controlling a microphone, characterized in that: The method is applied to an electronic device including a microphone, and the method includes: When the voice wake-up function is not enabled on the electronic device, detecting whether the electronic device is running a target application; In the case where the electronic device runs the target application, applying a target voltage to the microphone, the target voltage being a second voltage, and the second voltage being an operating voltage of the microphone in a normal working mode; Wherein, the target application is an application with a voice recording function; The method further comprises: When the voice wake-up function is enabled on the electronic device and the target voltage is applied to the microphone, the target voltage is kept applied to the microphone, where the target voltage is a first voltage, and the first voltage is an operating voltage of the microphone in a low power consumption mode.
2. The method according to claim 1, characterized in that The step of applying a target voltage to the microphone when the electronic device runs the target application comprises: When the electronic device runs the target application and detects an instant voice sending operation in the target application, the target voltage is applied to the microphone, and the target voltage is the first voltage.
3. The method according to claim 1, characterized in that The step of applying a target voltage to the microphone when the electronic device runs the target application comprises: When the electronic device runs the target application and detects an operation of opening an instant voice sending interface in the target application, the target voltage is applied to the microphone, and the target voltage is the second voltage.
4. The method according to claim 3, characterized in that In the case where the electronic device runs the target application, after applying the target voltage to the microphone, the method further includes: After detecting that the instant voice sending interface is closed, the target voltage is applied to the microphone within a preset time period. If the instant voice sending interface is not opened within the preset time period, the voltage is stopped from being applied to the microphone.
5. A microphone control device, characterized in that: The device is applied to an electronic device including a microphone, and the control device of the microphone includes: a detection module and a processing module; The detection module is used to detect whether the electronic device is running a target application when the voice wake-up function is not enabled on the electronic device; The processing module is used to apply a target voltage to the microphone when the electronic device runs the target application, wherein the target voltage is a second voltage, and the second voltage is an operating voltage of the microphone in a normal working mode; Wherein, the target application is an application with a voice recording function; The processing module is also used to keep applying the target voltage to the microphone when the voice wake-up function is enabled in the electronic device and the target voltage is applied to the microphone, wherein the target voltage is a first voltage and the first voltage is an operating voltage of the microphone in a low power consumption mode.
6. The device according to claim 5, characterized in that The processing module is specifically configured to apply the target voltage to the microphone when the electronic device runs the target application and detects an instant voice sending operation in the target application, and the target voltage is the first voltage.
7. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the microphone control method as claimed in any one of claims 1 to 4.
8. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, the steps of the microphone control method according to any one of claims 1 to 4 are implemented.
