Method, device, medium, equipment and earphone for determining transparent adaptive filter
By obtaining the target path transfer function and dynamically adjusting the filter weight parameters, the stability of the transmissive headphones under the wearing method and environment changes is solved, and high-quality audio output and ambient sound transmission in the motion state are achieved.
Patent Information
- Application Number
- CN202411437443.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-10-15
AI Technical Summary
The existing transparent inlet earphones have poor transmissive stability due to changes in wearing methods, especially in sports, and cannot adapt to different wearing methods and environmental changes.
By obtaining the preset target path transfer function and current weight parameters, using external and internal microphones to collect signals, calculate the expected signal and error signals, and dynamically adjust the weight parameters of the filter to adapt to wear mode and environmental changes.
Provide more accurate and natural acoustic transmission effects in complex environments, improve user experience, and realize intelligent management of acoustic transparency.
Smart Images

Figure CN119342381B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of transparent in-ear headphones, and specifically relates to a method, device, medium, equipment and headphones for determining a transparent adaptive filter. Background Art
[0002] Ambient sound transmission is a technology that allows users to clearly and naturally hear their surroundings while wearing headphones. This allows for the convenient experience of communicating with others without removing the headphones, which is particularly important for those who need to communicate in noisy environments. For users who need to wear headphones outdoors, being able to clearly hear ambient sounds helps ensure their safety. When it comes to audio applications for augmented reality (AR), the primary goal is to enable headphones to transmit external sounds naturally and accurately.
[0003] The structure of the prior art through-ear earphone is as follows Figure 1 As shown, it mainly includes: an external microphone, a secondary speaker, an internal microphone and a filter. The external microphone can collect ambient sound, and then the filter processes the collected ambient sound according to the preset weight parameters to generate an analog signal, and then the analog signal is output by the secondary speaker, so that the sound received by the human ear is restored as much as possible to the sound received when not wearing headphones. The internal microphone is closer to the human ear than the secondary speaker and is used to collect external sounds received at the human ear. Among them, since wearing headphones will hinder the natural transmission of external sounds, but it cannot completely achieve isolation from external sounds, there will still be residual signals passing through the human ear from external sounds. Therefore, when wearing through-ear headphones, the sounds received by the human ear mainly include: the residual signals generated by the direct transmission of external sounds and the analog signals played by the secondary speaker.
[0004] However, since the positional relationship between the earphones and the ears is not constant when people wear earphones, the residual signal heard by the human ear will be different due to different wearing methods. The existing technology generates analog signals by giving the filter a fixed weight parameter, which cannot be adaptively adjusted according to the wearing method of the earphones. Therefore, the transparent transmission stability of the transparent earphones is poor, especially when the user is in motion. At this time, the positional relationship between the earphones and the ears will change differently with the movement, which makes the transparent transmission stability of the transparent earphones in the existing technology even worse. Summary of the Invention
[0005] In response to the above technical problems, the present invention proposes a method, device, medium, equipment and headphones for determining a transparent adaptive filter. The present application obtains a preset target path transfer function and the current weight parameters of the filter, and obtains an input signal through the external microphone of the transparent in-ear headphone, and obtains a superimposed signal through the internal microphone; determines an expected signal based on the input signal and the target path transfer function; determines a first error signal based on the expected signal and the superimposed signal; and determines the target weight parameters of the filter based on the first error signal and the current weight parameters. It can provide a more accurate and natural environmental sound transmission effect under various complex environmental conditions. This improvement significantly enhances the user experience, allowing the headphones to truly achieve intelligent management of acoustic transparency while maintaining high-quality audio output.
[0006] To solve the above technical problems, the technical solution provided by the present invention includes five aspects.
[0007] In the first aspect, the present application provides a method for determining a transparent adaptive filter, including: obtaining a preset target path transfer function and the current weight parameters of the filter, and obtaining an input signal through the external microphone of the transparent in-ear headphone, and obtaining a superimposed signal through the internal microphone; determining an expected signal based on the input signal and the target path transfer function; determining a first error signal based on the expected signal and the superimposed signal; and determining the target weight parameters of the filter based on the first error signal and the current weight parameters.
[0008] In some embodiments, determining the first error signal based on the expected signal and the superimposed signal includes: obtaining the input autopower spectrum of the input signal, the expected autopower spectrum of the expected signal, and the cross-power spectrum of the input signal and the expected signal; determining the number of time-shift points of the expected signal based on the input autopower spectrum, the expected autopower spectrum, and the cross-power spectrum; determining the expected time-shifted signal based on the number of time-shift points and the expected signal; and determining the first error signal based on the expected time-shifted signal and the superimposed signal.
[0009] In some embodiments, determining the target weight parameters of the filter based on the first error signal and the current weight parameters includes: obtaining a preset secondary path estimate and a preset basic update step size; determining the filtered signal of the filter based on the input signal and the secondary path estimate; and determining the target weight parameters based on the filtered signal, the first error signal, the current weight parameters, and the basic update step size.
[0010] In some embodiments, determining the target weight parameter based on the filtered signal, the first error signal, the current weight parameter and the basic update step includes: determining a first relationship between the basic update step and the filtered signal based on the first error signal; determining the real-time update step of the filter based on the first relationship and the basic update step; determining the target weight parameter based on the real-time update step, the filtered signal, the current weight parameter and the first error signal.
[0011] In some embodiments, determining the target weight parameter based on the real-time update step, the filter signal, the current weight parameter and the first error signal includes: determining a first update formula of the filter based on the current weight information, the first error signal and the filter signal; determining a second update formula of the filter based on the first update formula and the real-time update step; and determining the target weight parameter based on the second update formula.
[0012] In some embodiments, the second update formula is as follows: Where, is the target weight parameter of the filter, is the current weight parameter of the filter, is the weight vector; is the lth parameter of the filter with a filter length of L, is the basic update step size, To update the step size in real time, is the filtered signal, is the first error signal, To represent a constant.
[0013] In the second aspect, the present application proposes a device for determining a transparent adaptive filter, including: a first acquisition module, used to obtain a preset target path transfer function and the current weight parameters of the filter, and obtain the input signal through the external microphone of the transparent in-ear headphone, and obtain the superimposed signal through the internal microphone; a first determination module, used to determine the expected signal based on the input signal and the target path transfer function; a second determination module, used to determine a first error signal based on the expected signal and the superimposed signal signal; a third determination module, used to determine the first error signal based on the expected signal and the superimposed signal signal; a third determination module, used to determine the target weight parameters of the filter based on the first error signal and the current weight parameters.
[0014] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of the methods described in the first aspect.
[0015] In a fourth aspect, the present application provides a readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.
[0016] In a fifth aspect, the present application provides a through-ear earphone, comprising: an earphone body and an electronic device as described in the third aspect, wherein the electronic device is connected to the earphone body.
[0017] The beneficial effects created by the present invention are as follows: the present application obtains a preset target path transfer function and the current weight parameters of the filter, obtains an input signal through the external microphone of the in-ear headphone, and obtains a superimposed signal through the internal microphone; determines an expected signal based on the input signal and the target path transfer function; determines a first error signal based on the expected signal and the superimposed signal; and determines the target weight parameters of the filter based on the first error signal and the current weight parameters. This improvement significantly enhances the user experience by enabling the headphones to achieve intelligent management of acoustic transparency while maintaining high-quality audio output. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The scope of the present disclosure may be better understood by reading the following detailed description of exemplary embodiments in conjunction with the accompanying drawings, which include:
[0019] Figure 1 A schematic structural diagram of a translucent in-ear headset provided in an embodiment of the present application;
[0020] Figure 2 An overall flow chart of a method for determining a transparent transmission adaptive filter provided in an embodiment of the present application;
[0021] Figure 3 A schematic block diagram of a control system for a through-ear headphone provided in an embodiment of the present application;
[0022] Figure 4 This is a structural block diagram of a device for determining a transparent adaptive filter provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0024] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0025] If similar descriptions of "first\second\third" appear in the application documents, the following explanation will be added. In the following description, the terms "first\second\third" are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0027] Example 1:
[0028] Since the positional relationship between the earphones and the ears is not constant when people wear earphones, the residual signal heard by the human ear will be different due to different wearing methods. The existing technology generates analog signals by giving the filter a fixed weight parameter, which cannot be adaptively adjusted according to the wearing method of the earphones. As a result, the transparent transmission stability of the transparent earphones is poor, especially when the user is in motion. At this time, the positional relationship between the earphones and the ears will change differently with the movement, which makes the transparent transmission stability of the transparent earphones in the existing technology even worse.
[0029] In view of the problems existing in the existing technology, such as Figure 2 As shown, the present application provides a method for determining a transparent adaptive filter, which is applied to an electronic device, which can be a server, a mobile terminal, a computer, a cloud platform, etc. The functions implemented by the device data processing provided in the embodiments of the present application can be implemented by calling program code by a processor of the electronic device, wherein the program code can be stored in a computer storage medium. The method for determining a transparent adaptive filter includes:
[0030] Step S1: obtaining a preset target path transfer function and current weight parameters of a filter, obtaining an input signal through an external microphone of a through-ear headphone, and obtaining a superimposed signal through an internal microphone.
[0031] The external microphone of the transparent earphones can collect ambient sound, that is, the input signal mentioned in this application. The secondary speaker plays the analog signal generated by the filter according to the input signal, and restores the external sound as much as possible. The internal microphone is closer to the human ear than the secondary speaker and is used to collect the sound received at the human ear. Among them, since wearing headphones will hinder the natural transmission of external sounds, it is difficult for the human ear to directly obtain external sounds when wearing headphones. However, this application wants the human ear to obtain the same external sounds when wearing headphones as when not wearing headphones. It is necessary to clarify a reference signal for correcting the filter weight parameters, that is, the expected signal. The expected signal is the external signal collected at the human ear when the human ear is not wearing headphones. Of course, no matter how the current headphones are worn, they cannot completely isolate the external sounds, so there will still be residual signals transmitted to the internal microphone through the external sounds. Therefore, when wearing transparent earphones, the external sounds received by the human ear mainly include: the residual signal generated by the direct transmission of external sounds and the compensation signal when the analog signal played by the secondary speaker reaches the internal microphone. Therefore, for the human ear, the external sound heard when wearing headphones is the superposition of the compensation signal and the residual signal, that is, the superposition signal, and the superposition signal can be collected by the internal microphone. The superposition signal collected at this time is the superposition of the analog signal generated by the filter based on the current weight parameters and the residual signal, but when the external input signal changes, the residual signal will also change accordingly. If the current weight parameters are still collected to generate the analog signal at this time, the difference between the superposition signal and the real sound will be large. Moreover, the main path transfer function of input signals of different frequencies is different when they are naturally transmitted to the human ear. Therefore, if the transparent transmission headphones want to achieve a stable transparent transmission effect, it is necessary to update the weight parameters of the filter in real time according to the input signal. The weight parameters that need to be updated in this application are called target weight parameters. If you want to obtain the target weight parameters, you need to first obtain the current weight parameters, update them based on the current weight parameters, and then obtain the target weight parameters.
[0032] The desired signal cannot be obtained in real time while wearing headphones, but we can obtain the transfer function of external sound when it is transmitted to the human ear when not wearing headphones, that is, the target path transfer function of this application. Once the target path transfer function is obtained, we can calculate the desired signal at this time based on the input signal. However, when calculating the target path transfer function, it is necessary to perform the technique without wearing headphones.
[0033] Therefore, when calculating the target path transfer function, it is necessary to first obtain the desired signal directly collected when not wearing headphones. In this application, when obtaining the desired signal, pink noise is played as the excitation signal, and the desired signal when not wearing headphones is collected, as well as the residual signal and input signal after wearing headphones. Then, white noise is played through the secondary speaker, and the compensation signal formed by the propagation of white noise is collected at the internal microphone.
[0034] The secondary path is formed from the secondary speaker to the internal microphone, the primary path is formed from the external microphone to the internal microphone, and the target path is formed from the external microphone to the human ear when the headphones are not worn.
[0035] Therefore, the control block diagram designed for the pass-through earphone in this application is as follows Figure 3 As shown. is the main path transfer function, which represents the acoustic path between the external microphone and the internal microphone when wearing the headset; is the secondary path transfer function, which represents the acoustic path from the secondary speaker to the internal microphone, is the estimate of the secondary path transfer function; is the target path transfer function, which represents the acoustic path between the external microphone when wearing headphones and the human ear when not wearing headphones, is an estimate of the target path transfer function. is an adaptive HT controller, i.e. a filter.
[0036] Step S2: determining an expected signal according to the input signal and the target path transfer function.
[0037] Since the present application has obtained the preset target path transfer function and input signal, the expected signal corresponding to the current input signal can be easily calculated under the premise of clarifying the target path transfer function and input signal.
[0038] Step S3: Determine a first error signal according to the expected signal and the superimposed signal.
[0039] In some embodiments, step S3 of “determining a first error signal according to the expected signal and the superimposed signal” includes:
[0040] Step S31: obtaining an input autopower spectrum of the input signal, an expected autopower spectrum of the expected signal, and a cross power spectrum between the input signal and the expected signal.
[0041] Step S32: determining the number of time-shift points of the desired signal according to the input autopower spectrum, the expected autopower spectrum, and the cross-power spectrum.
[0042] Step S33: determining an expected time-shifted signal according to the time-shift point number and the expected signal.
[0043] Step S34: determining a first error signal according to the desired time-shifted signal and the superimposed signal.
[0044] Since the input signal and the expected signal cannot be collected at the same time, the expected signal in this application is calculated through the input signal, but there is a large difference between the calculated expected signal and the actually collected expected signal, and thus the actual correlation between the expected signal and the input signal is very low, almost zero, so the expected signal at this time cannot be directly used for other calculations, so it is also necessary to calculate the number of time-shift points of the input signal and the expected signal so that the expected signal can be aligned at both ends of the input signal, so that the correlation between the two is improved.
[0045] First define the input signal and expected signals The correlation function between them is:
[0046] , where and Denotes the expected signal and input signal The autopower spectrum of is the cross power spectrum, Indicates frequency. Correlation is a normalized cross-spectral density function that satisfies the following constraints at all frequencies:
[0047]
[0048] In order to select the optimal number of time offset points, the average amplitude square correlation is used as the evaluation indicator. It can be expressed as:
[0049] ,in are the sampling points in the frequency domain.
[0050] like Figure 3 As shown, the delayed time shift points Acting on the expected signal , through constant change , find a way to make C avg Maximize the number of time-shift points so that the input signal and the expected signal satisfy the causal relationship.
[0051] Therefore, in this application, after the number of time shift points is determined, the expected time shift signal can be determined based on the number of time shift points and the expected signal.
[0052] Step S4: determining a target weight parameter of the filter according to the first error signal and the current weight parameter.
[0053] In some embodiments, step S4 “determining the target weight parameter of the filter according to the first error signal and the current weight parameter” includes:
[0054] Step S41: Obtain a preset secondary path estimate and a preset basic update step size.
[0055] Step S42: Determine a filtered signal of the filter according to the input signal and the secondary path estimation.
[0056] Although the secondary path can be measured in theory, in actual applications, the secondary path transfer function is unknown, such as Figure 3 As shown, an additional filter must be estimated , which is referred to as the secondary path estimation here. Therefore, the input signal after this secondary path estimation generates the input signal of the filter, that is, the filtered signal. So after the input signal passes through the secondary path estimation, it will generate The input signal of the filter can also be understood as the signal that the filter needs to filter, so it is called the filtered signal in this application.
[0057] Step S43: determining the target weight parameter according to the filtered signal, the first error signal, the current weight parameter and the basic update step size.
[0058] In some embodiments, step S43 “determining the target weight parameter according to the filtered signal, the first error signal, the current weight parameter and the basic update step size” includes:
[0059] Step S431: determining a first relationship between a basic update step size and the filtered signal according to a first error signal.
[0060] Step S432: Determine the real-time update step size of the filter according to the first relationship and the basic update step size.
[0061] Step S433: determining the target weight parameter according to the real-time update step size, the filtered signal, the current weight parameter and the first error signal.
[0062] step length The update of the filter is very important, and it has a great impact on stability, convergence speed, and misadjustment parameters. When fast convergence is required, a larger step size can be selected. However, this will lead to larger misadjustment parameters. If the step size is too large, the algorithm will not converge. On the other hand, a small step size will lead to smaller misadjustment, but it will also lead to slower convergence. The stability condition of the step size is:
[0063] ,in is the autocorrelation matrix traces.
[0064] Therefore, a basic update step size is set in this application, and then the relationship between the basic update step size and the filtered signal is established by using the normalized least mean square algorithm, so that the update step size in actual calculation can change with the change of the filtered signal, so as to ensure both stability and rapid convergence.
[0065] In some embodiments, step S433 “determining the target weight parameter according to the real-time update step size, the filtered signal, the current weight parameter and the first error signal” includes:
[0066] Step S4331: Determine a first update formula of the filter according to the current weight information, the first error signal and the filtered signal.
[0067] In the field of acoustics, the minimum mean square error is usually used as the weight update formula, and the instantaneous error estimate is usually used instead of the average error.
[0068] Therefore, the weight update formula in this application is: ,in is the first error signal.
[0069] According to the gradient descent method, the weight update formula can be converted to: , and among them express right Find the partial derivative, which can be expressed as: .
[0070] According to Figure 3 It can be known that: ,in represents the desired time-shifted signal, i.e. , Indicates compensation signal and residual signal The superposition signal generated by the superposition can be expressed as: .in The output signal of the filter after passing through the secondary path can be expressed as: .
[0071] The output signal of the filter Expressed as: , among which is the current weight parameter; is the lth parameter of the filter of length L, Input signal picked up by an external microphone.
[0072] So according to the above 、 、 The following relationship is obtained:
[0073] , among which , * indicates linear convolution.
[0074] Substituting this relationship into the weight update formula after the gradient descent method, the first update formula is as follows:
[0075] , where μ is the base update step size.
[0076] Step S4332: Determine a second update formula for the filter according to the first update formula and the real-time update step size.
[0077] In some embodiments, the second update formula is as follows:
[0078] .
[0079] Where, is the current weight parameter of the filter, is the current weight parameter. is the lth parameter of the filter with a filter length of L, is the basic update step size, To update the step size in real time, is the filtered signal, is the first error signal, is a constant. is a small constant that prevents the denominator from being zero during iteration.
[0080] Step S4333: Determine the filter according to the second update formula.
[0081] This application uses the aforementioned method to achieve more accurate and natural ambient sound transmission in a variety of complex environments. This improvement significantly enhances the user experience, allowing the headphones to maintain high-quality audio output while truly achieving intelligent management of acoustic transparency. Furthermore, the use of real-time step size updates during filter determination allows the filter to converge quickly while ensuring stability.
[0082] Moreover, the above method can make the weight parameters of the transparent headphone filter adaptively adjusted according to the wearing method of the headphones, and can also make adaptive adjustments according to the input signals of different frequencies. At the same time, it can also make adaptive adjustments according to the different input angles of the input signals, so that the transparent headphones have better transparent transmission effects and can better meet the needs of users.
[0083] Example 2:
[0084] Based on the foregoing embodiments, an embodiment of the present application provides a device for determining a transparent adaptive filter. The modules included in the device, and the units included in each module, can be implemented by a processor in a computer device; of course, they can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0085] like Figure 4 As shown, a device for determining a transparent adaptive filter includes: a first acquisition module 1, a first determination module 2, a second determination module 3 and a third determination module 4.
[0086] The first acquisition module 1 is used to obtain a preset target path transfer function and the current weight parameters of the filter, and obtain an input signal through the external microphone of the in-ear headphone and a superimposed signal through the internal microphone. The first determination module 2 is used to determine the expected signal based on the input signal and the target path transfer function. The second determination module 3 is used to determine a first error signal based on the expected signal and the superimposed signal. The third determination module 4 is used to determine the target weight parameters of the filter based on the first error signal and the current weight parameters.
[0087] Each module in the above-mentioned device for determining a transparent adaptive filter can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the device in hardware form, or can be stored in the memory in the processing device in software form, so that the processor can call and execute the operations corresponding to each of the above modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0088] Example 3:
[0089] In a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of the methods described in the first aspect.
[0090] Example 4:
[0091] In a fourth aspect, the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0092] Example 5:
[0093] In a fifth aspect, the present application provides a through-ear earphone, comprising: an earphone body and an electronic device as described in the third aspect, wherein the electronic device is connected to the earphone body.
[0094] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0095] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0096] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0097] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0098] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the objectives of this embodiment.
[0099] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be independently used as a unit, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0100] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium, which, when executed, performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memories (ROMs), magnetic disks, or optical disks.
[0101] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a controller to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0102] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for determining a transparent adaptive filter, characterized in that: include: Obtaining a preset target path transfer function and current weight parameters of the filter, and obtaining an input signal through an external microphone of the in-ear headphone, and obtaining a superimposed signal through an internal microphone, wherein the superimposed signal is a superposition of a compensation signal and a residual signal, the residual signal being a signal directly transmitted from the external sound, and the compensation signal being a signal generated when the analog signal played by the secondary speaker reaches the internal microphone; determining a desired signal based on the input signal and the target path transfer function; determining a first error signal according to the desired signal and the superimposed signal; A target weight parameter of the filter is determined according to the first error signal and the current weight parameter.
2. The method according to claim 1, characterized in that The determining of a first error signal according to the expected signal and the superimposed signal comprises: Acquire an input autopower spectrum of the input signal, an expected autopower spectrum of the expected signal, and a cross power spectrum of the input signal and the expected signal; Determining the number of time-shift points of the desired signal according to the input autopower spectrum, the expected autopower spectrum, and the cross-power spectrum; Determine an expected time-shifted signal according to the time-shift point number and the expected signal; A first error signal is determined based on the desired time-shifted signal and the superimposed signal.
3. The method according to claim 1, characterized in that The determining the target weight parameter of the filter according to the first error signal and the current weight parameter includes: Obtaining a preset secondary path estimate and a preset basic update step size; determining a filtered signal of the filter based on the input signal and the secondary path estimate; The target weight parameter is determined according to the filtered signal, the first error signal, the current weight parameter and the basic update step size.
4. The method according to claim 3, characterized in that The determining the target weight parameter according to the filtered signal, the first error signal, the current weight parameter and the basic update step size comprises: determining a first relationship between a basic update step size and the filtered signal according to the first error signal; Determining a real-time update step size of the filter according to the first relationship and the basic update step size; The target weight parameter is determined according to the real-time update step size, the filtered signal, the current weight parameter and the first error signal.
5. The method according to claim 4, characterized in that The determining the target weight parameter according to the real-time update step size, the filtered signal, the current weight parameter and the first error signal includes: Determine a first update formula of the filter according to the current weight parameter, the first error signal and the filtered signal; Determine a second update formula for the filter according to the first update formula and the real-time update step size; The target weight parameter is determined according to the second updating formula.
6. The method according to claim 5, characterized in that The second update formula is as follows: ; Where, is the target weight parameter of the filter, is the current weight parameter of the filter, is the basic update step size, To update the step size in real time, is the filtered signal, is the first error signal, To represent a constant.
7. A device for determining a transparent adaptive filter, characterized in that: include: a first acquisition module, configured to obtain a preset target path transfer function and current weight parameters of the filter, and to obtain an input signal through an external microphone of the in-ear headphone, and to obtain a superimposed signal through an internal microphone, wherein the superimposed signal is a superposition of a compensation signal and a residual signal, the residual signal being a signal directly transmitted from the external sound, and the compensation signal being a signal generated when the analog signal played by the secondary speaker reaches the internal microphone; a first determining module, determining an expected signal according to the input signal and the target path transfer function; a second determining module, configured to determine a first error signal according to the expected signal and the superimposed signal; A third determination module is configured to determine a target weight parameter of the filter according to the first error signal and the current weight parameter.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.
9. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A transparent in-ear headphone, characterized in that: include: An earphone body and the electronic device as claimed in claim 8, wherein the electronic device is connected to the earphone body.
Citation Information
Patent Citations
Filter coefficient setting method and device and electronic equipment
CN115442712A