Method and system for detecting microphone audio control computer screen turn-off
By detecting the amplitude changes of the microphone audio digital signal, judging the mute state and sending the corresponding instructions, solved the problem of the computer's inability to breathe the screen when the invalid sound data input, and realized the energy consumption saving and real -time data transmission.
Patent Information
- Application Number
- CN202411301129.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-21
AI Technical Summary
When the microphone uses HID to transmit data in real time, and lacks effective sound data input, the computer cannot enter the screen-off mode, resulting in increased energy consumption.
By acquiring external sound signals, converting them into audio digital signals, and detecting amplitude changes of the signals, it is determined whether the microphone is in a mute state. If it is in a mute state, send a data transmission shutdown command to trigger the computer to pause the screen.
When there is no valid sound data input, intelligently adjusts the computer interest screen, saves energy, and ensures that the microphone can transmit effective sound data in real time.
Smart Images

Figure CN119336396A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of audio technology, and in particular to a method and system for detecting microphone audio to control computer screen off. Background Art
[0002] In current computer audio processing and interactive technology, microphones are used as core input devices in a wide range of fields, including voice communication, voice recognition, and audio recording. At present, when microphones use HID to transmit data in real time, in order to ensure the real-time nature of data transmission, the microphones need to remain on. However, even when there is no effective sound data input, that is, when there is noise, the microphones will continue to send weak level signals to the computer or remain connected, preventing the computer from entering the screen-off mode, thereby increasing the computer's energy consumption.
[0003] The traditional way is to directly close the data transmission channel that sends data from the microphone to the host computer, so that the computer enters the screen-off mode. However, after the data transmission channel is closed, the data obtained by the real-time monitoring function of the microphone cannot be synchronously displayed on the user interface of the host computer in real time, resulting in the user being unable to know the real-time status of the microphone in time when needed, and the data transmission channel needs to be manually opened again after closing, which is very unintelligent.
[0004] Therefore, there is an urgent need to provide a method and system for detecting microphone audio to control computer screen off, so as to solve the above problems. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings and defects of the prior art and to provide a method and system for detecting microphone audio to control computer screen off, so as to ensure that the microphone can transmit effective sound data in real time and synchronously update the display on the upper computer user interface, while intelligently adjusting the computer screen off to save energy when there is no effective sound data input.
[0006] The objective of the present invention is achieved through the following technical solutions:
[0007] A method for detecting microphone audio to control computer screen off includes the following steps:
[0008] S1, obtaining an external sound signal and converting the sound signal into an audio digital signal;
[0009] S2, detecting the audio digital signal, determining whether the audio digital signal has an amplitude change, and determining whether it is in a mute state according to the amplitude change; if it is in a mute state, determining again whether it is in a use state, and outputting the determination result to the host computer;
[0010] S3. After receiving the judgment result, the host computer sends a data transmission closing instruction or a data transmission opening instruction to the microphone according to the judgment result. When the instruction sent by the host computer is a data transmission closing instruction, the computer screen is off. When the instruction sent by the host computer is a data transmission opening instruction, the computer screen is always on.
[0011] As a preferred technical solution of the present invention, in step S2, a voice endpoint detection algorithm is used to determine whether the audio digital signal has an amplitude change; and an environmental noise detection algorithm is used to determine whether the microphone is in use.
[0012] As a preferred technical solution of the present invention, when there is no amplitude change in the audio digital signal, it is determined that the microphone is in a mute state, and the MCU control chip sends a first control instruction to the host computer;
[0013] When the audio digital signal has an amplitude change, the microphone is determined to be in a non-mute state. When the microphone is in use, the MCU control chip sends a second control instruction to the upper computer; when the microphone is not in use, the MCU control chip sends a first control instruction to the upper computer;
[0014] When the host computer receives the first control instruction, it sends a data transmission closing instruction to the microphone; when the host computer receives the second control instruction, it sends a data transmission opening instruction to the microphone.
[0015] As a preferred technical solution of the present invention, when the microphone is in use, the detected audio is human voice, and when the microphone is not in use, the detected audio is noise.
[0016] As a preferred technical solution of the present invention, in step S3, when the instruction sent by the host computer is an instruction to close data transmission, the screen is automatically turned off according to the time set by the user.
[0017] The present invention also provides a system for detecting microphone audio and controlling a computer screen off, comprising:
[0018] A sound pickup unit for acquiring external sound signals;
[0019] An ADC conversion module converts the sound signal into an audio digital signal;
[0020] The MCU control module is used to process the audio digital signal and output the first control instruction or the second control instruction to the host computer;
[0021] The host computer receives the first control instruction or the second control instruction, and sends a data transmission closing instruction or a data transmission opening instruction to the microphone according to the first control instruction or the second control instruction. When the instruction sent by the host computer is the data transmission closing instruction, the computer screen is controlled to be off, and when the instruction sent by the host computer is the data transmission opening instruction, the computer screen is always on.
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] The present invention detects the captured audio digital signal in real time to determine whether the microphone is in a mute state and whether it is in use when in a mute state. When the microphone is in a mute state or not in use, the data transmission channel between the host computer and the microphone is closed. After closing the data transmission channel, the computer screen is turned off, so that when there is no valid sound data input, the computer enters the screen-off mode to save energy. When the microphone is in use, the computer screen remains always on, and the host computer and the microphone transmit data normally. The present invention ensures that the microphone can transmit valid sound data in real time and synchronously update the display on the host computer user interface, and can also intelligently adjust the computer screen to save energy when there is no valid sound data input. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 The figure is a flow chart of the method of the present invention.
[0025] Figure 2 It is a system block diagram of the present invention. DETAILED DESCRIPTION
[0026] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.
[0027] The present invention is used to close the data transmission channel between the microphone and the host computer when it is detected that the microphone is in a mute state or is not in use, and trigger the screen off function of the computer to save energy.
[0028] The specific implementation process of the present invention is as follows:
[0029] Reference Figure 1 , a method for detecting microphone audio to control computer screen off, comprising the following steps:
[0030] S1, the microphone captures the sound signal in the surrounding environment and converts the sound signal into an audio digital signal, and then processes the captured audio digital signal through step S2;
[0031] S2. Use a voice endpoint detection algorithm to detect the audio digital signal, determine the starting point and ending point of the voice, distinguish between voice signals and non-voice signals, distinguish between light sounds and mixed sounds by analyzing the energy of the signal, the change of short-time energy, the zero-crossing rate, the spectrum characteristics, etc., and use a neural network-based VAD method to achieve high-precision voice and non-voice judgment. Preliminary judgment of whether the microphone is in a silent state is made based on the amplitude change of the detected audio digital signal. When it is detected that the audio digital signal has no significant amplitude change or the amplitude change is low and stable within a period of time, it is judged to be in a silent state; when the signal amplitude fluctuates greatly, it is judged to be in a non-silent state. For the audio digital signal preliminarily judged to be in a non-silent state, an environmental noise detection algorithm is further used to determine whether the microphone is in use. If it is in use, the detected audio is human voice, and if it is not in use, the detected audio is noise. When the judgment result is that the microphone is in a silent state and not in use, the MCU control chip sends a first control instruction to the host computer, and when the judgment result is that the microphone is in use, the MCU control chip sends a second control instruction to the host computer.
[0032] S3. When the host computer receives the first control instruction, it sends a data transmission closing instruction to the microphone, and then the computer automatically turns off the screen; when the host computer receives the second control instruction, it sends a data transmission opening instruction to the microphone, and the computer screen is always on to ensure normal data transmission with the microphone. This solves the problem that when the microphone uses the HID protocol to transmit data with the host computer in real time, the computer continues to maintain the screen-on mode and consumes energy when there is no valid sound data input. The microphone and the host computer can also use USB, Bluetooth and other transmission methods to meet the needs of different application scenarios.
[0033] When the computer receives the first control instruction and sends a data transmission shutdown instruction to the microphone, the computer automatically turns off the screen. At the same time, the microphone continues to capture sound signals in real time and performs real-time detection on the captured sound signals. When a valid audio digital signal is detected, the MCU control chip sends the first control instruction to the host computer. After the host computer receives the first control instruction, it sends a data transmission startup instruction to the microphone to wake up the computer screen and restore normal data interaction between the host computer and the microphone. This effectively avoids the situation where the computer is in the screen-off state and valid sound data cannot be synchronously transmitted to the host computer in real time.
[0034] In an embodiment of the present invention, it is also possible to determine whether the microphone is in use based on the level of the audio digital signal. When it is detected that the received audio digital signal is in a mute state, the DSP signal processing module outputs a low-level signal, and the MCU control chip receives the low-level signal and uses the HID protocol to send a first control instruction to the host computer; when it is detected that the received audio digital signal is in a non-mute state, the ambient noise detection algorithm is used to detect whether the microphone is in use. If it is in use, the DSP signal processing module outputs a high-level signal, and if it is not in use, the DSP signal processing module outputs a low-level signal, and the MCU control chip receives the high-level signal and sends a second control instruction to the host computer.
[0035] In an embodiment of the present invention, when the microphone is not in a muted state, the detected audio is determined to be human voice or noise by analyzing the audio features. When the audio fluctuations of the audio digital signal detected by the microphone conform to the frequency range, volume changes, and harmonic structure unique to the human voice, it can be determined that the microphone is currently in use, that is, someone is making a voice call, recording, or other forms of voice interaction through the microphone. When the microphone detects that the audio signal has fluctuations, but the fluctuations are weak and regular, and conform to the characteristics of environmental noise such as wind, traffic, and electrical noise, it is identified as noise. Although it is detected, it does not mean that it is in use.
[0036] In an embodiment of the present invention, the user can customize the automatic screen-off time of the computer. After the host computer sends a command to turn off data transmission to the microphone, the computer automatically turns off the screen at the set time.
[0037] Reference Figure 2The present invention discloses a system for detecting microphone audio and controlling the computer screen off, which includes a sound pickup unit, an ADC conversion module, an MCU control module, and a host computer. The sound pickup unit is used to obtain external sound signals in real time and send them to the ADC conversion module synchronously; the ADC conversion module is used to convert the sound signals into audio digital signals for processing by the MCU control module; the MCU control module detects the audio digital signals through a voice endpoint detection algorithm to determine whether the microphone is in a mute state. When it is in a mute state, a first control instruction is sent to the host computer; when it is not in a mute state, an ambient noise detection algorithm is used to detect the audio digital signal again to determine whether the microphone is in use. When it is not in use, a first control instruction is sent to the host computer, and when it is in use, a second control instruction is sent to the host computer. The host computer is used to receive the first control instruction or the second control instruction, and sends a data transmission off instruction to the microphone according to the first control instruction received, and sends a data transmission on instruction to the microphone according to the second control instruction received. When the instruction sent by the host computer is a data transmission off instruction, the computer screen is controlled to be off; when the instruction sent by the host computer is a data transmission on instruction, the computer screen remains on until the first control instruction is received. After the computer screen is turned off, when it receives the second control command, the computer will be awakened again.
[0038] The present invention ensures that the microphone can transmit effective sound data in real time and synchronously update and display it on the upper computer user interface, and can also intelligently adjust the computer screen to turn off to save energy when there is no effective sound data input.
[0039] The above-mentioned embodiments only express the implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
Claims
1. A method for detecting microphone audio to control computer screen off, characterized in that: The steps include: S1, obtaining an external sound signal and converting the sound signal into an audio digital signal; S2, detecting the audio digital signal, determining whether the audio digital signal has an amplitude change, and determining whether it is in a mute state according to the amplitude change; if it is in a mute state, determining again whether it is in a use state, and outputting the determination result to the host computer; S3. After receiving the judgment result, the host computer sends a data transmission closing instruction or a data transmission opening instruction to the microphone according to the judgment result. When the instruction sent by the host computer is a data transmission closing instruction, the computer screen is off. When the instruction sent by the host computer is a data transmission opening instruction, the computer screen is always on.
2. The method for controlling the computer screen off by detecting microphone audio according to claim 1, characterized in that: In step S2, a voice endpoint detection algorithm is used to determine whether the audio digital signal has an amplitude change; and an environmental noise detection algorithm is used to determine whether the microphone is in use.
3. The method for controlling the computer screen off by detecting microphone audio according to claim 2, characterized in that: When there is no amplitude change in the audio digital signal, the microphone is determined to be in a mute state, and the MCU control chip sends a first control instruction to the host computer; When the audio digital signal has an amplitude change, the microphone is determined to be in a non-mute state. When the microphone is in use, the MCU control chip sends a second control instruction to the upper computer; when the microphone is not in use, the MCU control chip sends a first control instruction to the upper computer; When the host computer receives the first control instruction, it sends a data transmission closing instruction to the microphone; when the host computer receives the second control instruction, it sends a data transmission opening instruction to the microphone.
4. The method for controlling the computer screen off by detecting microphone audio according to claim 3, characterized in that: When the microphone is in use, the detected audio is human voice; when the microphone is not in use, the detected audio is noise.
5. The method for controlling the computer screen off by detecting microphone audio according to claim 1, characterized in that: In step S3, when the instruction sent by the host computer is an instruction to close data transmission, the screen is automatically turned off according to the time set by the user.
6. A system for detecting microphone audio and controlling computer screen-off according to any one of claims 1 to 5, characterized in that: include: A sound pickup unit for acquiring external sound signals; An ADC conversion module converts the sound signal into an audio digital signal; The MCU control module is used to process the audio digital signal and output the first control instruction or the second control instruction to the host computer; The host computer receives the first control instruction or the second control instruction, and sends a data transmission closing instruction or a data transmission opening instruction to the microphone according to the first control instruction or the second control instruction. When the instruction sent by the host computer is the data transmission closing instruction, the computer screen is controlled to be off, and when the instruction sent by the host computer is the data transmission opening instruction, the computer screen is always on.
