TWS earphone control method and device, equipment and storage medium
By automatically selecting the headphones with more sufficient battery as the main headphones and controlling the status of the microphone and noise reduction modules according to the noise signal conditions, the problem of selecting and controlling the main headphones in TWS headphones is solved, and the battery life and control efficiency are improved.
Patent Information
- Application Number
- CN202411672849.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-11-21
AI Technical Summary
There are problems with how to choose the main headset and how to control the microphone and noise reduction module of the main headset in TWS headset, resulting in a shorter battery life and an increased user operation burden.
By obtaining the signal strength and power information of the TWS headset, the headset with more sufficient power is automatically selected as the main headset, and when the microphone and noise reduction module are in the off state, switch their state according to the noise signal conditions, and switch from standby state to working state.
It improves the battery life of the main headset, reduces the control time of the microphone and noise reduction module, improves control efficiency, and simplifies user operation.
Smart Images

Figure CN119172688A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of audio technology, and in particular to a TWS headset control method, device, equipment and storage medium. Background Art
[0002] TWS earphones, short for True Wireless Stereo earphones, are an audio device designed with the latest Bluetooth wireless technology. In the design of TWS earphones, the left earphone and the right earphone each play an important role. They not only have the ability to receive and play audio signals, but also can achieve synchronous transmission of audio signals wirelessly, thus bringing users an immersive stereo experience.
[0003] In addition, for compatibility and user habits, manufacturers usually set the right earphone in the TWS headset as the main earphone. When the right earphone is used as the main earphone, its power consumption tends to be faster than the left earphone as the secondary earphone, because the main earphone needs to undertake more data transmission and processing tasks. If the power of the right earphone is lower than that of the left earphone, this may cause the battery life of the main earphone to be shortened, thus affecting the overall user experience. Therefore, how to choose the main earphone between the right and left earphones of the TWS headset is an urgent problem to be solved.
[0004] In addition, the main earphone integrates a microphone and a noise reduction module, and the existing control process of the microphone and noise reduction module relies on manual control. Since the manual control method requires the user to perform a series of complex operations, such as long press, short press, or specific touch gestures, to activate or adjust the microphone and noise reduction functions of the main earphone, these operation steps require the user to remember them accurately, which increases the user's operation burden and reduces the convenience of controlling the microphone and noise reduction module. Therefore, how to control the microphone and noise reduction module of the main earphone is also a problem that needs to be solved urgently.
[0005] To sum up, how to select the main earphone between the right earphone and the left earphone of the TWS earphone, and how to control the microphone and noise reduction module of the main earphone are problems that need to be solved urgently. Summary of the invention
[0006] The present invention provides a TWS headset control method, device, terminal equipment and storage medium to solve the problem of how to select a main headset between the right headset and the left headset of the TWS headset, and how to control the microphone and noise reduction module of the main headset.
[0007] In a first aspect, a TWS headset control method is provided, which is applied to a terminal device, the terminal device is connected to a TWS headset, the TWS headset includes a left headset and a right headset, including: During a call, obtain the signal strength of the TWS headset connected to the headset; When the signal strength is greater than a preset strength, obtaining the power information of the TWS headset; From the power information, obtain the power of the left earphone and the power of the right earphone; When the power level of the left earphone is greater than that of the right earphone, the left earphone is selected as the main earphone; when the power level of the left earphone is less than that of the right earphone, the right earphone is selected as the main earphone; Acquire the current state of the microphone of the master headset, and when the current state of the microphone is an off state, control the microphone to switch from the off state to an on state; The sound signal collected by the microphone in the turned-on state is obtained, and a noise signal in the sound signal is obtained. When the noise signal meets the noise reduction condition, the noise reduction module is controlled to switch from the standby state to the working state.
[0008] The step of acquiring the sound signal collected by the microphone in the turned-on state, acquiring the noise signal in the sound signal, and controlling the noise reduction module to switch from the standby state to the working state when the noise signal meets the noise reduction condition includes: Sending a second acquisition instruction to the master earphone, where the second acquisition instruction is an instruction for acquiring a current state of the noise reduction module; Receiving the current state of the noise reduction module returned by the master headset according to the second acquisition instruction; When the current state of the noise reduction module is the standby state, acquiring the sound signal collected by the microphone in the turned-on state; Acquire a speech signal and a noise signal in the sound signal, and save the speech signal and the noise signal; When the noise signal meets the noise reduction condition, a second control instruction is sent to the main earphone, so that the main earphone controls the noise reduction module to switch from the standby state to the working state according to the second control instruction, and the second control instruction is an instruction to control the noise reduction module to switch from the standby state to the working state.
[0009] Further, when the signal strength is greater than a preset strength, obtaining the power information of the TWS headset includes: When the signal strength is greater than the preset strength, a read request is sent to the TWS headset, where the read request carries a power level indicator; Receive the power information returned by the TWS headset according to the power identifier.
[0010] Further, obtaining the power of the left earphone and the power of the right earphone in the power information includes: Get read instructions; The read instruction is executed to read the power level of the left earphone and the power level of the right earphone from the power level information.
[0011] Further, when the power of the left earphone is greater than the power of the right earphone, the left earphone is selected as the main earphone, and when the power of the left earphone is less than the power of the right earphone, the right earphone is selected as the main earphone, including: When the power of the left earphone is greater than the power of the right earphone, a first selection instruction is sent to the TWS earphone, so that the TWS earphone selects the left earphone as the main earphone according to the first selection instruction, and the first selection instruction is an instruction to select the left earphone as the main earphone; When the power of the left earphone is less than the power of the right earphone, a second selection instruction is sent to the TWS earphone, so that the TWS earphone selects the right earphone as the main earphone according to the second selection instruction, and the second selection instruction is an instruction to select the right earphone as the main earphone.
[0012] Further, the obtaining of the current state of the microphone of the master headset, when the current state of the microphone is an off state, controlling the microphone to switch from the off state to an on state, includes: Sending a first acquisition instruction to the master earphone, where the first acquisition instruction is an instruction for acquiring a current state of the microphone; Receive the current state of the microphone returned by the main earphone according to the first acquisition instruction, and when the current state of the microphone is an off state, send a first control instruction to the main earphone, so that the main earphone controls the microphone to switch from the off state to the on state according to the first control instruction, and the first control instruction is an instruction to control the microphone to switch from the off state to the on state.
[0013] Further, the acquiring of the sound signal collected by the microphone in the turned-on state, acquiring the noise signal in the sound signal, and when the noise signal satisfies the noise reduction condition, controlling the noise reduction module to switch from the standby state to the working state includes: Sending a second acquisition instruction to the master earphone, where the second acquisition instruction is an instruction for acquiring a current state of the noise reduction module; receiving the current state of the noise reduction module returned by the main headset according to the second acquisition instruction; when the current state of the noise reduction module is the standby state, acquiring the sound signal collected by the microphone in the turned-on state; Acquire a speech signal and a noise signal in the sound signal, and save the speech signal and the noise signal; When the noise signal meets the noise reduction condition, a second control instruction is sent to the main earphone, so that the main earphone controls the noise reduction module to switch from the standby state to the working state according to the second control instruction, and the second control instruction is an instruction to control the noise reduction module to switch from the standby state to the working state.
[0014] Exemplarily, acquiring a speech signal and a noise signal in the sound signal, and saving the speech signal and the noise signal, includes: Uploading the sound signal and an instruction to a server, wherein the instruction is used to instruct the first server to perform blind source separation processing on the sound signal to obtain a speech signal and a noise signal; Acquire the voice signal and the noise signal returned by the server according to the instruction, and calculate the signal-to-noise ratio between the voice signal and the noise signal; When the signal-to-noise ratio between the speech signal and the noise signal is less than a preset signal-to-noise ratio, the speech signal and the noise signal are saved.
[0015] Furthermore, when the noise signal satisfies the noise reduction condition, sending a second control instruction to the master earphone includes: Obtaining a comprehensive evaluation coefficient of the noise signal through a predefined acquisition method; When the comprehensive evaluation coefficient is greater than the preset coefficient, it is determined that the noise signal meets the noise reduction condition, and a second control instruction is sent to the main earphone.
[0016] Exemplarily, obtaining the comprehensive evaluation coefficient of the noise signal by a predefined acquisition method includes: Obtaining the start time and the end time of the noise signal, determining the duration of the noise signal according to the start time and the end time, and comparing the duration with a preset duration to generate a first ratio; Acquire multiple amplitude values of the linear amplitude spectrum of the noise signal, select the maximum value among the multiple amplitude values as the maximum amplitude value, compare the maximum amplitude value with the preset amplitude value, and generate a second ratio; Acquire multiple frequencies of the linear amplitude spectrum of the noise signal, select a maximum value among the multiple frequencies as a maximum frequency, compare the maximum frequency with a preset frequency, and generate a third ratio; The first ratio, the second ratio, and the third ratio are added together to generate a comprehensive evaluation coefficient of the noise signal.
[0017] Optionally, obtaining the start time and the end time of the noise signal, determining the duration of the noise signal according to the start time and the end time, and comparing the duration with a preset duration to generate a first ratio, includes: Obtaining the start time and end time of the noise signal, determining the duration of the noise signal according to the start time and the end time, comparing the duration with a preset duration to generate an initial ratio, and determining whether the initial ratio is greater than a preset maximum ratio; When the initial ratio is greater than a preset maximum ratio, the initial ratio is multiplied by a magnification coefficient to generate the amplified initial ratio, and the amplified initial ratio is selected as the first ratio.
[0018] The method of obtaining a plurality of amplitude values of the linear amplitude spectrum of the noise signal, selecting a maximum value among the plurality of amplitude values as a maximum amplitude value, and comparing the maximum amplitude value with a preset amplitude value to generate a second ratio includes: Performing Fourier transform on the noise signal to obtain a linear amplitude spectrum of the noise signal; A plurality of amplitude values of the linear amplitude spectrum of the noise signal is obtained, a maximum value among the plurality of amplitude values is selected as a maximum amplitude value, and the maximum amplitude value is compared with a preset amplitude value to generate a second ratio.
[0019] wherein, a plurality of frequencies of the linear amplitude spectrum of the noise signal are obtained, a maximum value among the plurality of frequencies is selected as a maximum frequency, and the maximum frequency is compared with a preset frequency to generate a third ratio; Acquire multiple frequencies of the linear amplitude spectrum of the noise signal, and sort the multiple frequencies; According to the sorting result, a maximum value among the multiple frequencies is selected as the maximum frequency, and the maximum frequency is compared with a preset frequency to generate a third ratio.
[0020] Optionally, adding the first ratio, the second ratio, and the third ratio to generate a comprehensive evaluation coefficient of the noise signal includes: According to a preset generation model, the first ratio, the second ratio, and the third ratio are added to generate a comprehensive evaluation coefficient of the noise signal.
[0021] Wherein, the generation model is: E = E1×M1+ E2×M2+ E3×M3; Among them, E is the comprehensive evaluation coefficient, E1 is the first ratio, M1 is the first weight coefficient; E2 is the second ratio, M2 is the second weight coefficient; E3 is the third ratio, M3 is the third weight coefficient, and the sum of M1, M2 and M3 is 1.
[0022] Exemplarily, when the comprehensive evaluation coefficient is greater than a preset coefficient, it is determined that the noise signal meets the noise reduction condition, and a second control instruction is sent to the main earphone, including: When the comprehensive evaluation coefficient is greater than a preset coefficient, obtaining the transmission delay of the master earphone; When the transmission delay is less than the preset delay, a second control instruction is sent to the master earphone.
[0023] In a second aspect, a TWS headset control device is provided, which is applied to a terminal device, the terminal device is connected to a TWS headset, and the TWS headset includes a left headset and a right headset, including: A first acquisition module is used to obtain the signal strength connected to the TWS headset during a call; A second acquisition module, used for acquiring the power information of the TWS headset when the signal strength is greater than a preset strength; A third acquisition module, configured to acquire the power of the left earphone and the power of the right earphone from the power information; A selection module, configured to select the left earphone as the main earphone when the power level of the left earphone is greater than that of the right earphone, and select the right earphone as the main earphone when the power level of the left earphone is less than that of the right earphone; A first control module, used for obtaining a current state of the microphone of the master headset, and when the current state of the microphone is an off state, controlling the microphone to switch from the off state to an on state; The second control module is used to obtain the sound signal collected by the microphone in the turned-on state, obtain the noise signal in the sound signal, and when the noise signal meets the noise reduction condition, control the noise reduction module to switch from the standby state to the working state.
[0024] In a third aspect, a terminal device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned TWS headset control method when executing the computer program.
[0025] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned TWS headset control method are implemented.
[0026] The present application provides a TWS headset control method, device, terminal device and storage medium, which have beneficial effects in two aspects. On the one hand, when the power of the left earphone is greater than that of the right earphone, the left earphone is selected as the main earphone, and when the power of the left earphone is less than that of the right earphone, the right earphone is selected as the main earphone, which solves the problem of how to select the main earphone between the right earphone and the left earphone of the TWS headset, which is beneficial to improving the battery life of the selected main earphone; on the other hand, the current state of the microphone of the main earphone is obtained, and when the current state of the microphone is the off state, the microphone is controlled to switch from the off state to the on state; the sound signal collected by the microphone in the on state is obtained, and the noise signal in the sound signal is obtained. When the noise signal meets the noise reduction condition, the noise reduction module is controlled to switch from the standby state to the working state, which solves the problem of how to control the microphone and the noise reduction module of the main earphone. Since there is no need to manually control the microphone and the noise reduction module, the control time of the microphone and the noise reduction module is reduced, which is beneficial to improving the control efficiency of the microphone and the noise reduction module. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0028] Figure 1 is a schematic diagram of an application environment of a TWS headset control method in one embodiment of the present invention; Figure 2 A schematic diagram of a flow chart of a TWS headset control method provided by an embodiment of the present invention; Figure 3 yes Figure 1 A schematic flow chart of a specific implementation of step S23; Figure 4 yes Figure 1 A schematic flow chart of a specific implementation of step S25; Figure 5 yes Figure 1 A schematic flow chart of a specific implementation of step S26; Figure 6 Schematic diagram of a TWS headset control device in one embodiment of the present invention. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments.
[0030] See also Figure 1 , Figure 1 : is a schematic diagram of an application environment of a TWS headset control method according to an embodiment of the present invention. The TWS headset control method provided by the embodiment of the present invention can be applied in the following embodiments: Figure 1 In the application environment, the terminal device communicates with the TWS headset via Bluetooth.
[0031] During a call, the terminal device obtains the signal strength of the TWS headset; When the signal strength is greater than a preset strength, obtaining the power information of the TWS headset; From the power information, obtain the power of the left earphone and the power of the right earphone; When the power level of the left earphone is greater than that of the right earphone, the left earphone is selected as the main earphone; when the power level of the left earphone is less than that of the right earphone, the right earphone is selected as the main earphone; Acquire the current state of the microphone of the master headset, and when the current state of the microphone is an off state, control the microphone to switch from the off state to an on state; The sound signal collected by the microphone in the turned-on state is obtained, and a noise signal in the sound signal is obtained. When the noise signal meets the noise reduction condition, the noise reduction module is controlled to switch from the standby state to the working state.
[0032] Among them, terminal devices may include but are not limited to smartphones, laptops, tablets and portable wearable devices.
[0033] The present application provides a TWS headset control method, device, terminal device and storage medium, which have beneficial effects in two aspects. On the one hand, it solves the problem of how to select a main earphone between the right earphone and the left earphone of the TWS headset, which is beneficial to improving the battery life of the selected main earphone; on the other hand, it solves the problem of how to control the microphone and noise reduction module of the main earphone. Since there is no need to manually control the microphone and noise reduction module, the control time of the microphone and noise reduction module is reduced, which is beneficial to improving the control efficiency of the microphone and noise reduction module.
[0034] See also Figure 2 , Figure 2 A schematic diagram of a flow chart of a TWS headset control method provided by an embodiment of the present invention, Figure 2The TWS headset control method is applied to a terminal device, the terminal device is connected to a TWS headset, the TWS headset includes a left headset and a right headset, and the TWS headset control method includes the following steps: S21, during a call, obtaining a signal strength of the TWS headset; The terminal device here refers to the subject, which is used to perform the signal strength acquisition operation. The TWS headset is a wireless headset device that establishes a connection with the terminal device through Bluetooth technology, and is the object of signal strength measurement, that is, the object.
[0035] Among them, when the terminal device successfully establishes a Bluetooth connection with the TWS headset, during the call, the terminal device will monitor the signal strength between the TWS headset and the terminal device in real time through its built-in Bluetooth chip or module. This process is usually automatic and does not require manual intervention by the user. The Bluetooth chip sends signals to the Bluetooth headset at a certain frequency and receives its response. By measuring the strength of the response signal, the current signal strength is calculated to ensure the stability of the Bluetooth connection.
[0036] S22, when the signal strength is greater than a preset strength, obtaining power information of the TWS headset; Among them, signal strength is an important indicator to measure the connection quality. When the signal strength is greater than the preset strength, the power information of the TWS headset is obtained. This step effectively avoids the failure or error in obtaining power information due to unstable signals, and improves the accuracy and reliability of the obtained TWS headset power information.
[0037] Wherein, when the signal strength is greater than a preset strength, obtaining the power information of the TWS headset includes: When the signal strength is greater than the preset strength, a read request is sent to the TWS headset, where the read request carries a power level indicator; Receive the power information returned by the TWS headset according to the power identifier.
[0038] When the signal strength is greater than a preset strength, the terminal device sends a read request to the TWS headset, where the read request carries a power level indicator; The TWS headset receives the read request and returns the power information to the terminal device based on the power indicator in the read request.
[0039] The terminal device receives the power information returned by the TWS headset according to the power identifier.
[0040] Among them, receiving the power information returned by the TWS headset according to the power identifier provides the terminal device with instant power status feedback, so that the terminal device can understand the usage of the TWS headset at any time, avoiding call interruption due to power exhaustion.
[0041] S23, acquiring the power of the left earphone and the power of the right earphone from the power information; S24, when the power level of the left earphone is greater than the power level of the right earphone, select the left earphone as the main earphone; when the power level of the left earphone is less than the power level of the right earphone, select the right earphone as the main earphone; Among them, the terminal device can select the earphone with more power as the main earphone by comparing the power of the left earphone and the power of the right earphone, which can increase the battery life of the main earphone and thus improve the overall user experience. In addition, using the main earphone for calls can ensure that the call will not be interrupted due to insufficient earphone power during the call, thereby extending the overall call time. In addition, the earphone with low power may cause unstable Bluetooth connection due to reduced battery performance. Selecting the earphone with sufficient power as the main earphone can ensure the stability of the Bluetooth connection and thus improve the call quality.
[0042] Wherein, when the power of the left earphone is greater than the power of the right earphone, selecting the left earphone as the main earphone, and when the power of the left earphone is less than the power of the right earphone, selecting the right earphone as the main earphone, includes: When the power of the left earphone is greater than the power of the right earphone, a first selection instruction is sent to the TWS earphone, so that the TWS earphone selects the left earphone as the main earphone according to the first selection instruction, and the first selection instruction is an instruction to select the left earphone as the main earphone; When the power of the left earphone is less than the power of the right earphone, a second selection instruction is sent to the TWS earphone, so that the TWS earphone selects the right earphone as the main earphone according to the second selection instruction, and the second selection instruction is an instruction to select the right earphone as the main earphone.
[0043] S25, obtaining a current state of the microphone of the master headset, and when the current state of the microphone is an off state, controlling the microphone to switch from the off state to an on state; Among them, the microphone is switched from the off state to the on state, and the microphone of the main earphone is turned on, so that the voice of the user of the main earphone can be transmitted to the other party in real time to complete two-way voice communication.
[0044] S26, obtaining the sound signal collected by the microphone in the turned-on state, obtaining the noise signal in the sound signal, and when the noise signal meets the noise reduction condition, controlling the noise reduction module to switch from the standby state to the working state.
[0045] Among them, the noise reduction module has a standby state and a working state.
[0046] The standby state refers to a state in which the noise reduction module does not perform noise reduction processing.
[0047] When the noise reduction module enters the standby state, no noise reduction processing is performed to reduce power consumption.
[0048] The working state refers to the state in which the noise reduction module performs noise reduction processing.
[0049] When the noise reduction module enters the working state, it will capture and analyze the noise in the surrounding environment, and then generate reverse sound waves to offset it to achieve the noise reduction effect. Among them, it is determined that the noise signal meets the noise reduction conditions, and a second control instruction is sent to the main earphone, which is conducive to the main earphone to control the noise reduction module to switch from standby mode to working mode in time, so that the noise in the call environment can be quickly identified, and suppression measures can be automatically taken to minimize these unnecessary noises. This process not only enhances the dominant position of the human voice, making the voices of both parties in the call clearer and more natural, but also greatly improves the overall quality of the call. Even in a complex noise environment, it can ensure the smoothness and coherence of the call, thereby bringing users a more pleasant and efficient communication experience.
[0050] Wherein, when the noise signal meets the noise reduction condition, sending a second control instruction to the master earphone includes: Obtaining a comprehensive evaluation coefficient of the noise signal through a predefined acquisition method; When the comprehensive evaluation coefficient is greater than the preset coefficient, it is determined that the noise signal meets the noise reduction condition, and a second control instruction is sent to the main earphone.
[0051] Among them, by comparing the comprehensive evaluation coefficient of the noise signal with the preset coefficient, the comprehensive characteristics of the noise signal can be verified, and errors and uncertainties can be reduced, which is conducive to enhancing the recognition ability of the noise signal and improving the recognition accuracy of the noise signal.
[0052] Exemplarily, obtaining the comprehensive evaluation coefficient of the noise signal by a predefined acquisition method includes: Obtaining the start time and the end time of the noise signal, determining the duration of the noise signal according to the start time and the end time, and comparing the duration with a preset duration to generate a first ratio; Acquire multiple amplitude values of the linear amplitude spectrum of the noise signal, select the maximum value among the multiple amplitude values as the maximum amplitude value, compare the maximum amplitude value with the preset amplitude value, and generate a second ratio; Acquire multiple frequencies of the linear amplitude spectrum of the noise signal, select a maximum value among the multiple frequencies as a maximum frequency, compare the maximum frequency with a preset frequency, and generate a third ratio; The first ratio, the second ratio, and the third ratio are added together to generate a comprehensive evaluation coefficient of the noise signal.
[0053] Optionally, the preset duration is 5 seconds.
[0054] Optionally, the preset amplitude value is 0.8.
[0055] Optionally, the preset frequency is 1000 Hz.
[0056] For ease of explanation, the process of setting the preset duration is given below as an example: For example, the noise signal comes from urban traffic noise, which includes the engine sound of passing vehicles, the friction sound of tires and roads, and the sound of horns. If the duration of the horn sound is more than 5 seconds, then this continuous noise is enough to distract people's attention from the speech content, and make them pay attention to and try to adapt to the horn sound.
[0057] Therefore, optionally, the preset duration is 5 seconds.
[0058] For ease of explanation, the process of setting the preset amplitude value is given as follows: For example, if the noise signal comes from urban traffic noise, the amplitude value of the linear amplitude spectrum of urban traffic noise presents different strengths at different frequencies. The 1000Hz frequency band is particularly important for speech intelligibility. For example, the linear amplitude spectrum of the noise signal of urban traffic noise has an amplitude value of 1.5 at 1000Hz, and the linear amplitude spectrum of the speech signal has an amplitude value of 0.8 at 1000Hz. The numerical value here directly reflects the relative strength of the speech signal.
[0059] During a call, when noise signals and voice signals are captured by the microphone integrated in the TWS headset at the same time, if the amplitude of the noise signal is high, the noise signal will dominate the reception and processing of the voice signal. This noise signal will cover up key information in the sender's voice signal, such as important words or intonation changes, making it difficult for the receiver to accurately understand the content of the call.
[0060] Therefore, optionally, the preset amplitude value is 0.8.
[0061] For ease of explanation, the setting process of the preset frequency is given as follows: For example, taking the noise signal from urban traffic noise as an example, the energy of urban traffic noise in the range of hundreds of hertz is more significant, such as 300Hz to 1000Hz. This is mainly due to the engines of cars, motorcycles, and buses, the friction between tires and the road, and the vibration of the car body. These will all produce noise in this frequency band, and 1000Hz to 3000Hz is generally considered to be one of the most sensitive frequency bands for the human ear, which is crucial to the clarity of speech.
[0062] When the frequency distribution of urban traffic noise is also concentrated around 1000Hz, the interference between the noise signal and the speech signal is particularly significant. Because when the noise signal and the speech signal coexist in the same frequency band, the noise signal and the speech signal will interfere with each other, causing the key information in the speech signal to be distorted, thereby reducing the intelligibility and clarity of the speech.
[0063] Therefore, optionally, the preset frequency is 1000 Hz.
[0064] The duration of the noise signal refers to the length of time it takes for the noise signal to go from the beginning to the end.
[0065] For ease of explanation, the process of obtaining the start time and the end time of the noise signal and determining the duration of the noise signal according to the start time and the end time is exemplified as follows: For example, when the start time of the noise signal is the 2nd second and the end time of the noise signal is the 8th second, the duration of the noise signal is: Duration = 8 seconds - 2 seconds = 6 seconds.
[0066] For example, when the start time of the noise signal is the 3rd second and the end time of the noise signal is the 12th second, the duration of the noise signal is: Duration = 12 seconds - 3 seconds = 9 seconds.
[0067] Among them, obtaining the start time and end time of the noise signal and determining the duration of the noise signal based on the start time and end time can eliminate accidental or temporary noise interference, thereby improving the efficiency of noise recognition to a certain extent.
[0068] Optionally, obtaining the start time and the end time of the noise signal, determining the duration of the noise signal according to the start time and the end time, and comparing the duration with a preset duration to generate a first ratio, includes: Obtaining the start time and end time of the noise signal, determining the duration of the noise signal according to the start time and the end time, comparing the duration with a preset duration to generate an initial ratio, and determining whether the initial ratio is greater than a preset maximum ratio; When the initial ratio is greater than a preset maximum ratio, the initial ratio is multiplied by a magnification coefficient to generate the amplified initial ratio, and the amplified initial ratio is selected as the first ratio.
[0069] Among them, there are continuous noise sources in the call environment itself, such as busy streets, airports, train stations or near construction sites. The noisy noise on the streets, the noise from construction sites, and the noise from aircraft takeoffs and landings are continuous. The noise signals generated by these noises will interfere with calls for a long time, causing the noise signal to last much longer than expected.
[0070] When the maximum duration of the noise signal exceeds 10 seconds, both parties on the call may begin to feel obvious discomfort and distraction, affecting the quality and efficiency of communication.
[0071] Optionally, the maximum duration of the noise signal is 10 seconds.
[0072] Among them, the maximum ratio = maximum duration / preset duration.
[0073] Among them, when the maximum duration of the noise signal is 10 seconds, the maximum ratio = 10 seconds / 5 seconds = 2.
[0074] Among them, because in a call environment there is sometimes a situation where the duration of a noise signal far exceeds expectations, the first ratio is multiplied by the amplification factor to generate an amplified first ratio. The amplified first ratio can enhance the impact of the duration of the noise signal on the comprehensive evaluation coefficient, which is beneficial for noise identification in a call environment.
[0075] The method of obtaining a plurality of amplitude values of the linear amplitude spectrum of the noise signal, selecting a maximum value among the plurality of amplitude values as a maximum amplitude value, and comparing the maximum amplitude value with a preset amplitude value to generate a second ratio includes: Performing Fourier transform on the noise signal to obtain a linear amplitude spectrum of the noise signal; A plurality of amplitude values of the linear amplitude spectrum of the noise signal is obtained, a maximum value among the plurality of amplitude values is selected as a maximum amplitude value, and the maximum amplitude value is compared with a preset amplitude value to generate a second ratio.
[0076] Among them, Fourier Transform is an important mathematical tool that can convert time domain signals into frequency domain signals, thereby revealing the characteristics of the signal in frequency.
[0077] Among them, in the process of noise monitoring and analysis, the maximum value of the multiple amplitude values is selected as the maximum amplitude value, which avoids comprehensive and complex analysis of multiple amplitude values of the linear amplitude spectrum, and improves the efficiency of noise identification to a certain extent. This is particularly important in the process of real-time noise monitoring, because it is conducive to the terminal device to respond quickly and take corresponding noise reduction measures.
[0078] Linear amplitude spectrum is a representation of noise signals in the frequency domain, and the amplitude value is expressed in a linear ratio. The numerical value of the amplitude value directly and accurately reflects the relative strength of the noise signal. Specifically, the part with a higher amplitude value represents that the energy of the noise signal at this frequency point is stronger, that is, the sound is louder or more significant; on the contrary, the part with a lower amplitude value indicates that the energy of the noise signal at this frequency point is weaker, and the sound is relatively soft or difficult to detect.
[0079] The graph of the linear amplitude spectrum is a two-dimensional graph, in which the horizontal axis represents the frequency and the vertical axis represents the amplitude value.
[0080] For ease of explanation, the process of selecting the maximum value among the multiple amplitude values as the maximum amplitude value is exemplified as follows: For example, there are 3 amplitude values, which are 0.81, 0.82, and 0.85 respectively.
[0081] Select 0.85 as the maximum amplitude value.
[0082] For example, there are 5 amplitude values, which are 0.51, 0.52, 0.55, 0.56, and 0.57.
[0083] Select 0.57 as the maximum amplitude value.
[0084] wherein, a plurality of frequencies of the linear amplitude spectrum of the noise signal are obtained, a maximum value among the plurality of frequencies is selected as a maximum frequency, and the maximum frequency is compared with a preset frequency to generate a third ratio; Acquire multiple frequencies of the linear amplitude spectrum of the noise signal, and sort the multiple frequencies; According to the sorting result, a maximum value among the multiple frequencies is selected as the maximum frequency, and the maximum frequency is compared with a preset frequency to generate a third ratio.
[0085] Among them, in the process of noise monitoring and analysis, the maximum value of the multiple frequencies is selected as the maximum frequency, which avoids comprehensive and complex analysis of multiple frequencies of the linear amplitude spectrum, and improves the efficiency of noise identification to a certain extent. This is particularly important in the process of real-time noise monitoring, because it is also conducive to the terminal equipment to respond quickly and take corresponding noise reduction measures.
[0086] For ease of explanation, the process of selecting the maximum value among the multiple frequencies as the maximum frequency is exemplified as follows: For example, there are three frequencies, 500 Hz, 600 Hz, and 800 Hz. Select 800 Hz as the maximum frequency.
[0087] For example, there are 5 frequencies, 300 Hz, 400 Hz, 500 Hz, 600 Hz, and 700 Hz. Select 700 Hz as the maximum frequency.
[0088] Among them, the first ratio, the second ratio and the third ratio are generated respectively according to the duration, the maximum amplitude value and the maximum frequency, and the first ratio, the second ratio and the third ratio are integrated into a comprehensive evaluation coefficient of the noise signal, which can greatly simplify the complexity of the system. Since the comprehensive evaluation coefficient can integrate the information of the first ratio, the second ratio and the third ratio, it can reflect the overall state of the noise signal more comprehensively and accurately, which makes the analysis of the noise signal easier.
[0089] Optionally, adding the first ratio, the second ratio, and the third ratio to generate a comprehensive evaluation coefficient of the noise signal includes: According to a preset generation model, the first ratio, the second ratio, and the third ratio are added to generate a comprehensive evaluation coefficient of the noise signal.
[0090] Among them, this mechanism ensures that the evaluation system can accurately reflect the contribution of the first ratio, the second ratio, and the third ratio to the overall result.
[0091] Wherein, the generation model is: E = E1×M1+ E2×M2+ E3×M3; Among them, E is the comprehensive evaluation coefficient, E1 is the first ratio, M1 is the weight coefficient of the first ratio; E2 is the second ratio, M2 is the weight coefficient of the second ratio; E3 is the third ratio, M3 is the weight coefficient of the third ratio, and the sum of M1, M2 and M3 is 1.
[0092] Wherein, the first ratio is greater than 1, indicating that the current difference between the duration and the preset duration is greater than the expected difference between the duration and the preset duration; The first ratio is equal to 1, indicating that the current difference between the duration and the preset duration is equal to the expected difference between the duration and the preset duration; The first ratio is less than 1, indicating that the current difference between the duration and the preset duration is less than the expected difference between the duration and the preset duration.
[0093] Wherein, the second ratio is greater than 1, indicating that the current difference between the maximum amplitude value and the preset amplitude value is greater than the expected difference between the maximum amplitude value and the preset amplitude value; The second ratio is equal to 1, indicating that the current difference between the maximum amplitude value and the preset amplitude value is equal to the expected difference between the maximum amplitude value and the preset amplitude value; The second ratio is less than 1, indicating that the current difference between the maximum amplitude value and the preset amplitude value is less than the expected difference between the maximum amplitude value and the preset amplitude value.
[0094] The third ratio is greater than 1, indicating that the current difference between the maximum frequency and the preset frequency is greater than the expected difference between the maximum frequency and the preset frequency.
[0095] The third ratio is equal to 1, indicating that the current difference between the maximum frequency and the preset frequency is equal to the expected difference between the maximum frequency and the preset frequency; The third ratio is less than 1, indicating that the current difference between the maximum frequency and the preset frequency is less than the expected difference between the maximum frequency and the preset frequency.
[0096] The larger the weight coefficient of the first ratio is, the greater the influence of the first ratio on the comprehensive evaluation coefficient is; the smaller the weight coefficient of the first ratio is, the smaller the influence of the first ratio on the comprehensive evaluation coefficient is; The larger the weight coefficient of the second ratio is, the greater the influence of the second ratio on the comprehensive evaluation coefficient is; the smaller the weight coefficient of the second ratio is, the smaller the influence of the second ratio on the comprehensive evaluation coefficient is; The larger the weight coefficient of the third ratio is, the greater the influence of the third ratio on the comprehensive evaluation coefficient is; the smaller the weight coefficient of the third ratio is, the smaller the influence of the third ratio on the comprehensive evaluation coefficient is.
[0097] This mechanism ensures that the evaluation system can accurately reflect the contribution of the first ratio, the second ratio and the third ratio to the comprehensive evaluation coefficient.
[0098] Optionally, the first weight coefficient is 0.4, the second weight coefficient is 0.3, and the third weight coefficient is 0.3.
[0099] The technical effects of this weight allocation strategy are: first, it highlights the core position of the first ratio in the overall evaluation, because the first weight coefficient is 0.4, which is the highest among the three, indicating that the first ratio contributes the most to the comprehensive evaluation coefficient and is decisive or crucial. Secondly, by giving the second and third ratios a weight coefficient of 0.3, it ensures that they also occupy a very important position in the evaluation system, avoiding the situation where the second and third ratios are neglected due to over-emphasis on the first ratio. This balance not only reflects the importance of the first ratio, but also ensures the comprehensiveness and fairness of the evaluation. In general, such a weight allocation strategy not only highlights the key points, but also takes into account the overall situation, which is conducive to a more scientific and reasonable comprehensive evaluation.
[0100] Exemplarily, when the comprehensive evaluation coefficient is greater than a preset coefficient, it is determined that the noise signal meets the noise reduction condition, and a second control instruction is sent to the main earphone, including: When the comprehensive evaluation coefficient is greater than a preset coefficient, obtaining the transmission delay of the master earphone; When the transmission delay is less than the preset delay, a second control instruction is sent to the master earphone.
[0101] The second control instruction is an instruction for controlling the noise reduction module to switch from a standby state to a working state.
[0102] The noise reduction module is only turned on when the transmission delay is less than the preset delay, which ensures that the noise reduction processing of the noise reduction module will not introduce additional delays during the communication process, thereby maintaining the real-time nature of the communication. This is especially important for application scenarios that require instant response, such as voice calls, video conferencing, and online games.
[0103] Exemplarily, after acquiring the sound signal collected by the microphone in the turned-on state, acquiring the noise signal in the sound signal, and controlling the noise reduction module to switch from the standby state to the working state when the noise signal meets the noise reduction condition, the TWS headset control device further includes: Obtain scores corresponding to each of the multiple noise suppression algorithms, add the scores corresponding to the multiple noise suppression algorithms, and generate a total score; Dividing the scores corresponding to the multiple noise suppression algorithms by the total score to generate the confidence levels corresponding to the multiple noise suppression algorithms; Obtaining noise suppression amounts corresponding to each of the plurality of noise suppression algorithms; Multiplying the noise suppression amounts corresponding to the multiple noise suppression algorithms by the confidence levels corresponding to the multiple noise suppression algorithms to generate evaluation values corresponding to the multiple noise suppression algorithms; The noise suppression algorithm with the largest evaluation value is selected to perform noise reduction on the sound signal.
[0104] Among them, the server is connected to obtain the scores of multiple noise suppression algorithms on the scoring page through the server.
[0105] For the sake of illustration, an example is given below: For example, there are three noise suppression algorithms, namely noise suppression algorithm 1, noise suppression algorithm 2, and noise suppression algorithm 3; the scoring page has three rows, the first row displays the score of noise suppression algorithm 1, the second row displays the score of noise suppression algorithm 2, and the scoring page has three rows, the third row displays the score of noise suppression algorithm 3.
[0106] Among them, the higher the score corresponding to the noise suppression algorithm, the more positive evaluations there are on the noise suppression algorithm, and the lower the score corresponding to the noise suppression algorithm, the lower the positive evaluations there are on the noise suppression algorithm.
[0107] Among them, when evaluating noise suppression algorithms, the score becomes an important measure of trust.
[0108] Among them, the noise suppression amount is a parameter used to quantitatively evaluate the effect of noise reduction or elimination. It usually refers to the magnitude or proportion of the noise level reduction after a specific treatment or system application relative to that before the treatment. By calculating the noise energy, power or decibel value before and after the treatment, the degree of noise suppression can be quantitatively expressed, thereby helping the terminal equipment to evaluate the noise suppression algorithm.
[0109] For the sake of illustration, an example is given below: For example, there are three noise suppression algorithms, namely, noise suppression algorithm 1, noise suppression algorithm 2, and noise suppression algorithm 3; A test signal containing noise is obtained, and the test signal is processed by noise suppression algorithm 1 to obtain the test signal processed by noise suppression algorithm 1, and the noise suppression amount corresponding to each noise suppression algorithm 1 is determined by comparing the test signal before processing with the test signal after processing by noise suppression algorithm 1, and the noise suppression amount corresponding to noise suppression algorithm 1 is multiplied by the trust degree corresponding to noise suppression algorithm 1 to generate an evaluation value corresponding to noise suppression algorithm 1.
[0110] A test signal containing noise is obtained, and the test signal is processed by noise suppression algorithm 2 to obtain the test signal processed by noise suppression algorithm 2. The noise suppression amount corresponding to each noise suppression algorithm 2 is determined by comparing the test signal before processing with the test signal after processing by noise suppression algorithm 2. The noise suppression amount corresponding to noise suppression algorithm 2 is multiplied by the trust degree corresponding to noise suppression algorithm 2 to generate an evaluation value corresponding to noise suppression algorithm 2.
[0111] Obtain a test signal containing noise, process the test signal through the noise suppression algorithm 3, obtain the test signal processed by the noise suppression algorithm 3, determine the noise suppression amount corresponding to each noise suppression algorithm 3 by comparing the test signal before processing with the test signal after processing by the noise suppression algorithm 3, multiply the noise suppression amount corresponding to the noise suppression algorithm 3 by the trust degree corresponding to the noise suppression algorithm 3, and generate an evaluation value corresponding to the noise suppression algorithm 3; When the evaluation value corresponding to the noise suppression algorithm 1 is the largest, the noise suppression algorithm 1 is selected to perform noise reduction on the sound signal; When the evaluation value corresponding to the noise suppression algorithm 2 is the largest, the noise suppression algorithm 2 is selected to perform noise reduction on the sound signal; When the evaluation value corresponding to the noise suppression algorithm 3 is the largest, the noise suppression algorithm 3 is selected to perform noise reduction on the sound signal.
[0112] Among them, noise suppression algorithm 1, noise suppression algorithm 2, and noise suppression algorithm 3 are different noise suppression algorithms.
[0113] Among them, although TWS headphones provide a certain degree of noise reduction effect, the terminal device will still activate the noise suppression algorithm as a means of secondary noise reduction to more accurately identify and suppress residual background noise and ensure the purity of the voice during the call.
[0114] In the embodiment of the present invention, the beneficial effects are in two aspects. On the one hand, when the power of the left earphone is greater than that of the right earphone, the left earphone is selected as the main earphone, and when the power of the left earphone is less than that of the right earphone, the right earphone is selected as the main earphone, which solves the problem of how to select the main earphone between the right earphone and the left earphone of the TWS earphone, which is beneficial to improving the battery life of the selected main earphone; on the other hand, the current state of the microphone of the main earphone is obtained, and when the current state of the microphone is the off state, the microphone is controlled to switch from the off state to the on state; the sound signal collected by the microphone in the on state is obtained, and the noise signal in the sound signal is obtained. When the noise signal meets the noise reduction condition, the noise reduction module is controlled to switch from the standby state to the working state, which solves the problem of how to control the microphone and the noise reduction module of the main earphone. Since there is no need to manually control the microphone and the noise reduction module, the control time of the microphone and the noise reduction module is reduced, which is beneficial to improving the control efficiency of the microphone and the noise reduction module.
[0115] See also Figure 3 , Figure 3 yes Figure 1 A specific implementation flow diagram of step S23 is described in detail as follows: S31, obtaining a read instruction; S32, execute the read instruction, and read the power of the left earphone and the power of the right earphone from the power information.
[0116] In the embodiment of the present invention, the power level of the left earphone and the power level of the right earphone are read in the power level information, so that the power level of the left earphone and the power level of the right earphone can be obtained.
[0117] See also Figure 4 , Figure 4 yes Figure 1 A specific implementation flow diagram of step S25 is described in detail as follows: S41, sending a first acquisition instruction to the master earphone, where the first acquisition instruction is an instruction for acquiring a current state of the microphone; S42, receiving the current state of the microphone returned by the main earphone according to the first acquisition instruction, when the current state of the microphone is the off state, sending a first control instruction to the main earphone, so that the main earphone controls the microphone to switch from the off state to the on state according to the first control instruction, and the first control instruction is an instruction to control the microphone to switch from the off state to the on state.
[0118] In an embodiment of the present invention, when the current state of the microphone is the off state, a first control instruction is sent to the main earphone. Since there is no need to manually control the microphone to switch from the off state to the on state, the process of controlling the microphone to switch from the off state to the on state is simplified, thereby reducing the control time of the microphone and helping to improve the control efficiency of the microphone.
[0119] See also Figure 5 , Figure 5 yes Figure 1 A specific implementation flow diagram of step S26 is described in detail as follows: S51, sending a second acquisition instruction to the master earphone, where the second acquisition instruction is an instruction for acquiring a current state of the noise reduction module; S52, receiving the current state of the noise reduction module returned by the master earphone according to the second acquisition instruction; S53, when the current state of the noise reduction module is the standby state, obtaining the sound signal collected by the microphone in the turned-on state; S54, acquiring a speech signal and a noise signal in the sound signal, and saving the speech signal and the noise signal; S55, when the noise signal meets the noise reduction condition, sending a second control instruction to the main earphone, so that the main earphone controls the noise reduction module to switch from the standby state to the working state according to the second control instruction, and the second control instruction is an instruction to control the noise reduction module to switch from the standby state to the working state.
[0120] Exemplarily, acquiring a speech signal and a noise signal in the sound signal, and saving the speech signal and the noise signal, includes: Uploading the sound signal and an instruction to a server, wherein the instruction is used to instruct the first server to perform blind source separation processing on the sound signal to obtain a speech signal and a noise signal; Acquire the voice signal and the noise signal returned by the server according to the instruction, and calculate the signal-to-noise ratio between the voice signal and the noise signal; When the signal-to-noise ratio between the speech signal and the noise signal is less than a preset signal-to-noise ratio, the speech signal and the noise signal are saved.
[0121] Among them, blind source separation (BSS) aims to recover multiple unknown source signals from a set of observed mixed signals without knowing the specific information of these source signals or the characteristics of the mixed system in advance.
[0122] As a powerful computing platform, the server has sufficient processing power to perform blind source separation on the sound signal to obtain a speech signal and a noise signal.
[0123] By uploading the sound signal and the instruction to the server, the instruction is used to instruct the first server to perform blind source separation processing on the sound signal to obtain a speech signal and a noise signal, This allows for quick acquisition of speech and noise signals.
[0124] In an embodiment of the present invention, when the noise signal meets the noise reduction condition, a second control instruction is sent to the main earphone. Since there is no need to manually control the noise reduction module to switch from the standby state to the working state, the process of controlling the microphone to switch from the standby state to the working state is simplified, thereby reducing the control time of the noise reduction module, which is beneficial to improving the control efficiency of the noise reduction module.
[0125] See also Figure 6 , Figure 6 : is a schematic diagram of a structure of a TWS headset control device in one embodiment of the present invention. Figure 6As shown, the TWS earphone control device includes a first acquisition module 101, a second acquisition module 102, a third acquisition module 103, a selection module 104, a first control module 105, and a second control module 106. Figure 6 The TWS headset control device is applied to a terminal device, the terminal device is connected to a TWS headset, the TWS headset includes a left headset and a right headset, and each functional module of the TWS headset control device is described in detail as follows: The first acquisition module 101 is used to obtain the signal strength connected to the TWS headset during a call; A second acquisition module 102 is used to acquire the power information of the TWS headset when the signal strength is greater than a preset strength; A third acquisition module 103 is used to obtain the power of the left earphone and the power of the right earphone from the power information; A selection module 104, configured to select the left earphone as the main earphone when the power level of the left earphone is greater than the power level of the right earphone, and select the right earphone as the main earphone when the power level of the left earphone is less than the power level of the right earphone; The first control module 105 is used to obtain the current state of the microphone of the master earphone, and when the current state of the microphone is an off state, control the microphone to switch from the off state to an on state; The second control module 106 is used to obtain the sound signal collected by the microphone in the turned-on state, obtain the noise signal in the sound signal, and when the noise signal meets the noise reduction condition, control the noise reduction module to switch from the standby state to the working state.
[0126] The present application provides a TWS headset control method, device, terminal device and storage medium, which have beneficial effects in two aspects. On the one hand, when the power of the left earphone is greater than that of the right earphone, the left earphone is selected as the main earphone, and when the power of the left earphone is less than that of the right earphone, the right earphone is selected as the main earphone, which solves the problem of how to select the main earphone between the right earphone and the left earphone of the TWS headset, which is beneficial to improving the battery life of the selected main earphone; on the other hand, the current state of the microphone of the main earphone is obtained, and when the current state of the microphone is the off state, the microphone is controlled to switch from the off state to the on state; the sound signal collected by the microphone in the on state is obtained, and the noise signal in the sound signal is obtained. When the noise signal meets the noise reduction condition, the noise reduction module is controlled to switch from the standby state to the working state, which solves the problem of how to control the microphone and the noise reduction module of the main earphone. Since there is no need to manually control the microphone and the noise reduction module, the control time of the microphone and the noise reduction module is reduced, which is beneficial to improving the control efficiency of the microphone and the noise reduction module.
[0127] For the specific limitations of the TWS headset control device, please refer to the limitations of the TWS headset control method above, which will not be repeated here.
[0128] Each module in the above-mentioned TWS headset control device can be implemented in whole or in part through software, hardware or a combination thereof.
[0129] In one embodiment, a terminal device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor.
[0130] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or terminal device can refer to the relevant description in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
Claims
1. A TWS headset control method, applied to a terminal device, the terminal device is connected to a TWS headset, the TWS headset includes a left headset and a right headset, characterized in that: include: During a call, obtain the signal strength of the TWS headset connected to the headset; When the signal strength is greater than a preset strength, obtaining the power information of the TWS headset; From the power information, obtain the power of the left earphone and the power of the right earphone; When the power level of the left earphone is greater than that of the right earphone, the left earphone is selected as the main earphone; when the power level of the left earphone is less than that of the right earphone, the right earphone is selected as the main earphone; Acquire the current state of the microphone of the master headset, and when the current state of the microphone is an off state, control the microphone to switch from the off state to an on state; The sound signal collected by the microphone in the turned-on state is obtained, and a noise signal in the sound signal is obtained. When the noise signal meets the noise reduction condition, the noise reduction module is controlled to switch from the standby state to the working state.
2. The TWS headset control method according to claim 1, characterized in that: When the signal strength is greater than a preset strength, obtaining the power information of the TWS headset includes: When the signal strength is greater than the preset strength, a read request is sent to the TWS headset, where the read request carries a power level indicator; Receive the power information returned by the TWS headset according to the power identifier.
3. The TWS headset control method according to claim 1, characterized in that: The acquiring, from the power information, the power of the left earphone and the power of the right earphone, comprises: Get read instructions; The read instruction is executed to read the power level of the left earphone and the power level of the right earphone from the power level information.
4. The TWS headset control method according to claim 1, characterized in that: When the power of the left earphone is greater than the power of the right earphone, the left earphone is selected as the main earphone, and when the power of the left earphone is less than the power of the right earphone, the right earphone is selected as the main earphone, comprising: When the power of the left earphone is greater than the power of the right earphone, a first selection instruction is sent to the TWS earphone, so that the TWS earphone selects the left earphone as the main earphone according to the first selection instruction, and the first selection instruction is an instruction to select the left earphone as the main earphone; When the power of the left earphone is less than the power of the right earphone, a second selection instruction is sent to the TWS earphone, so that the TWS earphone selects the right earphone as the main earphone according to the second selection instruction, and the second selection instruction is an instruction to select the right earphone as the main earphone.
5. The TWS headset control method according to claim 1, characterized in that: The obtaining the current state of the microphone of the master headset, and when the current state of the microphone is an off state, controlling the microphone to switch from the off state to an on state, comprises: Sending a first acquisition instruction to the master earphone, where the first acquisition instruction is an instruction for acquiring a current state of the microphone; Receive the current state of the microphone returned by the main earphone according to the first acquisition instruction, and when the current state of the microphone is an off state, send a first control instruction to the main earphone, so that the main earphone controls the microphone to switch from the off state to the on state according to the first control instruction, and the first control instruction is an instruction to control the microphone to switch from the off state to the on state.
6. The TWS headset control method according to claim 1, characterized in that: The step of acquiring the sound signal collected by the microphone in the on state, acquiring the noise signal in the sound signal, and controlling the noise reduction module to switch from the standby state to the working state when the noise signal meets the noise reduction condition, includes: Sending a second acquisition instruction to the master earphone, where the second acquisition instruction is an instruction for acquiring a current state of the noise reduction module; Receiving the current state of the noise reduction module returned by the master headset according to the second acquisition instruction; When the current state of the noise reduction module is the standby state, acquiring the sound signal collected by the microphone in the turned-on state; Acquire a speech signal and a noise signal in the sound signal, and save the speech signal and the noise signal; When the noise signal meets the noise reduction condition, a second control instruction is sent to the main earphone, so that the main earphone controls the noise reduction module to switch from the standby state to the working state according to the second control instruction, and the second control instruction is an instruction to control the noise reduction module to switch from the standby state to the working state.
7. The TWS headset control method according to claim 6, characterized in that: When the noise signal meets the noise reduction condition, sending a second control instruction to the master earphone includes: Obtaining a comprehensive evaluation coefficient of the noise signal through a predefined acquisition method; When the comprehensive evaluation coefficient is greater than the preset coefficient, it is determined that the noise signal meets the noise reduction condition, and a second control instruction is sent to the main earphone.
8. A TWS headset control device, applied to a terminal device, the terminal device is connected to a TWS headset, the TWS headset includes a left headset and a right headset, characterized in that: include: A first acquisition module is used to obtain the signal strength connected to the TWS headset during a call; A second acquisition module, used for acquiring the power information of the TWS headset when the signal strength is greater than a preset strength; A third acquisition module, configured to acquire the power of the left earphone and the power of the right earphone from the power information; A selection module, configured to select the left earphone as the main earphone when the power level of the left earphone is greater than that of the right earphone, and select the right earphone as the main earphone when the power level of the left earphone is less than that of the right earphone; A first control module, used for obtaining a current state of the microphone of the master headset, and when the current state of the microphone is an off state, controlling the microphone to switch from the off state to an on state; The second control module is used to obtain the sound signal collected by the microphone in the turned-on state, obtain the noise signal in the sound signal, and when the noise signal meets the noise reduction condition, control the noise reduction module to switch from the standby state to the working state.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the TWS headset control method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the steps of the TWS headset control method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Wireless earphone control method, wireless earphone and control system thereof
CN111770403A
Automatic intelligent TWS Bluetooth earphone test system
CN112118525A
Accessory theme self-adaption method, device and system
CN114095600A
Binaural consistency control method, graphical interface, system and related device
CN114827973A
Transient noise suppression method and device, equipment and storage medium
CN115881155A
