Noise reduction method and device for earphones, earphones and storage medium

By sampling and frame-processing ambient sound signals in the headset, calculating spectrum energy and automatically adjusting the noise reduction mode, the problem of users needing manual adjustment is solved, and the user experience of the headset is improved.

CN114363753BActive Publication Date: 2025-08-19BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111556557.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2025-08-19
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

The existing active noise cancellation headphones require users to manually adjust the noise cancellation mode, and cannot automatically switch according to the ambient sound, resulting in poor user experience.

Method used

The ambient sound signal is obtained through sampling rules, the spectrum energy is calculated after frame processing, and the headphone noise reduction mode is automatically adjusted according to the spectrum energy, including switching of light, equalization and deep noise reduction modes.

Benefits of technology

It realizes automatic switching of noise reduction mode according to the ambient sound, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114363753B_ABST
    Figure CN114363753B_ABST
Patent Text Reader

Abstract

The present disclosure proposes a noise reduction method, device, headphones and storage medium for headphones, which belongs to the field of headphone technology. The noise reduction method includes: sampling the ambient sound in the current environment of the headphones according to a preset sampling rule to obtain an ambient sound signal; framing the ambient sound signal according to a preset framing rule to obtain an initial audio frame set; for each frame in the initial audio frame set, calculating the spectral energy of the signal between the first frequency interval to obtain the first spectral energy; for each frame in the initial audio frame set, calculating the spectral energy of the signal between the second frequency interval to obtain the second spectral energy; obtaining the current noise reduction mode of the headphones, and adjusting the current noise reduction mode of the headphones according to the first spectral energy and the second spectral energy. In this way, it is possible to automatically switch the noise reduction mode according to the current ambient sound, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of headphones, and in particular to a noise reduction method and device for headphones, headphones, and a storage medium. Background Art

[0002] In daily life, environmental noise is a significant factor affecting people's sleep, work, study, and entertainment. In recent years, with the maturity of active noise reduction technology, active noise reduction headphones have emerged in large numbers. Among them, TWS (True Wireless Stereo) noise reduction headphones are particularly popular and are gradually becoming popular.

[0003] With the gradual development of active noise reduction technology, active noise reduction headphones have more and more functions. Currently, most active noise reduction headphones on the market provide multiple noise reduction modes for users to choose from, and users can manually adjust the noise reduction mode according to the surrounding environment. Summary of the Invention

[0004] The embodiments of the present disclosure provide a noise reduction method and device for headphones, headphones, and a storage medium, which can automatically switch the noise reduction mode according to the current ambient sound, thereby improving the user experience.

[0005] An embodiment of the first aspect of the present disclosure proposes a noise reduction method, including: sampling the ambient sound in the environment in which the headset is currently located according to a preset sampling rule to obtain an ambient sound signal; framing the ambient sound signal according to a preset framing rule to obtain an initial audio frame set; for each frame in the initial audio frame set, calculating the spectral energy of the signal between a first frequency interval to obtain a first spectral energy; for each frame in the initial audio frame set, calculating the spectral energy of the signal between a second frequency interval to obtain a second spectral energy; obtaining a current noise reduction mode of the headset, and adjusting the current noise reduction mode of the headset according to the first spectral energy and the second spectral energy.

[0006] In one embodiment of the present disclosure, after the ambient sound signal is divided into frames to obtain an initial audio frame set, the method further includes: filtering each frame in the initial audio frame set to calculate the first spectrum energy and the second spectrum energy.

[0007] In one embodiment of the present disclosure, the filtering processing of each frame in the initial audio frame set includes: performing a first filtering processing on each initial audio frame in the initial audio frame set to obtain a first audio frame set, wherein the first filtering processing is used to filter out spectral components with frequencies below a first frequency threshold in each initial audio frame; performing a second filtering processing on each first audio frame in the first audio frame set to obtain a second audio frame set, wherein the second filtering processing is used to filter out spectral components with frequencies above a second frequency threshold in each first audio frame; performing a third filtering processing on each second audio frame in the second audio frame set to obtain a third audio frame set, wherein the third filtering processing is used to filter out spectral components with frequencies below a third frequency threshold in each second audio frame, wherein the second frequency threshold is greater than the third frequency threshold, and the third frequency threshold is greater than the first frequency threshold.

[0008] In one embodiment of the present disclosure, calculating the spectral energy of the signal between the first frequency interval to obtain the first spectral energy includes: calculating the spectral energy of each second audio frame in the second audio frame set to obtain the first spectral energy; calculating the spectral energy of the signal between the second frequency interval to obtain the second spectral energy includes: calculating the spectral energy of each third audio frame in the third audio frame set to obtain the second spectral energy.

[0009] In one embodiment of the present disclosure, the noise reduction modes include a mild noise reduction mode, a balanced noise reduction mode, and a deep noise reduction mode.

[0010] In one embodiment of the present disclosure, adjusting the current noise reduction mode of the headset according to the first spectrum energy and the second spectrum energy includes: obtaining a spectrum energy threshold set; determining a target spectrum energy threshold from the spectrum energy threshold set according to the current noise reduction mode of the headset; and adjusting the current noise reduction mode of the headset according to the first spectrum energy, the second spectrum energy and the target spectrum energy threshold.

[0011] In one embodiment of the present disclosure, the spectrum energy threshold set includes a first spectrum energy threshold, a second spectrum energy threshold, a third spectrum energy threshold and a fourth spectrum energy threshold, and the target spectrum energy threshold includes a first energy threshold and a second energy threshold.

[0012] In one embodiment of the present disclosure, the target spectrum energy threshold is determined from the spectrum energy threshold set according to the current noise reduction mode of the headset, including: if the current noise reduction mode of the headset is the mild noise reduction mode, the first spectrum energy threshold is used as the first energy threshold, and the second spectrum energy threshold is used as the second energy threshold; if the current noise reduction mode of the headset is the balanced noise reduction mode, the first spectrum energy threshold is used as the first energy threshold, and the fourth spectrum energy threshold is used as the second energy threshold; if the current noise reduction mode of the headset is the deep noise reduction mode, the third spectrum energy threshold is used as the first energy threshold, and the fourth spectrum energy threshold is used as the second energy threshold.

[0013] In one embodiment of the present disclosure, the adjusting the current noise reduction mode of the headset according to the first spectrum energy, the second spectrum energy and the target spectrum energy threshold includes: if the current noise reduction mode of the headset is the mild noise reduction mode, then when the first spectrum energy is greater than or equal to the first energy threshold, adjusting the current noise reduction mode of the headset to the deep noise reduction mode; when the first spectrum energy is less than the first energy threshold and the second spectrum energy is greater than or equal to the second energy threshold, adjusting the current noise reduction mode of the headset to the balanced noise reduction mode; when the first spectrum energy is less than the first energy threshold and the second spectrum energy is less than the second energy threshold, maintaining the current noise reduction mode of the headset.

[0014] In one embodiment of the present disclosure, adjusting the current noise reduction mode of the headset according to the first spectrum energy, the second spectrum energy and the target spectrum energy threshold also includes: if the current noise reduction mode of the headset is the balanced noise reduction mode, then when the first spectrum energy is greater than or equal to the first energy threshold, adjusting the current noise reduction mode of the headset to the deep noise reduction mode; when the first spectrum energy is less than the first energy threshold and the second spectrum energy is less than the second energy threshold, adjusting the current noise reduction mode of the headset to the light noise reduction mode; when the first spectrum energy is less than the first energy threshold and the second spectrum energy is greater than or equal to the second energy threshold, maintaining the current noise reduction mode of the headset.

[0015] In one embodiment of the present disclosure, adjusting the current noise reduction mode of the headset according to the first spectrum energy, the second spectrum energy and the target spectrum energy threshold also includes: if the current noise reduction mode of the headset is the deep noise reduction mode, then when the first spectrum energy is less than the first energy threshold and the second spectrum energy is greater than or equal to the second energy threshold, adjusting the current noise reduction mode of the headset to the balanced noise reduction mode; when the first spectrum energy is less than the first energy threshold and the second spectrum energy is less than the second energy threshold, adjusting the current noise reduction mode of the headset to the light noise reduction mode; when the first spectrum energy is greater than or equal to the first energy threshold, maintaining the current noise reduction mode of the headset.

[0016] An embodiment of the second aspect of the present disclosure proposes a noise reduction device for headphones, including: a sampling module, used to sample the ambient sound in the environment in which the headphones are currently located according to a preset sampling rule to obtain an ambient sound signal; a framing module, used to frame the ambient sound signal according to a preset framing rule to obtain an initial audio frame set; a first calculation module, used to calculate the spectral energy of the signal between a first frequency interval for each frame in the initial audio frame set to obtain a first spectral energy; a second calculation module, used to calculate the spectral energy of the signal between a second frequency interval for each frame in the initial audio frame set to obtain a second spectral energy; an adjustment module, used to obtain a current noise reduction mode of the headphones, and adjust the current noise reduction mode of the headphones according to the first spectral energy and the second spectral energy.

[0017] An embodiment of the third aspect of the present disclosure proposes an earphone, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the noise reduction method for the earphone proposed in the embodiment of the first aspect of the present disclosure.

[0018] The fourth aspect embodiment of the present disclosure proposes a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by the processor of the headset, the headset can execute the noise reduction method of the headset proposed in the first aspect embodiment of the present disclosure.

[0019] The fifth embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor in a communication device, implements the noise reduction method for headphones provided in the first embodiment of the present disclosure.

[0020] The disclosed embodiments provide a noise reduction method, device, headphones, and storage medium for headphones. The method samples the ambient sound in the current environment of the headphones according to a preset sampling rule to obtain an ambient sound signal, and frames the ambient sound signal according to a preset framing rule to obtain an initial audio frame set. Then, for each frame in the initial audio frame set, the spectral energy of the signal between a first frequency interval is calculated to obtain a first spectral energy, and for each frame in the initial audio frame set, the spectral energy of the signal between a second frequency interval is calculated to obtain a second spectral energy, and the current noise reduction mode of the headphones is obtained, and the current noise reduction mode of the headphones is adjusted according to the first spectral energy and the second spectral energy. In this way, the noise reduction mode can be automatically switched according to the current ambient sound, thereby improving the user experience.

[0021] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and / or additional aspects and advantages of the present disclosure will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0023] Figure 1 A schematic flow chart of a noise reduction method for headphones provided in an embodiment of the present disclosure;

[0024] Figure 2 A schematic flow chart of another headphone noise reduction method provided by an embodiment of the present disclosure;

[0025] Figure 3 A schematic flow chart of another headphone noise reduction method provided by an embodiment of the present disclosure;

[0026] Figure 4 A schematic diagram of an application scenario of a noise reduction method for headphones provided by an embodiment of the present disclosure;

[0027] Figure 5 A schematic diagram of a specific example flow of a noise reduction method for headphones provided by an embodiment of the present disclosure in an application scenario;

[0028] Figure 6 A schematic structural diagram of a noise reduction device for headphones provided by an embodiment of the present disclosure; and

[0029] Figure 7 Schematic diagram of the structure of an earphone according to one embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0031] The terms used in the embodiments of the present disclosure are for the purpose of describing specific embodiments only and are not intended to limit the embodiments of the present disclosure. The singular forms "a," "an," and "the" used in the embodiments of the present disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0032] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present disclosure, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the embodiments of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0033] The embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be understood as limiting the present disclosure.

[0034] The following describes a noise reduction method, device, earphone, and storage medium for earphones according to embodiments of the present disclosure with reference to the accompanying drawings.

[0035] The noise reduction method for headphones provided in the embodiments of the present disclosure can be performed by headphones, and the headphones can be various types of noise reduction headphones such as TWS (True Wireless Stereo) noise reduction headphones, collar-type noise reduction headphones, and head-mounted noise reduction headphones, without any limitation here.

[0036] In an embodiment of the present disclosure, the headset may be provided with a processing component, a storage component, and a driver component. Optionally, the driver component and the processing component may be integrated, the storage component may store an operating system, application programs, or other program modules, and the processing component implements the noise reduction method for the headset provided in an embodiment of the present disclosure by executing the application programs stored in the storage component.

[0037] Figure 1 A flowchart of a noise reduction method for headphones provided by an embodiment of the present disclosure is provided.

[0038] The noise reduction method of the earphones of the embodiment of the present disclosure can also be executed by the noise reduction device of the earphones provided by the embodiment of the present disclosure. The device can be configured in the earphones to sample the ambient sound in the current environment of the earphones according to a preset sampling rule to obtain an ambient sound signal, and to frame the ambient sound signal according to a preset framing rule to obtain an initial audio frame set, and then for each frame in the initial audio frame set, calculate the spectral energy of the signal between the first frequency interval to obtain the first spectral energy, and for each frame in the initial audio frame set, calculate the spectral energy of the signal between the second frequency interval to obtain the second spectral energy, and obtain the current noise reduction mode of the earphones, adjust the current noise reduction mode of the earphones according to the first spectral energy and the second spectral energy, so as to realize automatic switching of the noise reduction mode according to the current ambient sound, thereby improving the user experience.

[0039] like Figure 1 As shown, the noise reduction method of the headset may include:

[0040] In step 101, the ambient sound in the current environment of the headset is sampled according to a preset sampling rule to obtain an ambient sound signal. The preset sampling rule can be calibrated according to actual conditions and needs. For example, the preset sampling rule may include sampling the ambient sound in the current environment of the headset at a certain sampling frequency.

[0041] In the disclosed embodiment, the headset can sample the ambient sound in the current environment at a certain sampling frequency through one or more built-in microphones, such as a feedforward microphone and a call microphone, to obtain an ambient sound signal. It should be noted that the sampling frequency described in this embodiment should be greater than 2000Hz, such as 48000Hz, 16000Hz, 80000Hz, or 4000Hz.

[0042] Specifically, since the ambient sound signal collected by the feedforward microphone is better, in actual application scenarios, the headset can sample the ambient sound in the current environment at a sampling frequency of 16000Hz through the built-in feedforward microphone.

[0043] Step 102: Framing the ambient sound signal according to a preset framing rule to obtain an initial audio frame set. The preset framing rule can be calibrated based on actual conditions and requirements, and the initial audio frame set can include multiple initial audio frames. It should be noted that the preset framing rule described in this embodiment may include framing based on a framing model or a framing algorithm.

[0044] In the disclosed embodiment, the acquired current ambient sound signal can be framed using a preset frame model to obtain multiple frames of initial audio data. It should be noted that the frame model described in this embodiment can be pre-trained and pre-stored in the headset's storage space for easy access.

[0045] The training and generation of the frame model can be performed by a training server, which can be a cloud server or a computer host. A communication connection is established between the training server and the headset that can execute the embodiments of the present disclosure. The communication connection can be at least one of a wireless network connection and a wired network connection. The training server can send the trained frame model to the headset so that the headset can call it when needed, thereby significantly reducing the headset's computing pressure.

[0046] Specifically, after obtaining the above-mentioned ambient sound signal, the earphone can call out the above-mentioned frame model from its own storage space, and input the ambient sound signal into the frame model, so as to process the ambient sound signal through the frame model to obtain the initial audio frame set output by the frame model.

[0047] As a possible scenario, the ambient sound signal can also be framed using a preset framing algorithm to obtain multiple frames of initial audio data. The framing algorithm can be calibrated based on actual conditions and needs. It should be noted that the framing algorithm described in this embodiment can be pre-stored in the headset's storage space for easy access and application.

[0048] Specifically, after obtaining the above-mentioned ambient sound signal, the earphone can call out the above-mentioned framing algorithm from its own storage space, and perform framing processing on the ambient sound signal through the framing algorithm to obtain an initial audio frame set.

[0049] As another possible scenario, the headset may also use a framing tool (eg, a plug-in, etc.) to perform framing processing on the obtained ambient sound signal to obtain an initial audio frame set.

[0050] For example, in an actual application scenario, when the headset samples the current ambient sound at 16000 Hz through the built-in feedforward microphone, if the data of the ambient sound signal collected every 16 ms is taken as a group of data, each group of data may include 256 data points. Assuming that there are n groups of data in total after the sampling is completed, the first group of data and the second group of data, the third group of data and the fourth group of data,..., the n-1th group of data and the nth group of data, respectively, can be taken as a frame of data after overlapping by 50%. The collected ambient sound signal can be divided into n / 2 initial audio frames, each of which has a frame length of 512 and a frame shift of 256.

[0051] Furthermore, after the above-mentioned environmental sound signal is divided into frames to obtain an initial audio frame set, each initial audio frame in the initial audio frame set can be calculated by the following formula (1).

[0052] sf (n, m) = account for ((m-1)*inc+n), 0≤n≤(L-1) (1)

[0053] Wherein, sf(n, m) is the initial audio frame, s(n) is the ambient sound signal, m represents the frame number index of the initial audio frame, n represents the data point index of the m-th initial audio frame, L represents the frame length, and inc represents the frame shift.

[0054] In one embodiment of the present disclosure, after the ambient sound signal is divided into frames to obtain an initial audio frame set, filtering processing may be performed on each frame in the initial audio frame set to calculate the first spectrum energy and the second spectrum energy.

[0055] In order to clearly illustrate the above embodiment, in one embodiment of the present disclosure, as Figure 2 As shown, filtering each frame in the initial audio frame set may include:

[0056] Step 201 performs a first filtering process on each initial audio frame in the initial audio frame set to obtain a first audio frame set. The first filtering process is used to filter out spectral components in each initial audio frame whose frequencies are below a first frequency threshold. The first audio frame set includes multiple first audio frames, and the first frequency threshold may be 50 Hz.

[0057] In an embodiment of the present disclosure, after obtaining the above-mentioned initial audio frame set, a first filtering (high-pass filtering) process can be performed on each initial audio frame in the initial audio frame set through a filter to filter out spectral components below a first frequency threshold (50 Hz), that is, to filter out DC components to reduce interference from such components, thereby obtaining a first audio frame set. Since the embodiment of the present disclosure does not have high requirements for data phase, and an IIR (Infinite Impulse Response, recursive filter) high-pass filter can reduce memory overhead, an IIR high-pass filter can be selected to perform a first filtering process on each initial audio frame in the initial audio frame set, wherein the system function Hα(z) of the IIR high-pass filter can be referred to in the following formula (2).

[0058]

[0059] Among them, M α 、N α It is generally a positive integer less than 10, and M α =N α , optionally, M α =Nα =2, k is a natural number, and is the coefficient, z=e -jw , where e is the natural base, j is the imaginary number, and w is the angular frequency.

[0060] It should be noted that the above formula (2) and The coefficients can be obtained through the filter design function in Python (a computer programming language). The input of this function is the cutoff frequency, filter type and filter order of the above IIR high-pass filter, and the output is the coefficients and

[0061] Furthermore, after performing a first filtering (high-pass filtering) process on each initial audio frame in the initial audio frame set through the above-mentioned IIR high-pass filter and obtaining the first audio frame set, each first audio frame in the first audio frame set can be calculated by the following formula (3).

[0062]

[0063] Among them, y α (n, m) is the first audio frame, sf(ni, m) is the initial audio frame, m is the frame number index of the initial audio frame, n is the data point index of the mth initial audio frame, L is the frame length, i is a natural number, and is the coefficient, M α 、N α It is generally a positive integer less than 10, and M α =N α , optionally, M α =N α =2.

[0064] Step 202: Perform a second filtering process on each first audio frame in the first audio frame set to obtain a second audio frame set. The second filtering process is used to filter out spectral components in each first audio frame whose frequencies are above a second frequency threshold. The second audio frame set includes multiple second audio frames, and the second frequency threshold may be 1000 Hz.

[0065] In the embodiment of the present disclosure, after obtaining the above-mentioned first audio frame set, each first audio frame of the first audio frame set can be subjected to a second filtering (low-pass filtering) by using an IIR low-pass filter to filter out the spectral components above the second frequency threshold (1000 Hz) to obtain a second audio frame set. Since the embodiment of the present disclosure does not have high requirements on the data phase and the IIR low-pass filter can reduce memory overhead, the IIR low-pass filter can be selected to perform the second filtering on each first audio frame of the first audio frame set, wherein the system function H of the IIR low-pass filter is β (z) can be found in the following formula (4).

[0066]

[0067] Among them, M β =N β , and M β 、N β It is generally a positive integer less than 10. Optionally, M β =N β =2, k is a natural number, and is the coefficient, z=e -jw , where e is the natural base, j is the imaginary number, and w is the angular frequency.

[0068] It should be noted that the and The coefficients can be obtained through the filter design function in Python (a computer programming language). The input of this function is the cutoff frequency, filter type and filter order of the above IIR low-pass filter, and the output is the coefficients and

[0069] Furthermore, after performing a second filtering process on each first audio frame of the first audio frame set by the low-pass filter IIR and obtaining the second audio frame set, each second audio frame in the second audio frame set can be calculated by the following formula (5).

[0070]

[0071] Among them, y β (n, m) is the second audio frame, y α (ni, m) is the first audio frame, m represents the frame number index of the initial audio frame, n represents the data point index of the m-th initial audio frame, L represents the frame length, i can be a natural number, and Can be a coefficient, M β 、N β Generally, it can be a positive integer less than 10, and M β =Nβ , optionally, M β =N β =2.

[0072] Step 203: Perform a third filtering process on each second audio frame in the second audio frame set to obtain a third audio frame set. The third filtering process is used to filter out spectral components in each second audio frame whose frequencies are below a third frequency threshold, where the second frequency threshold is greater than the third frequency threshold, and the third frequency threshold is greater than the first frequency threshold. The third audio frame set includes multiple third audio frames, and the third frequency threshold may be 300 Hz.

[0073] In the embodiment of the present disclosure, a third filtering (high-pass filtering) can be performed on each second audio frame in the second audio frame set by using an IIR high-pass filter to filter out spectral components below a third frequency threshold (300 Hz) to obtain a third audio frame set. γ (z) can be found in the following formula (6).

[0074]

[0075] Among them, M γ 、N γ It is generally a positive integer less than 10, and M γ =N γ , optionally, M γ =Nγ=2, k is a natural number, and is the coefficient, z=e -jw , where e is the natural base, j is the imaginary number, and w is the angular frequency.

[0076] It should be noted that in formula (6) and The coefficients can be obtained through the filter design function in Python (a computer programming language). The input of this function is the cutoff frequency, filter type and filter order of the above IIR high-pass filter, and the output is the coefficients and

[0077] Furthermore, after performing a third filtering on each second audio frame in the second audio frame set by the above-mentioned IIR high-pass filter and obtaining a third audio frame set, each third audio frame in the third audio frame set can be calculated by the following formula (7).

[0078]

[0079] Among them, y γ (n, m) is the third audio frame, y β(ni, m) is the second audio frame, m is the frame number index of the initial audio frame, n is the data point index of the mth initial audio frame, L is the frame length, i is a natural number, and is the coefficient, M γ =N β , and M γ 、N γ It is generally a positive integer less than 10. Optionally, M γ =N γ =2.

[0080] Step 103 : For each frame in the initial audio frame set, the spectral energy of the signal within a first frequency interval is calculated to obtain a first spectral energy. The first frequency interval is a frequency interval having a frequency greater than a first frequency threshold and less than a second frequency threshold, i.e., 50-1000 Hz.

[0081] The calculating of the spectrum energy of the signal between the first frequency intervals to obtain the first spectrum energy includes calculating the spectrum energy of each second audio frame in the second audio frame set to obtain the first spectrum energy.

[0082] In the embodiment of the present disclosure, each second audio frame in the second audio frame set is within the first frequency range, and the spectrum energy of each second audio frame in the second audio frame set can be calculated using the following formula (8).

[0083]

[0084] Among them, ef 1k (m) is the spectral energy of each second audio frame in the second audio frame set, y β (n, m) is the second audio frame, m represents the frame number index of the initial audio frame, n represents the data point index of the m-th initial audio frame, and L represents the frame length.

[0085] Specifically, after performing a first filtering process on each initial audio frame in the initial audio frame set to obtain a first audio frame set, and performing a second filtering process on each first spectrum frame in the first audio frame set to obtain a second audio frame set, the spectrum energy ef corresponding to each second audio frame in the second audio frame set can be calculated by the above formula (8): 1k (m).

[0086] It should be noted that the spectrum energy ef corresponding to each second audio frame in the second audio frame set described in this embodiment is 1k (m), in addition to using the second audio frame y β The sum of the absolute values of (n, m) is calculated, and the second audio frame y β(n, m) square sum calculation, the embodiment of the present disclosure preferably uses the second audio frame y β The sum of the absolute values of (n, m) is calculated.

[0087] Furthermore, after calculating the spectrum energy ef corresponding to each second audio frame in the second audio frame set, 1k (m), the first spectrum energy can be calculated by the following formula (9).

[0088]

[0089] Among them, eb 1k (t) is the first spectrum energy, ef 1k (m) is the spectral energy of each second audio frame in the second audio frame set, t represents the frame number index of the second audio frame, m represents the frame number index of the initial audio frame, and R represents the total number of frames in the first audio frame set within T seconds, where T is the decision period.

[0090] It should be noted that the decision cycle T described in this embodiment is: a decision is made every T seconds to determine whether the current noise reduction mode of the headphones needs to be adjusted. Since a decision cycle of 9.6 seconds can maintain a certain degree of real-time and stability when the headphones are performing noise reduction, and can avoid frequent adjustments to the current noise reduction mode of the headphones, which may cause trouble to the user, the decision cycle of this disclosed embodiment is preferably 9.6 seconds, that is, T = 9.6.

[0091] Specifically, after obtaining the spectrum energy ef corresponding to each second audio frame in the second audio frame set, 1k (m), the total spectrum energy of all second audio frames in every T seconds (9.6 seconds) can be calculated by the above formula (9), that is, the first spectrum energy eb 1k (t).

[0092] Furthermore, the total number of frames R of the first audio frame set within T seconds can be calculated by the following formula (10).

[0093]

[0094] Wherein, fs represents the audio data sampling rate (microphone sampling rate), inc represents the frame shift, and T is the decision period.

[0095] Step 104 : For each frame in the initial audio frame set, calculate the spectral energy of the signal within a second frequency interval to obtain a second spectral energy. The second frequency interval is a frequency interval having a frequency greater than the third frequency threshold and less than the second frequency threshold, i.e., 300-1000 Hz.

[0096] Calculating the spectrum energy of the signal between the second frequency interval to obtain the second spectrum energy includes calculating the spectrum energy of each third audio frame in the third audio frame set to obtain the second spectrum energy.

[0097] In the embodiment of the present disclosure, each third audio frame in the third audio frame set is within the second frequency range, and the spectrum energy of each third audio in the third audio frame set can be calculated by the following formula (11).

[0098]

[0099] Among them, ef 300 (m) is the spectral energy of each third audio in the third audio frame set, y γ (n, m) is the third audio frame, m represents the frame number index of the initial audio frame, n represents the data point index of the m-th initial audio frame, and L represents the frame length.

[0100] Specifically, after performing the third filtering process on each second audio frame in the second audio set to obtain the third audio frame set, the spectrum energy ef corresponding to each third audio in the third audio frame set can be calculated by the above formula (11): 300 (m).

[0101] It should be noted that the spectrum energy ef corresponding to each third audio described in this embodiment is 300 (m), in addition to using the third audio frame y γ The sum of the absolute values of (n, m) can also be used to calculate the third audio frame y γ (n, m) square sum calculation, the embodiment of the present disclosure preferably uses the y of the third audio frame γ The sum of the absolute values of (n, m) is calculated.

[0102] Furthermore, after calculating the spectrum energy ef300(m) of each third audio frame in the third audio set, the second spectrum energy can be calculated using the following formula (12).

[0103]

[0104] Among them, eb 300 (t) is the second spectrum energy, ef 300 (m) is the spectral energy of each third audio frame in the third audio set, t represents the frame number index of the third audio frame, m represents the frame number index of the initial audio frame, and R represents the total number of frames in the first audio frame set of T seconds (which can be calculated by the above formula (10)), where T can be the decision period (T = 9.6).

[0105] Specifically, after obtaining the spectrum energy ef of each third audio frame in the third audio set, 300 (m), the total spectrum energy of all third audio frames in each T seconds (9.6 seconds) can be calculated by the above formula (12), that is, the second spectrum energy eb 300 (t).

[0106] Step 105: Obtain the current noise reduction mode of the headset, and adjust the current noise reduction mode of the headset according to the first spectrum energy and the second spectrum energy. There may be multiple noise reduction modes, which are not limited here.

[0107] Specifically, the headset can obtain its current noise reduction mode through a related API (Application Programming Interface), and then adjust its current noise reduction mode according to the first spectrum energy and the second spectrum energy.

[0108] In an embodiment of the present disclosure, the ambient sound in the current environment of the headset is first sampled according to a preset sampling rule to obtain an ambient sound signal, and the ambient sound signal is framed according to a preset framing rule to obtain an initial audio frame set. Then, for each frame in the initial audio frame set, the spectral energy of the signal between the first frequency interval is calculated to obtain the first spectral energy, and for each frame in the initial audio frame set, the spectral energy of the signal between the second frequency interval is calculated to obtain the second spectral energy, and the current noise reduction mode of the headset is obtained, and the current noise reduction mode of the headset is adjusted according to the first spectral energy and the second spectral energy. In this way, the noise reduction mode can be automatically switched according to the current ambient sound, thereby improving the user experience.

[0109] In order to clearly illustrate the above embodiment, in one embodiment of the present disclosure, as Figure 3 As shown, determining the noise reduction mode of the earphone according to the spectrum energy may include:

[0110] Step 301: Obtain a set of spectrum energy thresholds. The set of spectrum energy thresholds may include a first spectrum energy threshold, a second spectrum energy threshold, a third spectrum energy threshold, and a fourth spectrum energy threshold. It should be noted that the specific values of the first spectrum energy threshold, the second spectrum energy threshold, the third spectrum energy threshold, and the fourth spectrum energy threshold described in this embodiment can be obtained by analyzing the spectral characteristics of data sets in different noise reduction modes and are not limited here.

[0111] Step 302: Determine a target spectrum energy threshold from a spectrum energy threshold set according to the current noise reduction mode of the headset, wherein the target spectrum energy threshold may include a first energy threshold and a second energy threshold.

[0112] The noise reduction modes include mild, balanced, and deep. Mild is generally suitable for quieter scenes like libraries and bookstores, balanced for noisier scenes like restaurants and shopping malls, and deep for noisier scenes like airplanes and subways.

[0113] Specifically, if the current noise reduction mode of the headset is a mild noise reduction mode, the first spectrum energy threshold can be used as the first energy threshold, and the second spectrum energy threshold can be used as the second energy threshold; if the current noise reduction mode of the headset is a balanced noise reduction mode, the first spectrum energy threshold can be used as the first energy threshold, and the fourth spectrum energy threshold can be used as the second energy threshold; if the current noise reduction mode of the headset is a deep noise reduction mode, the third spectrum energy threshold can be used as the first energy threshold, and the fourth spectrum energy threshold can be used as the second energy threshold.

[0114] Step 303: Adjust the current noise reduction mode of the headset according to the first spectrum energy, the second spectrum energy, and the target spectrum energy threshold.

[0115] Specifically, if the current noise reduction mode of the headset is a light noise reduction mode, when the first spectrum energy is greater than or equal to the first energy threshold, the current noise reduction mode of the headset can be adjusted to a deep noise reduction mode; when the first spectrum energy is less than the first energy threshold and the second spectrum energy is greater than or equal to the second energy threshold, the current noise reduction mode of the headset can be adjusted to a balanced noise reduction mode; when the first spectrum energy is less than the first energy threshold and the second spectrum energy is less than the second energy threshold, the current noise reduction mode of the headset is maintained.

[0116] In addition, if the current noise reduction mode of the headset is the balanced noise reduction mode, when the first spectrum energy is greater than or equal to the first energy threshold, the current noise reduction mode of the headset can be adjusted to the deep noise reduction mode; when the first spectrum energy is less than the first energy threshold and the second spectrum energy is less than the second energy threshold, the current noise reduction mode of the headset can be adjusted to the light noise reduction mode; when the first spectrum energy is less than the first energy threshold and the second spectrum energy is greater than or equal to the second energy threshold, the current noise reduction mode of the headset is maintained.

[0117] In addition, if the current noise reduction mode of the headset is deep noise reduction mode, when the first spectrum energy is less than the first energy threshold and the second spectrum energy is greater than or equal to the second energy threshold, the current noise reduction mode of the headset can be adjusted to balanced noise reduction mode; when the first spectrum energy is less than the first energy threshold and the second spectrum energy is less than the second energy threshold, the current noise reduction mode of the headset can be adjusted to light noise reduction mode; when the first spectrum energy is greater than or equal to the first energy threshold, the current noise reduction mode of the headset is maintained.

[0118] In order to clearly illustrate the above embodiment, in the embodiment of the present disclosure, the above-mentioned noise reduction mode determination process may be referred to as dynamic threshold decision, and its specific decision process may be referred to in Table a below.

[0119]

[0120]

[0121]

[0122] Table a

[0123] Among them, eb 1k (t) is the first spectrum energy, eb 300 (t) is the second spectrum energy, DEEP represents the deep noise reduction mode, LIGHT represents the light noise reduction mode, MEDIUM represents the balanced noise reduction mode, EB_TS-UP 1k Indicates the first spectrum energy threshold, EB_TS-UP 300 Indicates the second spectrum energy threshold, EB-TS_DOWN 1k Indicates the third spectrum energy threshold, EB_TS_DOWN 300 Indicates the fourth spectrum energy threshold, EB_TS 1k Represents the first energy threshold, EB_TS 300 represents the second energy threshold.

[0124] As shown in Table a, if the current noise reduction mode of the headset is deep noise reduction mode, then EB_TS 1k and EB_TS 300 Convert to the corresponding value EB_TS_DOWN respectively 1k and EB_TS_DOWN 300 , if eb 1k (t)<EB_TS 1k And eb 300 (t)≥EB_TS 300 , the current noise reduction mode of the headset switches to the balanced noise reduction mode; if eb 1k (t)<EB_TS 1k And eb 300 (t)<EB_TS 300 , the current noise reduction mode of the headset switches to mild noise reduction mode. If eb 1k (t)≥EB_TS 1k , the current noise reduction mode of the headset remains unchanged.

[0125] If the current noise reduction mode of the headset is balanced noise reduction mode, EB_TS 1k and EB_TS 300Convert to the corresponding value EB_TS_UP respectively 1k and EB_TS_DOWN 300 , if eb 1k (t)≥EB_TS 1k , the current noise reduction mode of the headset switches to deep noise reduction mode, if eb 1k (t)<EB_TS 1k And eb 300 (t)<EB_TS 300 , the current noise reduction mode of the headset switches to mild noise reduction mode. If eb 1k (t)<EB_TS 1k And eb 300 (t)≥EB_TS 300 , the current noise reduction mode of the headset remains unchanged.

[0126] If the current noise reduction mode of the headset is mild noise reduction mode, EB_TS 1k and EB_TS 300 Convert to the corresponding value EB_TS_UP respectively 1k and EB_TS_UP 300 , if eb 1k (t)≥EB_TS 1k , the current noise reduction mode of the headset switches to deep noise reduction mode, if eb 1k (t)<EB_TS 1k And eb 300 (t)≥EB_TS 300 , the current noise reduction mode of the headset switches to the balanced noise reduction mode. If eb 1k (t)<EB_TS 1k And eb 300 (t)<EB_TS 300 , the current noise reduction mode of the headset remains unchanged.

[0127] The noise reduction method of the headphones in the embodiment of the present disclosure can switch the noise reduction mode by adopting a scene-based dynamic threshold decision method, which can effectively avoid the problem of frequent switching of noise reduction modes during active noise reduction. It has stronger stability and lower computational complexity, thereby reducing device power consumption and having strong feasibility.

[0128] In order to make those skilled in the art understand the present disclosure more clearly, Figure 4 This is a schematic diagram of an application scenario of the noise reduction method for headphones according to an embodiment of the present disclosure. Figure 4In actual application scenarios, this noise reduction method first collects ambient sounds, identifies the current scene based on the ambient sounds, and then switches the ANC (Active Noise Cancellation) coefficient according to the current scene, that is, switches the noise reduction mode and performs active noise reduction.

[0129] Furthermore, Figure 5 This is a specific example flow chart of the noise reduction method of the headset in the application scenario of the embodiment of the present disclosure, see Figure 5 In actual application scenarios, this noise reduction method first collects the ambient sound, then preprocesses the ambient sound data through the scene recognition module, filters the key frequency bands in the ambient sound, and then makes a dynamic threshold decision. The ANC coefficient is switched according to the decision result, that is, the noise reduction mode is switched, so that the noise reduction mode can be automatically switched according to the current scene, thereby improving the user experience.

[0130] Figure 6 A schematic structural diagram of a noise reduction device for headphones provided in an embodiment of the present disclosure.

[0131] The noise reduction device of the earphones of the embodiment of the present disclosure can be configured in the earphones to sample the ambient sound in the current environment of the earphones according to a preset sampling rule to obtain an ambient sound signal, and to frame the ambient sound signal according to a preset framing rule to obtain an initial audio frame set, and then for each frame in the initial audio frame set, calculate the spectral energy of the signal between the first frequency interval to obtain the first spectral energy, and for each frame in the initial audio frame set, calculate the spectral energy of the signal between the second frequency interval to obtain the second spectral energy, and obtain the current noise reduction mode of the earphones, and adjust the current noise reduction mode of the earphones according to the first spectral energy and the second spectral energy, so as to realize automatic switching of the noise reduction mode according to the current ambient sound, thereby improving the user experience.

[0132] like Figure 6 As shown, the noise reduction device 600 for headphones may include: a sampling module 610 and a framing module 620 , a first calculation module 630 , a second calculation module 640 and an adjustment module 650 .

[0133] The sampling module 610 is configured to sample the ambient sound in the current environment of the earphone according to a preset sampling rule to obtain an ambient sound signal.

[0134] The framing module 620 is configured to frame the ambient sound signal according to a preset framing rule to obtain an initial audio frame set.

[0135] The first calculation module 630 is configured to calculate the spectrum energy of the signal between the first frequency intervals for each frame in the initial audio frame set to obtain first spectrum energy.

[0136] The second calculation module 640 is configured to calculate the spectrum energy of the signal between the second frequency intervals for each frame in the initial audio frame set to obtain second spectrum energy.

[0137] The adjustment module 650 is configured to obtain a current noise reduction mode of the headset and adjust the current noise reduction mode of the headset according to the first spectrum energy and the second spectrum energy.

[0138] It should be noted that the aforementioned explanation of the embodiment of the noise reduction method for headphones is also applicable to the noise reduction device for headphones in this embodiment, and will not be repeated here.

[0139] The headphone noise reduction device provided by the embodiment of the present disclosure samples the ambient sound in the current environment of the headphone according to a preset sampling rule through a sampling module to obtain an ambient sound signal, and frames the ambient sound signal according to a preset framing rule through a framing module to obtain an initial audio frame set, and then calculates the spectral energy of the signal between the first frequency interval for each frame in the initial audio frame set through a first calculation module to obtain the first spectral energy, and calculates the spectral energy of the signal between the second frequency interval for each frame in the initial audio frame set through a second calculation module to obtain the second spectral energy, and obtains the current noise reduction mode of the headphone through an adjustment module, and adjusts the current noise reduction mode of the headphone according to the first spectral energy and the second spectral energy, so as to realize automatic switching of the noise reduction mode according to the current ambient sound, thereby improving the user experience.

[0140] According to a third aspect of an embodiment of the present disclosure, there is further provided an earphone, comprising: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement the noise reduction method for the earphone as described above.

[0141] In order to implement the above embodiments, the present disclosure also proposes a storage medium.

[0142] When the instructions in the storage medium are executed by the processor of the headset, the headset is enabled to perform the noise reduction method of the headset as described above.

[0143] In order to implement the above embodiments, the present disclosure also provides a computer program product.

[0144] When the computer program product is executed by a processor of the headset, the headset is enabled to perform the noise reduction method of the headset as described above.

[0145] Figure 7The figure is a block diagram of a headset according to an exemplary embodiment. Figure 7 The earphones shown are merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0146] like Figure 7 As shown, the headset 700 includes a processor 111, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 112 or programs loaded from a memory 116 into a random access memory (RAM) 113. Various programs and data required for the operation of the headset 700 are also stored in the RAM 113. The processor 111, ROM 112, and RAM 113 are connected to each other via a bus 114. An input / output (I / O) interface 115 is also connected to the bus 114.

[0147] The following components are connected to the I / O interface 115: a memory 116 including a hard disk, etc.; and a communication part 117 including a network interface card such as a LAN (Local Area Network) card, a modem, etc., and the communication part 117 performs communication processing via a network such as the Internet; a drive 118 is also connected to the I / O interface 115 as needed.

[0148] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program carried on a computer-readable medium, the computer program including program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 117. When the computer program is executed by the processor 111, the above-mentioned functions defined in the method of the present disclosure are performed.

[0149] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions. The instructions can be executed by the processor 111 of the headset 700 to perform the above method. Alternatively, the storage medium can be a non-transitory computer-readable storage medium, such as a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0150] In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing.

[0151] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:

[0152] In the embodiment of the present disclosure, the ambient sound in the current environment of the headset is sampled according to a preset sampling rule to obtain an ambient sound signal, and the ambient sound signal is framed according to a preset framing rule to obtain an initial audio frame set. Then, for each frame in the initial audio frame set, the spectral energy of the signal between the first frequency interval is calculated to obtain the first spectral energy, and for each frame in the initial audio frame set, the spectral energy of the signal between the second frequency interval is calculated to obtain the second spectral energy, and the current noise reduction mode of the headset is obtained, and the current noise reduction mode of the headset is adjusted according to the first spectral energy and the second spectral energy. In this way, the noise reduction mode can be automatically switched according to the current ambient sound, thereby improving the user experience.

[0153] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0154] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for reducing noise of headphones, characterized in that: include: Sampling the ambient sound in the current environment of the headset according to a preset sampling rule to obtain an ambient sound signal; Framing the ambient sound signal according to a preset framing rule to obtain an initial audio frame set; For each frame in the initial audio frame set, calculating the spectral energy of the signal between a first frequency interval to obtain a first spectral energy, where the first frequency interval is a frequency interval where the frequency is greater than a first frequency threshold and less than a second frequency threshold; For each frame in the initial audio frame set, calculating the spectral energy of the signal between a second frequency interval to obtain a second spectral energy, where the second frequency interval is a frequency interval where the frequency is greater than a third frequency threshold and less than a second frequency threshold; Acquire a current noise reduction mode of the headset, and adjust the current noise reduction mode of the headset according to the first spectrum energy and the second spectrum energy.

2. The method according to claim 1, wherein After the ambient sound signal is divided into frames to obtain an initial audio frame set, the method further includes: A filtering process is performed on each frame in the initial audio frame set to calculate the first spectrum energy and the second spectrum energy.

3. The method according to claim 2, wherein The filtering process on each frame in the initial audio frame set includes: performing a first filtering process on each initial audio frame in the initial audio frame set to obtain a first audio frame set, wherein the first filtering process is used to filter out spectral components with frequencies below a first frequency threshold in each initial audio frame; performing a second filtering process on each first audio frame in the first audio frame set to obtain a second audio frame set, wherein the second filtering process is used to filter out spectral components with a frequency above a second frequency threshold in each first audio frame; Performing a third filtering process on each second audio frame in the second audio frame set to obtain a third audio frame set, wherein the third filtering process is used to filter out spectral components in each second audio frame whose frequencies are below a third frequency threshold, wherein the second frequency threshold is greater than the third frequency threshold, and the third frequency threshold is greater than the first frequency threshold.

4. The method according to claim 3, wherein Calculating the spectrum energy of the signal between the first frequency intervals to obtain the first spectrum energy includes: calculating the spectrum energy of each second audio frame in the second audio frame set to obtain the first spectrum energy; Calculating the spectrum energy of the signal between the second frequency intervals to obtain the second spectrum energy includes: calculating the spectrum energy of each third audio frame in the third audio frame set to obtain the second spectrum energy.

5. The method according to any one of claims 1 to 4, characterized in that The noise reduction modes include a mild noise reduction mode, a balanced noise reduction mode, and a deep noise reduction mode.

6. The method according to claim 5, wherein The adjusting the current noise reduction mode of the headset according to the first spectrum energy and the second spectrum energy includes: Obtaining a spectrum energy threshold set; determining a target spectrum energy threshold from the spectrum energy threshold set according to a current noise reduction mode of the headset; Adjust the current noise reduction mode of the headset according to the first spectrum energy, the second spectrum energy, and the target spectrum energy threshold.

7. The method according to claim 6, wherein in, The spectrum energy threshold set includes a first spectrum energy threshold, a second spectrum energy threshold, a third spectrum energy threshold and a fourth spectrum energy threshold, and the target spectrum energy threshold includes a first energy threshold and a second energy threshold.

8. The method according to claim 7, wherein The determining, according to the current noise reduction mode of the headset, a target spectrum energy threshold from the spectrum energy threshold set includes: If the current noise reduction mode of the headset is the mild noise reduction mode, the first spectrum energy threshold is used as the first energy threshold, and the second spectrum energy threshold is used as the second energy threshold; If the current noise reduction mode of the headset is the balanced noise reduction mode, the first spectrum energy threshold is used as the first energy threshold, and the fourth spectrum energy threshold is used as the second energy threshold; If the current noise reduction mode of the headset is the deep noise reduction mode, the third spectrum energy threshold is used as the first energy threshold, and the fourth spectrum energy threshold is used as the second energy threshold.

9. The method according to claim 7, wherein The adjusting the current noise reduction mode of the headset according to the first spectrum energy, the second spectrum energy, and the target spectrum energy threshold includes: If the current noise reduction mode of the headset is the mild noise reduction mode, when the first spectrum energy is greater than or equal to the first energy threshold, adjusting the current noise reduction mode of the headset to the deep noise reduction mode; When the first spectrum energy is less than the first energy threshold and the second spectrum energy is greater than or equal to the second energy threshold, adjusting the current noise reduction mode of the headset to the balanced noise reduction mode; When the first spectrum energy is less than the first energy threshold and the second spectrum energy is less than the second energy threshold, the current noise reduction mode of the headset is maintained.

10. The method according to claim 7, wherein: The adjusting the current noise reduction mode of the headset according to the first spectrum energy, the second spectrum energy, and the target spectrum energy threshold further includes: If the current noise reduction mode of the headset is the balanced noise reduction mode, when the first spectrum energy is greater than or equal to the first energy threshold, adjusting the current noise reduction mode of the headset to the deep noise reduction mode; When the first spectrum energy is less than the first energy threshold and the second spectrum energy is less than the second energy threshold, adjusting the current noise reduction mode of the headset to the mild noise reduction mode; When the first spectrum energy is less than the first energy threshold and the second spectrum energy is greater than or equal to the second energy threshold, the current noise reduction mode of the headset is maintained.

11. The method according to claim 7, wherein The adjusting the current noise reduction mode of the headset according to the first spectrum energy, the second spectrum energy, and the target spectrum energy threshold further includes: If the current noise reduction mode of the headset is the deep noise reduction mode, when the first spectrum energy is less than the first energy threshold and the second spectrum energy is greater than or equal to the second energy threshold, adjusting the current noise reduction mode of the headset to the balanced noise reduction mode; When the first spectrum energy is less than the first energy threshold and the second spectrum energy is less than the second energy threshold, adjusting the current noise reduction mode of the headset to the mild noise reduction mode; When the first spectrum energy is greater than or equal to the first energy threshold, the current noise reduction mode of the headset is maintained.

12. A noise reduction device for headphones, characterized in that: include: A sampling module, configured to sample the ambient sound in the current environment of the headset according to a preset sampling rule to obtain an ambient sound signal; A framing module, configured to frame the ambient sound signal according to a preset framing rule to obtain an initial audio frame set; a first calculation module, configured to calculate, for each frame in the initial audio frame set, spectral energy of a signal within a first frequency interval to obtain a first spectral energy, wherein the first frequency interval is a frequency interval having a frequency greater than a first frequency threshold and less than a second frequency threshold; a second calculation module, configured to calculate, for each frame in the initial audio frame set, spectral energy of a signal within a second frequency interval to obtain second spectral energy, wherein the second frequency interval is a frequency interval having a frequency greater than a third frequency threshold and less than a second frequency threshold; An adjustment module is configured to obtain a current noise reduction mode of the headset and adjust the current noise reduction mode of the headset according to the first spectrum energy and the second spectrum energy.

13. A headset, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the noise reduction method for the earphone according to any one of claims 1 to 11.

14. A non-transitory computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by a processor of the headset, the headset is enabled to perform the noise reduction method of the headset according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Noise reducing method and device and earphone

    CN108847208A