CN115499744A - Earphone noise reduction method and device, computer readable storage medium and earphone - Google Patents
Earphone noise reduction method and device, computer readable storage medium and earphone Download PDFInfo
- Publication number
- CN115499744A CN115499744A CN202211118448.4A CN202211118448A CN115499744A CN 115499744 A CN115499744 A CN 115499744A CN 202211118448 A CN202211118448 A CN 202211118448A CN 115499744 A CN115499744 A CN 115499744A
- Authority
- CN
- China
- Prior art keywords
- sound wave
- wave data
- earphone
- mode
- filter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1083—Reduction of ambient noise
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2201/00—Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
- H04R2201/10—Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Soundproofing, Sound Blocking, And Sound Damping (AREA)
- Headphones And Earphones (AREA)
Abstract
The present application relates to the field of earphone technologies, and in particular, to an earphone noise reduction method, an earphone noise reduction apparatus, a computer readable storage medium, and an earphone. The method comprises the following steps: under the condition that the noise reduction mode of the earphone is a first mode (no active noise control), simultaneously acquiring sound wave data lasting for a first preset time length by a feedforward microphone and a feedback microphone of the earphone; on the other hand, in the case where the noise reduction mode of the headphone is the second mode (active noise control), sound wave data for a second preset time period is simultaneously acquired by the feedforward microphone and the feedforward microphone. And determining target parameters related to the filter according to actual parameters of a default filter in the earphone in the second mode and the sound wave data acquired in the two modes respectively, and determining the target filter based on the target parameters. The application can be suitable for individual requirements of different ears and different wearing modes, and can achieve high-level noise reduction effect under different ears and different wearing modes.
Description
Technical Field
The present application relates to the field of earphone technologies, and in particular, to an earphone noise reduction method, an earphone noise reduction apparatus, a computer-readable storage medium, and an earphone.
Background
With the popularization of earphones, the requirements of users on noise reduction are higher and higher. According to the Noise reduction principle, the earphone Noise reduction technology is divided into Active Noise Control (ANC) and passive Noise reduction. The passive noise reduction is mainly realized by filling sponge and the like in the ear cup and isolating noise through the ear cup and the sponge. ANC sets up the intelligent chip of making an uproar in the earphone, when the built-in sound pickup perceptron perception of earphone arrived external noise, the chip of making an uproar can produce the sound wave opposite with external noise and offset the noise.
In the related art, the ANC-based headset generally adopts a fixed filter, but due to differences of different ears and different wearing manners (for example, wearing angles of the headset and/or lengths of the headset penetrating into the ear canal), the fixed filter cannot achieve consistent noise reduction effects on different ears of people, and even some people may perceive that the noise reduction effects are very poor, which cannot meet personalized requirements.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present application and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The earphone noise reduction device, the computer readable storage medium and the earphone provided by the application can be suitable for individual requirements of different ears and different wearing modes, and can achieve a high-level noise reduction effect under different ears and different wearing modes.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of the present application, there is provided a method of reducing noise in a headphone, the method including: under the condition that the noise reduction mode of the earphone is a first mode, sound wave data lasting for a first preset time duration are simultaneously acquired through a feedforward microphone and a feedback microphone of the earphone, first sound wave data corresponding to the feedforward microphone and second sound wave data corresponding to the feedback microphone are obtained, and the first model is a mode without active noise control; under the condition that the noise reduction mode of the earphone is a second mode, sound wave data lasting for a second preset time duration are simultaneously acquired through the feedforward microphone and the feedback microphone, third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone are obtained, and the second mode is an active noise control mode; determining a target parameter for a filter from the actual parameters of a default filter in the earpiece, the first acoustic data, the second acoustic data, the third acoustic data, and the fourth acoustic data in the second mode; and determining a target filter based on the target parameters so as to carry out noise reduction operation based on the target filter.
According to another aspect of the present application, there is provided a headphone noise reduction apparatus, the apparatus including: the device comprises a sound wave data determining module, a target parameter determining module and a target filter determining module.
Wherein, the acoustic data determination module is configured to: under the condition that the noise reduction mode of the earphone is a first mode, sound wave data lasting for a first preset time duration are simultaneously acquired through a feedforward microphone and a feedback microphone of the earphone, so that first sound wave data corresponding to the feedforward microphone and second sound wave data corresponding to the feedback microphone are obtained, and the first model is a mode without active noise control; the acoustic data determination module is further configured to: under the condition that the noise reduction mode of the earphone is a second mode, sound wave data lasting for a second preset time duration are simultaneously acquired through the feedforward microphone and the feedback microphone, third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone are obtained, and the second mode is an active noise control mode; the target parameter determination module is configured to: determining a target parameter for a filter from the actual parameters of a default filter in the earpiece, the first acoustic data, the second acoustic data, the third acoustic data, and the fourth acoustic data in the second mode; and, the target filter determination module is configured to: and determining a target filter based on the target parameters so as to carry out noise reduction operation based on the target filter.
According to yet another aspect of the present application, there is provided a headset comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method as described in the above embodiments when executing the computer program.
According to yet another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when executed by a processor, performs the method as described in the above embodiments.
The earphone noise reduction method, the earphone noise reduction device, the computer readable storage medium and the earphone provided by the embodiment of the application have the following technical effects:
in the technical scheme provided by the application, on one hand, under the condition that the noise reduction mode of the earphone is a first mode (without active noise control), sound wave data lasting for a first preset time duration are simultaneously acquired through a feedforward microphone and a feedback microphone of the earphone, and first sound wave data and second sound wave data are respectively obtained; on the other hand, when the noise reduction mode of the earphone is the second mode (active noise control), sound wave data lasting for a second preset time duration are simultaneously acquired through the feedforward microphone and the feedback microphone, and third sound wave data and fourth sound wave data are respectively obtained. Further, a target parameter regarding the filter is determined from an actual parameter of a default filter in the headphone in the second mode and the acoustic wave data acquired in the two modes, respectively, and the target filter is determined based on the target parameter. Therefore, in the determination process of the target parameters, the sound wave data of the earphone in the actual use process under the two modes are considered, so that the actual use environment of the current earphone can be considered when the target filter is used for noise reduction, the earphone can be adapted to the personalized requirements of different ears and different wearing modes, and the high-level noise reduction effect can be achieved under different ears and different wearing modes.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic diagram illustrating a usage scenario of a noise reduction scheme for a headphone in an exemplary embodiment of the present application.
Fig. 2 shows a flow chart of a noise reduction method for a headphone in an exemplary embodiment of the present application.
Fig. 3 shows a flow chart of a method for noise reduction of a headphone in another exemplary embodiment of the present application.
Fig. 4 is a flowchart illustrating a method for determining whether a wearer is in an unvoiced state according to an exemplary embodiment of the present application.
Fig. 5 shows a schematic diagram of different acoustic curves in an exemplary embodiment of the present application.
Fig. 6 is a schematic diagram illustrating a noise reduction timing sequence of a headphone according to the exemplary embodiment of fig. 3 of the present application.
Fig. 7 shows a flow chart of a method for noise reduction of a headphone in yet another exemplary embodiment of the present application.
Fig. 8 is a diagram illustrating a noise reduction sequence for a headphone that matches the exemplary embodiment of fig. 7 of the present application.
FIG. 9 illustrates a diagram of multiple target parameter curves for the same user in an exemplary embodiment of the present application.
Fig. 10 shows a schematic flow chart of the noise reduction device for headphones according to an exemplary embodiment of the present application.
Fig. 11 shows a schematic flow chart of a headphone noise reduction apparatus in another exemplary embodiment of the present application.
Fig. 12 shows a schematic structural diagram of a headset according to an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present application.
Furthermore, the drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Because the auricle and the ear canal of different human ears are different, and the wearing modes of different people on the earphone are also different, the ANC scheme adopting the fixed filter provided by the related art cannot meet the requirement of higher noise reduction effect for different users. In another related art, when the headset is used by building multiple sets (e.g., 10 sets) of ANC filters, the user is required to be in a noisy environment and then to cycle through the multiple sets of filters by the relevant application installed on the terminal (e.g., mobile phone), so as to determine a set of filters that best matches the current environment. However, the solution provided by the related art needs a long time, and requires a long waiting time for the user, resulting in poor user experience.
The application provides an earphone noise reduction method, an earphone noise reduction device, a computer readable storage medium and an earphone, which can be adapted to individual requirements of different ears and different wearing modes, can achieve a high-level noise reduction effect under different ears and different wearing modes, and are short in time consumption. The following first describes in detail an embodiment of the device adding method provided in the present application:
fig. 1 shows a schematic usage scenario of a noise reduction scheme for headphones in an exemplary embodiment of the present application. Referring to fig. 1, the noise reduction scheme of the present application is applicable to different external earphones, such as a headphone 101 and an in-ear headphone 102 in fig. 1, and the noise reduction system 100 included in each earphone implements noise reduction. Specifically, sound wave data is acquired by the feedforward microphone 11 and the feedback microphone 12 provided in the headphone, and after the sound wave data is processed by the processor 13, target parameters regarding the filter can be obtained. Further, a target filter suitable for the current human ear and the current wearing manner is determined among the plurality of candidate filters 14 according to the target parameters about the filter. The target filter is used for executing noise reduction operation, and can be suitable for the current personalized requirements of ears and the current wearing mode.
Fig. 2 shows a flow chart of a method for reducing noise of a headphone in an exemplary embodiment of the present application. Referring to fig. 2:
in S210, when the noise reduction mode of the earphone is a first mode, sound wave data lasting for a first preset time duration is simultaneously acquired by a feedforward microphone and a feedback microphone of the earphone, so as to obtain first sound wave data corresponding to the feedforward microphone and second sound wave data corresponding to the feedback microphone, where the first model is a mode without active noise control.
Illustratively, the feedforward microphone is disposed outside the earphone for collecting external noise. The feedback microphone is typically located in the ear drum space, typically near the front of the headphone driver, for collecting acoustic data from the interior of the ear drum.
In this embodiment, the earphone is set to be in a mode without active noise control (also referred to as a normal mode), sound wave data is simultaneously collected by a feed-forward microphone and a feed-back microphone of the earphone, and the duration of the sound wave data is referred to as a first preset duration. Illustratively, the first preset time period value is: 500 ms-2 s. For example, in a mode where the earphone has no active noise control, the sound wave data of 500ms are collected simultaneously by the feedforward microphone and the feedback microphone of the earphone, so as to obtain the first sound wave data (which may be referred to as "X") collected by the feedforward microphone ff_normal "), and second acoustic data (which may be referred to as an" X ") collected by the feed-back microphone fb_normal ”)。
In S210', when the noise reduction mode of the earphone is a second mode, sound wave data lasting for a second preset time duration is simultaneously acquired by the feedforward microphone and the feedback microphone, so as to obtain third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone, where the second mode is an active noise control mode.
In this embodiment, the earphone is set to be in an active noise control mode (which may also be referred to as an ANC mode of a silkworm pupa default filter, default-ANC-mode), sound wave data is simultaneously collected by a feed-forward microphone and a feed-back microphone of the earphone, and the duration of the sound wave data is referred to as a second preset duration. Illustratively, the second preset duration value is: 500ms to 2s. Wherein the second predetermined duration may be equal toThe second preset time periods are the same or different. For example, in the default-ANC-mode of the earphone, the sound wave data of 500ms are collected simultaneously by the feedforward microphone and the feedback microphone of the earphone, so as to obtain the third sound wave data (which may be referred to as "X") collected by the feedforward microphone ff_anc "), and fourth sound data (which may be referred to as" X ") collected by the feed-back microphone fb_anc ”)。
It should be noted that the execution sequence of S210 and S210' is not sequential, and S210 may be executed first and then S210' is executed, or S210' may be executed first and then S210 is executed. In the embodiment of the present disclosure, the step of executing S210 first and then executing S210' is taken as an example for explanation.
In S220, a target parameter for a filter is determined based on the actual parameter of the default filter in the headphone, the first sound wave data, the second sound wave data, the third sound wave data, and the fourth sound wave data in the second mode.
Illustratively, a transfer function (denoted as: a first transfer function) in the first mode is calculated from the first acoustic data and the second acoustic data, as in equation (1). Calculating a transfer function (denoted as a second transfer function) in the second mode according to the third acoustic data and the fourth acoustic data, as shown in formula (2):
H normal =SPL ff_normal /SPL fb_normal (1)
wherein H normal Representing the first transfer function, SPL ff_normal Represents the Sound Pressure Level (SPL) corresponding to the first Sound wave data, SPL fb_normal Represents the SPL corresponding to the second acoustic data.
H anc =SPL ff_anc /SPL fb_anc (2)
Wherein H anc Representing the above-mentioned second transfer function, SPL ff_anc SPL, SPL corresponding to the third acoustic data fb_anc The SPL corresponding to the fourth sound data is shown.
Further, target parameters for the filter are determined based on the first transfer function, the second transfer function, and actual parameters of the default filter.
F target =-H normal /(H anc *F default_anc -H normal ) (3)
Wherein, F target Representing a target parameter, F, of said filter default_anc A default parameter, H, representing the filter normal Representing the first transfer function, and H anc Representing the second transfer function.
In S230, a target filter is determined based on the target parameters to perform a noise reduction operation based on the target filter.
In the technical solution provided in fig. 2, on one hand, when the noise reduction mode of the earphone is the active noise-free control mode, the feedforward microphone and the feedback microphone of the earphone simultaneously acquire sound wave data lasting for a first preset time duration, and obtain first sound wave data and second sound wave data, respectively; on the other hand, when the noise reduction mode of the earphone is active noise control, sound wave data lasting for a second preset time duration are simultaneously acquired through the feedforward microphone and the feedback microphone, and third sound wave data and fourth sound wave data are respectively acquired. Further, a target parameter regarding the filter is determined from actual parameters of a default filter in the headphone in the second mode and the acoustic wave data acquired respectively in the two modes, and the target filter is determined based on the target parameter. Therefore, in the determining process of the target parameters, sound wave data of the earphone in the actual use process under the two modes are considered, so that the actual use environment of the current earphone can be considered when the target filter is used for noise reduction, the earphone can be adapted to personalized requirements of different ears and different wearing modes, and a high-level noise reduction effect can be achieved under different ears and different wearing modes.
In an exemplary embodiment, fig. 3 shows a flow chart of a method for noise reduction of a headphone in another exemplary embodiment of the present application. Referring to fig. 3, before performing the above step S210, S310 is further performed: it is determined that a wearer of the headset is in an unvoiced state. That is, in case it is determined that the wearer of the headset is not making sound (e.g. talking, sneezing, etc.), an adaptive noise reduction process is achieved according to the solution provided in fig. 2. It should be noted that, in the adaptive noise reduction process shown in fig. 2, it is further determined that the headphone speaker and the earphone speaker are in a state of not emitting sound (e.g., playing audio and video) in the adaptive noise reduction process through the sound wave data (the first sound wave data and the third sound wave data) collected by the feedforward microphone, so as to ensure the accuracy of the target parameter of the filter, and further improve the noise reduction effect.
In an exemplary usage scenario, where the headset has just been removed from the charging bin, and may not yet be paired with the terminal, the headset processor can determine that the speaker is in an unvoiced state (e.g., playing audio and video, etc.), so as to determine whether the wearer is not sounding. In another exemplary usage scenario, the headset is already paired with a terminal, and the paired terminal does not play audio and video, that is, the speaker does not make a sound, and in such a scenario, the headset processor can determine that the speaker is in an unvoiced state (e.g., playing audio and video, etc.), so that it is only necessary to determine whether the wearer does not make a sound. In an exemplary further usage scenario, if the paired terminal is playing audio and video, it may be determined whether the speaker is in an unvoiced state according to the embodiment corresponding to S730 and S760 in fig. 7 (which will be described in detail in the embodiment corresponding to fig. 7).
In an exemplary embodiment, fig. 4 is a flowchart illustrating a method for determining whether a wearer is in an unvoiced state according to an exemplary embodiment of the present application, which may be taken as an embodiment of determining whether the wearer is vocalizing in S310. Referring to fig. 4:
in S3102, sound wave data lasting for a third preset time period is simultaneously acquired through a feedforward microphone and a feedback microphone of the earphone, so as to obtain fifth sound wave data corresponding to the feedforward microphone and sixth sound wave data corresponding to the feedback microphone; at S3104, a first sound pressure level corresponding to the fifth sound wave data and a second sound pressure level corresponding to the sixth sound wave data are calculated; at S3106, a difference between the first sound pressure level and the second sound pressure level is calculated; and, in S3108, it is determined whether the above difference value is smaller than an energy difference preset value.
In this embodiment, the SPL of the two paths of sound wave data is further calculated by the sound wave data acquired by the feedforward microphone and the feedback microphone at the same time. Specifically, whether the wearer vocalizes or not is determined by comparing the energy difference of the SPLs of the two paths of sound wave data. If the energy difference value of the two sound wave data is not less than the threshold (as mentioned above, the energy difference preset value) which indicates that the energy difference of the SPL of the two sound wave data collected by the feedforward microphone and the feedback microphone is large, then S31012 is executed: determining that a wearer of the headset is making a sound. If the energy difference value of the two sound wave data is smaller than the threshold (as described above, the energy difference preset value), which indicates that the energy difference of the SPLs of the two sound wave data collected by the feedforward microphone and the feedback microphone is not large, then S1010 is executed: it is determined that the wearer of the headset is not making a sound.
Illustratively, referring to fig. 5, in the case of the wearer making a sound, the curve 51 represents the SPL of the sound wave data collected by the feedforward microphone, and the curve 52 represents the SPL of the sound wave data collected by the feedback microphone, and it can be seen that the energy difference between the SPLs of the two sound wave data collected by the feedforward microphone and the feedback microphone is large below 1.2 kHZ. In the case where the wearer does not make a sound, the curve 51 represents the SPL of the sound wave data collected by the feedforward microphone, and the curve 53 represents the SPL of the sound wave data collected by the feedback microphone, and thus, in the case of less than 1.2kHZ, the energy difference between the SPLs of the two paths of sound wave data collected by the feedforward microphone and the feedback microphone is small.
The embodiment shown in fig. 3 can be used to detect the wearer ' S unvoiced sound and determine the wearer ' S unvoiced sound after the detection of the unvoiced sound as a prerequisite for performing subsequent operations (such as S210, S210' and S220 and S230 in fig. 2). That is to say, in order to ensure the adaptive denoising process for different ears and different wearing modes of the earphone, the denoising process needs to be performed under the above prerequisite conditions to ensure the denoising effect. Referring again to fig. 3, if the prerequisite condition as described in S310 cannot be satisfied, S330 is executed: executing the denoising operation by using the default filter (if the default filter is currently in the first mode, executing the denoising operation by using the default filter corresponding to the first mode, and if the default filter is currently in the second mode, executing the denoising operation by using the default filter corresponding to the second mode), without executing the operation as shown in fig. 2. With continued reference to fig. 3, if the prerequisite condition as described in S310 can be satisfied, S320 may be performed: S210-S240 are performed multiple times.
For example, in the case where it is confirmed that the above-mentioned prerequisite condition is satisfied, S210-S240 may be performed once after a preset time interval. Therefore, in the wearing process of the same user, if the wearing mode of the user is changed (for example, the wearing angle of the earphone is changed and/or the length of the earphone extending into the ear canal is changed), the filter used for noise reduction can be replaced by executing the adaptive ANC stage for multiple times, so that the continuous good noise reduction effect is ensured.
Illustratively, in order to ensure that the earphone has a continuously good noise reduction effect and avoid inconvenience to the user as much as possible, S210-S240 may also be controlled according to a usage scenario. And under the condition that the terminal is detected to be in the song playing scene, performing the self-adaptive noise reduction process like S210-S240 in the playing interval of the two songs. Wherein the playing gap duration of the two songs is generally longer than the duration required for executing S210-S240 once. Therefore, the earphone can be guaranteed to have a continuous good noise reduction effect under the condition that a user feels nothing.
In an exemplary embodiment, fig. 6 shows a schematic diagram of a noise reduction timing of the headphone matched with the exemplary embodiment shown in fig. 3 of the present application, and referring to the timing diagram shown in fig. 6 (with time as a reference horizontal axis), after detecting that the headphone is in the ear by the photosensor, unvoiced sound detection is performed by S1 (corresponding to S310). S2 is next executed for sounding a cue. For example, as described above, if it is detected that the earphone speaker is in a state of making a sound (playing audio and video), the user may be prompted to actively close the played audio and video for x seconds, so as to ensure that the earphone speaker is in a state of not making a sound at this stage; for another example, if the terminal is controlled by the earphone processor to pause playing of the audio/video, the prompt is used to remind the user that the audio/video is paused for x seconds, please later, and so on in order to ensure the noise reduction effect. It should be noted that x seconds is an "adaptive ANC phase" and the duration is not longer than 2 seconds.
With continued reference to fig. 3, the "adaptive ANC stage" is the operation steps corresponding to S210, S210', and S220 and S230 shown in fig. 2. After the self-adaptive ANC stage, the target parameters can be determined according to the characteristics of the ear of the person currently worn and the current band matching mode, and the target filter suitable for the current state is selected from the multiple alternative filters based on the target parameters, so that the noise reduction process can be realized based on the actual condition of the current state, and the good noise reduction effect is ensured.
In an exemplary embodiment, suppose the paired terminal is next playing music, and the gap in the playing of two songs typically exists for a few seconds of the intermittent process of the speaker being in an unvoiced state. Referring to fig. 6, at the gap between S5 playing music 1 and S7 playing music 2, an "adaptive ANC phase" may be performed. Therefore, in the wearing process of the same user, if the wearing mode of the user is changed, the filter used for noise reduction can be replaced by executing the self-adaptive ANC stage for multiple times, and the good noise reduction effect with continuity is guaranteed.
In an exemplary embodiment, fig. 7 shows a flowchart of a noise reduction method for a headphone in yet another exemplary embodiment of the present application. Referring to fig. 7:
executing S3102-S3108, if the energy difference value of the two sound wave data is smaller than the preset energy difference value, it is indicated that the energy difference of the SPL of the two sound wave data collected by the feedforward microphone and the feedback microphone is not large, and it can be determined that the wearer of the earphone is in the unvoiced state.
The execution scenarios and specific embodiments of S3102 to S3108 are introduced in detail in the embodiment corresponding to fig. 3, and are not described herein again. In the noise reduction process of the headphone shown in fig. 7, before performing S210, it is determined whether the wearer is in an unvoiced state, i.e., the headphone wearer is not making sounds (e.g., speaking, sneezing, etc.); on the other hand, whether the earphone speaker is in the non-occurrence state or not is determined according to the first sound wave data acquired in S210 and the third sound wave data acquired in S210'. Therefore, in the present embodiment, if it is determined that the wearer is in the unvoiced state by S3108, S710 is performed. As described above, if it is determined that the wearer is in the vocal state through S3108, S330 is performed.
Illustratively, fig. 8 shows a schematic diagram of a noise reduction sequence for a headphone matched to the exemplary embodiment shown in fig. 7 of the present application. In contrast to fig. 6, in stage S1', the present embodiment performs unvoiced sound detection for the wearer. Compared to fig. 6, the cue tone at the S2 stage may not change. Compared to fig. 6, the "adaptive ANC stage" shown in fig. 8 includes not only S210, S210', S220 and S230, but also S710-S760.
Illustratively, in S710, the headset is adjusted to the first mode (no active noise control) described above, and S210: under the condition that the noise reduction mode of the earphone is a first mode, sound wave data lasting for a first preset time duration are simultaneously obtained through a feedforward microphone and a feedback microphone of the earphone, first sound wave data corresponding to the feedforward microphone and second sound wave data corresponding to the feedback microphone are obtained, and the first model is a mode without active noise control.
For example, the first preset time period is inversely related to a signal-to-noise ratio of the external environment noise, that is, the higher the signal-to-noise ratio of the external environment noise is, the shorter the first preset time period may be set, and the shorter the sound wave data acquisition time period is beneficial to shortening the time period required by the "adaptive ANC stage", so that the "adaptive ANC stage" is executed under the condition that the user is not sensitive, and the wearing experience of the earphone of the user is finally improved. For example, as mentioned above, the first preset duration may take a value of 500ms to 2s, and may take a value of 500ms, that is, in the first mode, the feedforward microphone and the feedback microphone simultaneously collect sound wave data of 500ms, so as to obtain first sound wave data "X" collected by the feedforward microphone ff_normal ", the second acoustic data" X "collected by the feed-back microphone fb_normal ”。
Further, the step S720 is executed: a first decibel value related to the external environment noise is calculated according to the first sound wave data. And executing S730 to determine whether the first decibel value is greater than a preset signal-to-noise ratio value. The range of the preset signal-to-noise ratio value is not larger than or equal to 50dB, and the value in the embodiment is 60dB.
Illustratively, according to 50332 standard, based on the first acoustic data X described above ff_normal A decibel value (denoted as the first decibel value) with respect to the ambient noise is calculated. In this embodiment, whether the speaker is currently in the unvoiced state is determined according to whether the first decibel value (reflecting the external environment noise) is greater than the preset signal-to-noise ratio value. Specifically, if the first decibel value is greater than the preset snr value by 60dB, which indicates that the speaker is currently in an unvoiced state, S740 is performed. Wherein, the two paths of data (the first sound wave data X) ff_normal And second acoustic data X fb_normal ) For calculating the first transfer function (as in equation (1)) described above. Illustratively, if the first decibel value is not greater than 60dB (signal-to-noise ratio preset value), which indicates that the speaker is currently in the sounding state, S330 is executed, i.e., the process of executing the "adaptive ANC stage" is exited.
Exemplarily, referring to the timing diagram shown in fig. 8, the "adaptive ANC phase" includes three sub-phases. The first sub-phase comprises S710+ S210+ S720+ S730, the second sub-phase comprises S740+ S210' + S750+ S760, and the third sub-phase comprises S220+ S230. Wherein the above embodiment corresponds to the first sub-stage of the "adaptive ANC stage". Specifically, S710 is executed: adjust the headset to the first mode (no active noise control) described above, and perform S210, further perform S720: calculating a first decibel value with respect to the external environment noise from the first acoustic wave data, and performing S730: and determining whether the first decibel value is larger than a preset signal-to-noise ratio value or not so as to determine whether the loudspeaker is in an unvoiced state or not.
In an exemplary embodiment, with continuing reference to fig. 7, in S740, the noise reduction mode of the headset is switched from the first mode to the second mode (active noise control mode), and S210': and under the condition that the noise reduction mode of the earphone is a second mode, simultaneously acquiring sound wave data lasting for a second preset time through the feedforward microphone and the feedback microphone to obtain third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone, wherein the second mode is an active noise control mode.
For example, the second preset time period is also inversely related to the signal-to-noise ratio of the external environment noise, that is, the higher the signal-to-noise ratio of the external environment noise is, the shorter the second preset time period may be set, and the shorter the sound wave data acquisition time period is beneficial to shortening the time period required by the "adaptive ANC stage", so that the "adaptive ANC stage" is executed under the condition that the user is not sensitive, and the wearing experience of the earphone of the user is finally improved. For example, the second preset time period may be the same as the first preset time period, or may be 500ms, that is, in the second mode, sound wave data of 500ms are collected by the feedforward microphone and the feedback microphone at the same time, so as to obtain third sound wave data "Y" collected by the feedforward microphone ff_anc ", the fourth sound data" Y "collected by the feedback microphone fb_anc ”。
Further, S750 is executed: and calculating a second decibel value related to the external environment noise according to the third sound wave data. And executing S760 to determine whether the second decibel value is greater than a preset signal-to-noise ratio value. Similarly, the range of the snr preset value is not greater than or equal to 50dB, and the value in this embodiment is 60dB.
Illustratively, according to 50332 standard, based on the third acoustic data Y described above ff_anc The decibel value (denoted as the second decibel value) with respect to the external environmental noise is calculated. In this embodiment, whether the speaker is currently in the unvoiced state is determined by whether the second decibel value is greater than the preset signal-to-noise ratio value. Specifically, if the second decibel value is greater than the preset snr value by 60dB, which indicates that the speaker is currently in an unvoiced state, S220 and S230 are performed. Wherein, the two paths of data (third sound wave data X) ff_normal And fourth sound wave data X fb_normal ) For calculating the above-mentioned second transfer function (as in equation (2)). Illustratively, if the second decibel value is not greater than 60dB (signal-to-noise ratio preset value), which indicates that the speaker is currently in the sounding state, S330 is executed, i.e., the process of executing the "adaptive ANC stage" is exited.
Wherein the above embodiments correspond to the second and third sub-stages of the "adaptive ANC stage". Specifically, S740 is executed: adjust the headphone to the above-described second mode (active noise control), and perform S210', further, perform S750: calculating a second decibel value with respect to the external environment noise from the third acoustic wave data, and performing S760: and determining whether the second decibel value is larger than a preset signal-to-noise ratio value or not so as to determine whether the loudspeaker is in an unvoiced state or not.
In the embodiment shown in fig. 7, a prerequisite such as S3102-S3108 (wearer unvoiced sound detection) is provided, and in case that the above prerequisite is satisfied, the flow about the "adaptive ANC stage" is executed, and in the "adaptive ANC stage", the speaker is determined to be in an unvoiced state through S730 and S760, so that the accuracy of the adaptive ANC can be effectively ensured.
In an exemplary embodiment, the curves for the target parameter shown with reference to fig. 9 include four curves for the target parameter. This is determined after performing the headphone noise reduction scheme shown in fig. 7 four times during the wearing of the same headphone by the same user. The noise reduction accuracy of the earphone provided by the embodiments of the present specification can be illustrated by the consistency of four curves with reference to fig. 9.
In an exemplary embodiment, the present application further provides an embodiment of determining a plurality of alternative filters. Illustratively, M filters meeting the preset test requirements are obtained first, and the filters are subjected to aggregation processing to obtain N filter banks, wherein the values of M and N are positive integers, and the value of M is larger than that of N; further, averaging the parameters of the filters in each filter bank to obtain a candidate filter corresponding to each filter bank. For example, 100 human samples are taken and debugged in a laboratory to determine 100 sets of ANC filters each achieving the best noise reduction effect, 20 filter banks are aggregated from the 100 sets of data, and further, the parameters of the filters in each filter bank are averaged to obtain 20 candidate filters corresponding to the 20 filter banks. Illustratively, 20 alternative filters are written to the earphone end.
After the embodiment corresponding to S220 provided in the present application determines the target parameters of the filter in the ANC mode, as a specific implementation manner of S230: calculating the similarity between the target parameter and the parameters of the candidate filters (for example, a preselected similarity algorithm), and determining the target filter from a plurality of candidate filters according to the similarity, for example, using the candidate filter with the highest similarity to the target parameter as the target filter, and finally performing a noise reduction operation based on the target filter.
In the earphone noise reduction scheme provided by the application, the earphone end automatically and adaptively determines the proper ANC filter in the alternative filter according to the differences of different human ears (the auricles of the different human ears may be different and the auditory canals of the different human ears may be different), the wearing mode and the like, and a group of filters which enable the user to achieve the optimal active noise reduction effect can be automatically matched with the user under the condition that the user does not sense the noise. The scheme flow is realized at the earphone end, the user does not need to perform external triggering on interfaces such as terminal application and the like, and the time consumption is short and the user does not have obvious perception.
It is to be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the method according to an exemplary embodiment of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 10 is a schematic structural diagram of a noise reduction device for earphones, to which an embodiment of the present application may be applied. Referring to fig. 10, the information transmission apparatus of the terminal shown in the figure can be implemented as all or a part of the terminal through software, hardware or a combination of both, and can also be integrated in the terminal or on the server as a separate module.
The noise reduction device 1000 of the earphone in the embodiment of the present application includes: an acoustic data determination module 1010, a target parameter determination module 1020, and a target filter determination module 1030.
Wherein, the acoustic data determining module 1010 is configured to: under the condition that the noise reduction mode of the earphone is a first mode, sound wave data lasting for a first preset time duration are simultaneously acquired through a feedforward microphone and a feedback microphone of the earphone, so that first sound wave data corresponding to the feedforward microphone and second sound wave data corresponding to the feedback microphone are obtained, and the first model is a mode without active noise control; the acoustic data determining module 1010 is further configured to: under the condition that the noise reduction mode of the earphone is a second mode, sound wave data lasting for a second preset time duration are simultaneously acquired through the feedforward microphone and the feedback microphone, third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone are obtained, and the second mode is an active noise control mode; the target parameter determining module 1020 is configured to: determining a target parameter for a filter based on an actual parameter of a default filter in the headphone, the first sound wave data, the second sound wave data, the third sound wave data, and the fourth sound wave data in the second mode; and the target filter determining module 1030, configured to: and determining a target filter based on the target parameters so as to carry out noise reduction operation based on the target filter.
In an exemplary embodiment, fig. 11 schematically illustrates a block diagram of a headphone noise reduction apparatus according to another exemplary embodiment of the present application. Please refer to fig. 11:
in an exemplary embodiment, based on the foregoing solution, the above-mentioned noise reduction device 1000 for a headphone further includes: a first unvoiced determination module 1040 and a second unvoiced determination module 1050.
The first unvoiced sound determination module 1040 is configured to: before the acoustic wave data determining module 1010 is configured to, when the noise reduction mode of the earphone is the first mode, simultaneously acquire acoustic wave data for a first preset time period through a feed-forward microphone and a feed-back microphone of the earphone: determining that a wearer of the headset is in an unvoiced state.
In an exemplary embodiment, based on the foregoing solution, the above-mentioned noise reduction device 1000 for a headphone further includes: the control module 1060 is repeatedly executed.
The repeated execution control module 1060 is configured to: in the case where it is determined that the wearer of the above-described headphones is in an unvoiced state, the following process is performed a plurality of times: under the condition that the noise reduction mode of the earphone is a first mode, sound wave data lasting for a first preset time duration are simultaneously acquired through a feedforward microphone and a feedback microphone of the earphone, first sound wave data corresponding to the feedforward microphone and second sound wave data corresponding to the feedback microphone are obtained, and the first model is a mode without active noise control; under the condition that the noise reduction mode of the earphone is a second mode, sound wave data lasting for a second preset time duration are simultaneously acquired through the feedforward microphone and the feedback microphone, so that third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone are obtained, wherein the second mode is an active noise control mode; determining a target parameter for a filter based on an actual parameter of a default filter in the headphone, the first sound wave data, the second sound wave data, the third sound wave data, and the fourth sound wave data in the second mode; and determining a target filter based on the target parameters so as to perform noise reduction operation based on the target filter.
In an exemplary embodiment, based on the foregoing solution, the first unvoiced sound determination module 1040 is specifically configured to: before the acoustic wave data determining module 1010 obtains acoustic wave data lasting for a first preset time period through a feedforward microphone and a feedback microphone of the earphone, to obtain first acoustic wave data corresponding to the feedforward microphone and second acoustic wave data corresponding to the feedback microphone, where the first model is a mode without active noise control: simultaneously acquiring sound wave data lasting for a third preset time through a feedforward microphone and a feedback microphone of the earphone to obtain fifth sound wave data corresponding to the feedforward microphone and sixth sound wave data corresponding to the feedback microphone; calculating a first sound pressure level corresponding to the fifth sound wave data and calculating a second sound pressure level corresponding to the sixth sound wave data; and calculating a difference value between the first sound pressure level and the second sound pressure level, and determining that the wearer of the earphone is in an unvoiced state under the condition that the difference value is smaller than a preset energy difference value. Further, the noise reduction mode of the earphone may be adjusted to the first mode, so that when the noise reduction mode of the earphone is the first mode, sound wave data lasting for a first preset time duration is simultaneously acquired through a feed-forward microphone and a feed-back microphone of the earphone.
In an exemplary embodiment, based on the foregoing scheme, the above-mentioned headphone noise reduction apparatus 1000 further includes a second unvoiced sound determination module 1050.
The second unvoiced sound determination module 1050 is configured to: after the acoustic data determining module 1010 obtains the first acoustic data corresponding to the feedforward microphone and the second acoustic data corresponding to the feedback microphone, determining that the speaker of the earphone is in an unvoiced state according to the first acoustic data, switching from the first mode to a second mode, so as to obtain third acoustic data corresponding to the feedforward microphone and fourth acoustic data corresponding to the feedback microphone by simultaneously obtaining acoustic data lasting for a second preset time through the feedforward microphone and the feedback microphone, where the second mode is an active noise control mode;
the second unvoiced sound determination module 1050 is further configured to: after the sound wave data determination module 1010 obtains the third sound wave data corresponding to the feedforward microphone and the fourth sound wave data corresponding to the feedforward microphone, and determines that the speaker of the headphone is in the unvoiced state based on the third sound wave data, the target parameter for the filter is determined based on the actual parameter of the default filter in the headphone, the first sound wave data, the second sound wave data, the third sound wave data, and the fourth sound wave data in the second mode.
In an exemplary embodiment, based on the foregoing scheme, the second unvoiced sound determination module 1050 is specifically configured to: calculating a first decibel value related to the external environment noise according to the first sound wave data; and determining that the loudspeaker of the earphone is in an unvoiced state under the condition that the first decibel value is larger than the preset signal-to-noise ratio value. Further, the noise reduction mode of the earphone may be switched from the first mode to the second mode, so that when the noise reduction mode of the earphone is the second mode, sound wave data lasting for a second preset time period may be simultaneously acquired through the feedforward microphone and the feedback microphone.
In an exemplary embodiment, based on the foregoing scheme, the second unvoiced sound determination module 1050 is specifically configured to: calculating a second decibel value related to the external environment noise according to the third sound wave data; and determining that the loudspeaker of the earphone is in an unvoiced state under the condition that the second decibel value is larger than the preset signal-to-noise ratio value.
In an exemplary embodiment, based on the foregoing solution, the target parameter determining module 1020 includes: a transfer function determination unit 10201 and a parameter determination unit 10202.
Wherein, the transfer function determining unit 10201 is configured to: calculating a first transfer function from the first acoustic data and the second acoustic data; and calculating a second transfer function according to the third sound wave data and the fourth sound wave data; the parameter determining unit 10202, configured to: determining target parameters for the filter based on the first transfer function, the second transfer function, and actual parameters of the default filter.
In an exemplary embodiment, based on the foregoing scheme, the parameter determining unit 10202 is specifically configured to: the target parameters for the filter are determined according to the following formula.
F target =-H normal /(H anc *F default_anc -H normal )
Wherein, F target Target parameter F representing the filter default_anc Indicates the default parameter, H, of the filter normal Represents the first transfer function, and H anc Representing the second transfer function.
In an exemplary embodiment, based on the foregoing scheme, the target filter determining unit 1030 is specifically configured to: calculating the similarity between the target parameters and the parameters of the alternative filters; and determining the target filter from a plurality of candidate filters according to the similarity so as to perform noise reduction operation based on the target filter.
In an exemplary embodiment, based on the foregoing solution, the above-mentioned noise reduction device 1000 for a headphone further includes: an alternative filter determination module 1070.
The candidate filter determining module 1070 is configured to, before the target filter determining unit 930 is configured to calculate the similarity between the target parameter and the parameter of the candidate filter: obtaining M filters meeting the requirement of a preset test, and carrying out aggregation processing on the filters to obtain N filter groups, wherein the values of M and N are positive integers, and the value of M is greater than that of N; and averaging the parameters of the filters in each filter bank to obtain a candidate filter corresponding to each filter bank.
In an exemplary embodiment, based on the foregoing solution, the above-mentioned noise reduction device 1000 for a headphone further includes: a detection module 1080.
The detecting module 1080 is configured to detect whether the terminal is in a scene where songs are played, and execute the above earphone noise reduction method in a gap between two songs when the terminal is detected to be in the scene where songs are played; wherein, the terminal and the earphone have a pairing relationship.
It should be noted that, when the information transmission apparatus of the terminal according to the foregoing embodiment executes the information transmission method of the terminal, only the division of the functional modules is taken as an example, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the functions described above. In addition, the information transmission apparatus of the terminal and the information transmission method of the terminal provided in the above embodiments belong to the same concept, and for details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the information transmission method of the terminal described above in the present application, and details are not repeated here.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the method of any one of the foregoing embodiments. The computer-readable storage medium may include, but is not limited to, any type of disk including floppy disks, optical disks, DVDs, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
The embodiment of the present application further provides an earphone, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of any of the above-mentioned embodiments of the method are implemented.
Fig. 12 schematically shows a structural diagram of the earphone. Referring to fig. 12, the headset 1200 includes: a processor 1201 and a memory 1202.
In this embodiment, the processor 1201 is a control center of the headset. Processor 1201 may include one or more processing cores. The processor 1201 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in a wake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state.
In this embodiment of the application, the processor 1201 is specifically configured to:
under the condition that the noise reduction mode of the earphone is a first mode, sound wave data lasting for a first preset time duration are simultaneously acquired through a feedforward microphone and a feedback microphone of the earphone, so that first sound wave data corresponding to the feedforward microphone and second sound wave data corresponding to the feedback microphone are obtained, and the first model is a mode without active noise control; under the condition that the noise reduction mode of the earphone is a second mode, sound wave data lasting for a second preset time duration are simultaneously acquired through the feedforward microphone and the feedback microphone, third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone are obtained, and the second mode is an active noise control mode; determining a target parameter for a filter based on an actual parameter of a default filter in the headphone, the first acoustic data, the second acoustic data, the third acoustic data, and the fourth acoustic data in the second mode; and determining a target filter based on the target parameters so as to perform noise reduction operation based on the target filter.
Further, the processor 1201 is further configured to:
before the acoustic wave data lasting for the first preset time duration is simultaneously acquired through the feedforward microphone and the feedback microphone of the earphone under the condition that the noise reduction mode of the earphone is the first mode: determining that a wearer of said headset is in an unvoiced state.
Further, the processor 1201 is further configured to:
in the case where it is determined that the wearer of the above-described headphones is in an unvoiced state, performing, a plurality of times: under the condition that the noise reduction mode of the earphone is a first mode, sound wave data lasting for a first preset time duration are simultaneously acquired through a feedforward microphone and a feedback microphone of the earphone, so that first sound wave data corresponding to the feedforward microphone and second sound wave data corresponding to the feedback microphone are obtained, and the first model is a mode without active noise control; under the condition that the noise reduction mode of the earphone is a second mode, sound wave data lasting for a second preset time duration are simultaneously acquired through the feedforward microphone and the feedback microphone, third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone are obtained, and the second mode is an active noise control mode; and determining a target parameter for a filter based on an actual parameter of a default filter in the headphone, the first sound wave data, the second sound wave data, the third sound wave data, and the fourth sound wave data in the second mode; and determining a target filter based on the target parameters so as to carry out noise reduction operation based on the target filter.
Further, the determining that the wearer of the headset is in an unvoiced state includes: simultaneously acquiring sound wave data lasting for a third preset time through a feedforward microphone and a feedback microphone of the earphone to obtain fifth sound wave data corresponding to the feedforward microphone and sixth sound wave data corresponding to the feedback microphone; calculating a first sound pressure level corresponding to the fifth sound wave data and calculating a second sound pressure level corresponding to the sixth sound wave data; and calculating a difference value between the first sound pressure level and the second sound pressure level, and determining that the wearer of the earphone is in an unvoiced state under the condition that the difference value is smaller than a preset energy difference value.
Further, the processor 1201 is further configured to:
after the first sound wave data corresponding to the feedforward microphone and the second sound wave data corresponding to the feedback microphone are obtained, determining that a loudspeaker of the earphone is in an unvoiced state according to the first sound wave data, and switching from the first mode to a second mode to simultaneously obtain sound wave data lasting for a second preset time through the feedforward microphone and the feedback microphone to obtain third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone, wherein the second mode is an active noise control mode;
after the third sound wave data corresponding to the feedforward microphone and the fourth sound wave data corresponding to the feedforward microphone are obtained, if it is determined that the speaker of the earphone is in a non-sound state based on the third sound wave data, a target parameter for a filter is determined based on an actual parameter of a default filter in the earphone in the second mode, the first sound wave data, the second sound wave data, the third sound wave data, and the fourth sound wave data.
Further, the determining that the speaker of the earphone is in an unvoiced state according to the first sound wave data includes: calculating a first decibel value related to the external environment noise according to the first sound wave data; and determining that the loudspeaker of the earphone is in an unvoiced state under the condition that the first decibel value is larger than the preset signal-to-noise ratio value.
Further, the determining that the speaker of the earphone is in an unvoiced state according to the third sound wave data includes: calculating a second decibel value related to the external environment noise according to the third sound wave data; and under the condition that the second decibel value is larger than the preset signal-to-noise ratio value, determining that the loudspeaker of the earphone is in an unvoiced state.
Further, the determining a target parameter for a filter based on an actual parameter of a default filter in the headphone, the first sound wave data, the second sound wave data, the third sound wave data, and the fourth sound wave data in the second mode includes: calculating a first transfer function from the first acoustic data and the second acoustic data; calculating a second transfer function according to the third sound wave data and the fourth sound wave data; and determining target parameters for the filter based on the first transfer function, the second transfer function, and actual parameters of the default filter.
Further, the determining the target parameter of the filter according to the first transfer function, the second transfer function and the default parameter of the filter includes:
F target =-H normal /(H anc *F default_anc -H normal )
wherein, F target Target parameter F representing the filter default_anc A default parameter, H, representing the filter normal Represents the first transfer function, and H anc Representing the second transfer function.
Further, the determining a target filter based on the target parameter for performing a noise reduction operation based on the target filter includes: calculating the similarity between the target parameters and the parameters of the alternative filter; and determining the target filter from a plurality of candidate filters according to the similarity so as to perform noise reduction operation based on the target filter.
Further, the processor is further configured to:
before the similarity between the target parameter and the parameter of the candidate filter is calculated: obtaining M filters meeting the preset test requirements, and performing aggregation processing on the filters to obtain N filter groups, wherein the values of M and N are positive integers, and the value of M is greater than that of N; and averaging the parameters of the filters in each filter group to obtain a candidate filter corresponding to each filter group.
Further, the processor 1201 is further specifically configured to:
detecting whether the terminal is in a song playing scene or not; executing the earphone noise reduction method in a playing gap between two songs when the terminal is detected to be in a song playing scene; wherein, the terminal and the earphone have a pairing relationship.
In some embodiments, the terminal 1200 further includes: a peripheral interface 1203 and at least one peripheral. The processor 1201, memory 1202, and peripheral interface 1203 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1203 via buses, signal lines, or circuit boards. Specifically, the peripheral device includes: audio circuitry 1204, and so on.
The peripheral interface 1203 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1201 and the memory 1202. In some embodiments of the present application, the processor 1201, the memory 1202, and the peripheral interface 1203 are integrated on the same chip or circuit board; in some other embodiments of the application, any one or both of the processor 1201, the memory 1202, and the peripheral interface 1203 may be implemented on separate chips or circuit boards. The embodiment of the present application is not particularly limited to this.
The audio circuitry 1204 may include a feed-forward microphone and a feed-back microphone. Each microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1201 for processing.
A power supply 1205 is used to supply power to the headset 1200. The power supply 1205 may be alternating current, direct current, disposable battery, or rechargeable battery. When the power supply 1205 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
The block diagram of the terminal structure shown in the embodiments of the present application does not limit the terminal 1200, and the terminal 1200 may include more or less components than those shown, or may combine some components, or adopt a different arrangement of components.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Accordingly, all equivalent changes made by the claims of this application are intended to be covered by this application.
Claims (14)
1. A method for reducing noise in a headphone, the method comprising:
under the condition that the noise reduction mode of the earphone is a first mode, sound wave data lasting for a first preset time duration are simultaneously acquired through a feedforward microphone and a feedback microphone of the earphone, so that first sound wave data corresponding to the feedforward microphone and second sound wave data corresponding to the feedback microphone are obtained, and the first model is a mode without active noise control;
under the condition that the noise reduction mode of the earphone is a second mode, sound wave data lasting for a second preset time duration are simultaneously acquired through the feedforward microphone and the feedback microphone, so that third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone are obtained, wherein the second mode is an active noise control mode;
determining a target parameter for a filter from the actual parameters of a default filter in the earpiece, the first acoustic data, the second acoustic data, the third acoustic data, and the fourth acoustic data in the second mode;
and determining a target filter based on the target parameters so as to carry out noise reduction operation based on the target filter.
2. The method of claim 1, wherein before simultaneously acquiring sound wave data for a first preset duration through a feed-forward microphone and a feed-back microphone of the headset in the case that the noise reduction mode of the headset is the first mode, the method further comprises:
determining that a wearer of the headset is in an unvoiced state.
3. The method of claim 2, wherein the determining that the wearer of the headset is in an unvoiced state comprises:
simultaneously acquiring sound wave data lasting for a third preset time through a feedforward microphone and a feedback microphone of the earphone to obtain fifth sound wave data corresponding to the feedforward microphone and sixth sound wave data corresponding to the feedback microphone;
calculating a first sound pressure level corresponding to the fifth sound wave data and calculating a second sound pressure level corresponding to the sixth sound wave data;
and calculating a difference value between the first sound pressure level and the second sound pressure level, and determining that the wearer of the earphone is in an unvoiced state under the condition that the difference value is smaller than a preset value of energy difference.
4. The method of any of claims 1-3, wherein after the obtaining first acoustic data corresponding to the feedforward microphone and second acoustic data corresponding to the feedforward microphone, the method further comprises:
determining that a loudspeaker of the earphone is in a non-sounding state according to the first sound wave data, and switching from the first mode to a second mode to simultaneously acquire sound wave data lasting for a second preset time through the feedforward microphone and the feedback microphone to obtain third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone, wherein the second mode is an active noise control mode;
after the obtaining of the third sound wave data corresponding to the feedforward microphone and the fourth sound wave data corresponding to the feedback microphone, the method further includes:
and determining that the loudspeaker of the earphone is in an unvoiced state according to the third sound wave data, and determining target parameters related to a filter according to actual parameters of a default filter in the earphone, the first sound wave data, the second sound wave data, the third sound wave data and the fourth sound wave data in the second mode.
5. The method of claim 4, wherein determining from the first acoustic data that a speaker of the headset is in an unvoiced state comprises:
calculating a first decibel value related to the external environment noise according to the first sound wave data;
and under the condition that the first decibel value is larger than the preset signal-to-noise ratio value, determining that a loudspeaker of the earphone is in an unvoiced state.
6. The method of claim 4, wherein determining from the third acoustic data that a speaker of the headset is in an unvoiced state comprises:
calculating a second decibel value related to the external environment noise according to the third sound wave data;
and under the condition that the second decibel value is larger than the preset signal-to-noise ratio value, determining that the loudspeaker of the earphone is in an unvoiced state.
7. The method according to any one of claims 1 to 3, wherein the determining target parameters for a filter from actual parameters of a default filter in the headset in the second mode, the first sonic data, the second sonic data, the third sonic data, and the fourth sonic data comprises:
calculating a first transfer function from the first acoustic data and the second acoustic data;
calculating a second transfer function according to the third sound wave data and the fourth sound wave data;
determining target parameters for the filter based on the first transfer function, the second transfer function, and actual parameters of the default filter.
8. The method of claim 7, wherein determining the target parameters of the filter based on the first transfer function, the second transfer function, and default parameters of the filter comprises:
F target =-H normal /(H anc *F default_anc -H normal )
wherein, F target Representing a target parameter, F, of said filter default_anc A default parameter, H, representing the filter normal Representing the first transfer function, and H anc Representing the second transfer function.
9. The method according to any one of claims 1 to 3, wherein the determining a target filter based on the target parameter for performing a noise reduction operation based on the target filter comprises:
calculating the similarity between the target parameter and the parameter of the alternative filter;
and determining the target filter from a plurality of alternative filters according to the similarity so as to perform noise reduction operation based on the target filter.
10. The method of claim 9, wherein prior to said calculating the similarity between the target parameter and the parameters of the alternative filter, the method further comprises:
obtaining M filters meeting the preset test requirements, and performing aggregation processing on the filters to obtain N filter groups, wherein the values of M and N are positive integers, and the value of M is larger than that of N;
and averaging the parameters of the filters in each filter bank to obtain a candidate filter corresponding to each filter bank.
11. The method of claim 1, further comprising:
detecting whether the terminal is in a song playing scene or not;
executing the earphone noise reduction method in a playing gap between two songs when the terminal is detected to be in a song playing scene;
and the terminal and the earphone have a pairing relationship.
12. An apparatus for reducing noise in a headphone, the apparatus comprising:
a sound wave data determination module to: under the condition that the noise reduction mode of the earphone is a first mode, sound wave data lasting for a first preset time duration are simultaneously acquired through a feedforward microphone and a feedback microphone of the earphone, so that first sound wave data corresponding to the feedforward microphone and second sound wave data corresponding to the feedback microphone are obtained, and the first model is a mode without active noise control;
the acoustic data determination module is further configured to: under the condition that the noise reduction mode of the earphone is a second mode, sound wave data lasting for a second preset time duration are simultaneously acquired through the feedforward microphone and the feedback microphone, third sound wave data corresponding to the feedforward microphone and fourth sound wave data corresponding to the feedback microphone are obtained, and the second mode is an active noise control mode;
a target parameter determination module to: determining a target parameter for a filter from the actual parameters of a default filter in the earpiece, the first acoustic data, the second acoustic data, the third acoustic data, and the fourth acoustic data in the second mode;
a target filter determination module to: and determining a target filter based on the target parameters so as to carry out noise reduction operation based on the target filter.
13. A headset comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 11 when executing the computer program.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211118448.4A CN115499744A (en) | 2022-09-14 | 2022-09-14 | Earphone noise reduction method and device, computer readable storage medium and earphone |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211118448.4A CN115499744A (en) | 2022-09-14 | 2022-09-14 | Earphone noise reduction method and device, computer readable storage medium and earphone |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115499744A true CN115499744A (en) | 2022-12-20 |
Family
ID=84469005
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211118448.4A Pending CN115499744A (en) | 2022-09-14 | 2022-09-14 | Earphone noise reduction method and device, computer readable storage medium and earphone |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115499744A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117156333A (en) * | 2023-02-24 | 2023-12-01 | 荣耀终端有限公司 | Noise reduction method, earphone device and storage medium |
-
2022
- 2022-09-14 CN CN202211118448.4A patent/CN115499744A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117156333A (en) * | 2023-02-24 | 2023-12-01 | 荣耀终端有限公司 | Noise reduction method, earphone device and storage medium |
CN117156333B (en) * | 2023-02-24 | 2024-09-10 | 荣耀终端有限公司 | Noise reduction method, earphone device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021114953A1 (en) | Voice signal acquisition method and apparatus, electronic device, and storage medium | |
US20120191454A1 (en) | Method and Apparatus for Obtaining Statistical Data from a Conversation | |
CN113630708B (en) | Method and device for detecting abnormal earphone microphone, earphone kit and storage medium | |
CN108076226A (en) | A kind of method, mobile terminal and the storage medium of speech quality adjustment | |
CN108320751B (en) | Voice interaction method, device, equipment and server | |
CN111754969B (en) | Noise reduction method and device, electronic equipment and noise reduction system | |
WO2022140928A1 (en) | Audio signal processing method and system for suppressing echo | |
CN112947886B (en) | Method and device for protecting hearing of user and electronic equipment | |
CN109314814B (en) | Active noise reduction method and earphone | |
US20120189129A1 (en) | Apparatus for Aiding and Informing a User | |
CN113038337B (en) | Audio playing method, wireless earphone and computer readable storage medium | |
US8885852B2 (en) | Audio control system | |
US20220366932A1 (en) | Methods and apparatus for detecting singing | |
CN115499744A (en) | Earphone noise reduction method and device, computer readable storage medium and earphone | |
WO2020019844A1 (en) | Speech data processing method and related product | |
CN108605067B (en) | Method for playing audio and mobile terminal | |
TW202019191A (en) | Headset | |
CN113096677A (en) | Intelligent noise reduction method and related equipment | |
CN113613157A (en) | Earphone, wearing state detection method and device thereof, and storage medium | |
WO2023093412A1 (en) | Active noise cancellation method and electronic device | |
WO2023197474A1 (en) | Method for determining parameter corresponding to earphone mode, and earphone, terminal and system | |
CN115052070A (en) | Method and device for adjusting call volume, call equipment and medium | |
CN107493376A (en) | A kind of ringing volume adjusting method and device | |
CN114299998A (en) | Voice signal processing method and device, electronic equipment and storage medium | |
CN113873382A (en) | Headset control method, headset, and computer-readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |