CN112492446B - Method and processor for realizing signal equalization by using in-ear earphone - Google Patents

Method and processor for realizing signal equalization by using in-ear earphone Download PDF

Info

Publication number
CN112492446B
CN112492446B CN202011423517.3A CN202011423517A CN112492446B CN 112492446 B CN112492446 B CN 112492446B CN 202011423517 A CN202011423517 A CN 202011423517A CN 112492446 B CN112492446 B CN 112492446B
Authority
CN
China
Prior art keywords
function
user
head
related transfer
transfer function
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.)
Active
Application number
CN202011423517.3A
Other languages
Chinese (zh)
Other versions
CN112492446A (en
Inventor
项京朋
匡敬辉
王之禹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sound+ Technology Co ltd
Original Assignee
Beijing Sound+ Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Sound+ Technology Co ltd filed Critical Beijing Sound+ Technology Co ltd
Priority to CN202011423517.3A priority Critical patent/CN112492446B/en
Publication of CN112492446A publication Critical patent/CN112492446A/en
Application granted granted Critical
Publication of CN112492446B publication Critical patent/CN112492446B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • G10K11/1785Methods, e.g. algorithms; Devices
    • G10K11/17853Methods, e.g. algorithms; Devices of the filter
    • G10K11/17854Methods, e.g. algorithms; Devices of the filter the filter being an adaptive filter

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Stereophonic System (AREA)

Abstract

The invention provides a method and a processor for realizing signal equalization by using an in-ear earphone, which are applied to a loudspeaker of an audio playback system in a room, and comprise the following steps: acquiring a head-related transfer function corresponding to the position of a user; the user wears the in-ear earphone; obtaining an impulse response function between a loudspeaker and two ears of a user according to a second audio signal acquired by the double microphones; constructing an error function of an impulse response function approximation head-related transfer function; obtaining an equalization filter corresponding to the position of the user according to the error function, and applying the equalization filter to the loudspeaker; the scheme of the invention for configuring the equalization filter realizes precise audio perception equalization for the user listening to the audio played by the loudspeaker in a room, and can effectively enhance the audio perception effect at the two ears of the user.

Description

Method for realizing signal equalization by using in-ear earphone and processor
Technical Field
The invention relates to the technical field of audio signal processing, in particular to a method and a processor for realizing signal equalization by using an in-ear earphone.
Background
In an audio playback system represented by a speaker-room system, when a speaker plays audio, acoustic characteristics at each position in a room are distorted by system response of the speaker, acoustic reflection from walls and internal objects of the room, acoustic absorption, and the like, and room impact response distortion affects the sound quality of a sound signal heard by a user, thereby negatively affecting the audio perception of the user.
To improve the audio perception experience of the user, signal equalization is generally performed on the audio signal played by the speaker. The prior art typically uses single-point equalization and multi-point equalization, i.e. using an omni-directional microphone at one or more locations in the room, measuring the transfer function of the loudspeaker-room system and performing an equalization filter design on the transfer function. In particular, single-point equalization is a design of an equalization filter using a transfer function of a loudspeaker-room system measured at a fixed point in a room, and thus, single-point equalization has an equalization effect only in a small range at or near a measurement position. When the position of the user is greatly deviated from the measurement position, the audio perception experience of the user cannot be improved, and even can be reduced. Multipoint equalization is to measure the transfer function of the loudspeaker-room system at multiple locations to obtain an equalization filter. Although the effective area of equalization is enlarged based on single-point equalization, due to the fact that the difference of error signals between measurement points is large, the error of an individual measurement position can even influence the overall equalization effect with a large contribution, and the user perception experience is not improved obviously enough.
Disclosure of Invention
The embodiment of the invention provides a method and a processor for realizing signal equalization by using an in-ear earphone, which realize accurate equalization for a user listening to audio in a room and enhance the audio perception effect at the ears of the user.
In a first aspect, the present invention provides a method for signal equalization using in-ear headphones for use in a loudspeaker of an in-room audio playback system, the method comprising:
a loudspeaker plays a first audio signal in a room; a user is located in the room other than the speaker and wears the in-ear headphone; the in-ear headphone comprises a dual microphone;
acquiring a head-related transfer function corresponding to the position of a user;
obtaining an impulse response function between a loudspeaker and two ears of a user according to a second audio signal acquired by the double microphones;
balancing the impulse response function by taking the head-related transfer function as an optimization target to obtain a balance filter corresponding to the position of the user;
and performing signal equalization on the audio signal to be played by the loudspeaker by using the equalization filter.
Therefore, the invention constructs the impulse response function between the loudspeaker and the ears of the user according to the audio signals at the ears of the user obtained by the in-ear earphone, improves the accuracy of the impulse response function and enhances the audio perception effect at the ears of the user; the equalization filter is obtained by taking the head-related transfer function as a target, the filtering influence of the physiological structure characteristics of the user on the sound is considered, and the optimal listening effect can be achieved when the sound of the loudspeaker reaches the ears of the user.
In a possible implementation manner, the obtaining a head-related transfer function corresponding to a position where a user is located includes:
acquiring a horizontal angle and a pitch angle of the azimuth of the user relative to the loudspeaker;
according to the horizontal angle and the pitch angle, matching a head-related transfer function corresponding to the azimuth where the user is located in a preset head-related transfer function library of the user;
the preset head-related transfer function library of the user is constructed on the basis of horizontal angle samples and pitch angle samples of the user in different directions relative to the loudspeaker and corresponding head-related transfer function samples.
In a possible implementation manner, the obtaining a head-related transfer function corresponding to a position where a user is located includes:
acquiring auricle characteristic parameters and head characteristic parameters of a user and a horizontal angle and a pitch angle of the azimuth of the user relative to a loudspeaker;
acquiring a head-related transfer function set matched with the user from a preset head-related transfer function library of multiple persons according to the auricle characteristic parameters and the head characteristic parameters;
according to the horizontal angle and the pitch angle, matching a head-related transfer function corresponding to the azimuth where the user is located in the head-related transfer function set;
the preset multi-person head-related transfer function library is constructed on the basis of auricle characteristic parameter samples and head characteristic parameter samples of different users, horizontal angle samples and pitching angle samples of different users in different directions and corresponding head-related transfer function samples.
Therefore, the head-related transfer function is obtained according to the direction of the user, and the hearing experience of the user can be accurately improved.
In a possible implementation manner, the obtaining an impulse response function between a speaker and two ears of a user according to a second audio signal collected by two microphones includes:
obtaining a cross-correlation function between the first audio signal and the second audio signal by using a cross-correlation method;
and performing decorrelation on the cross-correlation function according to the variance of the first audio signal to obtain an impulse response function between a loudspeaker and the ears of the user.
In a possible implementation manner, the equalizing the impulse response function with the head-related transfer function as an optimization target to obtain an equalization filter corresponding to the position where the user is located includes:
constructing an error function of the impulse response function approximating the head-related transfer function according to the head-related transfer function and the impulse response function;
and obtaining an equalization filter corresponding to the position of the user according to the error function.
In one possible implementation, the constructing an error function that approximates the impulse response function to the head-related transfer function includes:
acquiring a first amplitude spectrum corresponding to the impulse response function and a second amplitude spectrum corresponding to the head-related transfer function;
and constructing an error function according to the product of the first amplitude spectrum and the equalization function and the square of the difference value of the second amplitude spectrum.
In a possible implementation, before constructing the error function according to the product of the first magnitude spectrum and the equalization function and the square of the difference of the second magnitude spectrum, the method includes:
and performing 1/9 octave smoothing treatment on the first amplitude spectrum and the second amplitude spectrum.
In a possible implementation manner, the obtaining, according to the error function, an equalization filter corresponding to the position where the user is located includes:
performing derivation on an equalization function in the error function to obtain a partial derivative of the error function;
making the partial derivative be zero to obtain an optimal balance function;
and acquiring the minimum phase of the optimal equalization function, and performing phase reconstruction on the optimal equalization function according to the minimum phase to acquire the equalization filter.
In a possible implementation manner, before obtaining the equalization filter corresponding to the position where the user is located according to the error function, the method includes:
and carrying out regularization processing on the error function to obtain the error function after regularization processing.
Therefore, the error function is regularized, and solving ill-condition can be avoided when the error function is solved.
In a second aspect, the present invention provides a processor for performing a method for signal equalization using an in-ear headphone for use in a loudspeaker of an audio playback system in a room, the in-ear headphone comprising a dual microphone, the user being located in the room other than the loudspeaker and the in-ear headphone being worn by the user; the processor includes:
the first acquisition module is used for playing a first audio signal in a room through a loudspeaker and acquiring a head-related transfer function corresponding to the position of a user;
the second acquisition module is used for acquiring an impulse response function between the loudspeaker and the ears of the user according to the second audio signals acquired by the double microphones;
the optimization module is used for balancing the impulse response function by taking the head-related transfer function as an optimization target to obtain a balance filter corresponding to the position of the user;
and the equalizing module is used for performing signal equalization on the audio signal to be played by the loudspeaker by using the equalizing filter.
In a possible implementation manner, the first obtaining module is specifically configured to: acquiring a horizontal angle and a pitch angle of a position where a user is located relative to a loudspeaker;
according to the horizontal angle and the pitch angle, matching a head-related transfer function corresponding to the azimuth where the user is located in a preset head-related transfer function library of the user;
the preset head-related transfer function library of the user is constructed on the basis of horizontal angle samples and pitch angle samples of the user in different directions relative to the loudspeaker and corresponding head-related transfer function samples.
In a possible implementation, the first obtaining module may be further configured to:
acquiring auricle characteristic parameters and head characteristic parameters of a user and a horizontal angle and a pitch angle of the azimuth of the user relative to a loudspeaker;
acquiring a head-related transfer function set matched with the user from a preset head-related transfer function library of multiple persons according to the auricle characteristic parameters and the head characteristic parameters;
according to the horizontal angle and the pitch angle, head-related transfer functions corresponding to the azimuth where the user is located are matched in the head-related transfer function set;
the preset multi-user head-related transfer function library is constructed on the basis of auricle characteristic parameter samples and head characteristic parameter samples of different users, horizontal angle samples and pitch angle samples of different users in different directions and corresponding head-related transfer function samples.
In a possible implementation, the second obtaining module is specifically configured to
Obtaining a cross-correlation function between the first audio signal and the second audio signal by using a cross-correlation method;
and performing decorrelation on the cross-correlation function according to the variance of the first audio signal to obtain an impulse response function between a loudspeaker and the ears of the user.
In a possible implementation, the optimization module is specifically configured to:
according to the head-related transfer function and the impulse response function, constructing an error function of the impulse response function approaching the head-related transfer function;
and obtaining an equalization filter corresponding to the position of the user according to the error function.
In one possible implementation, the constructing an error function that approximates the head-related transfer function with an impulse response function includes:
acquiring a first amplitude spectrum corresponding to the impulse response function and a second amplitude spectrum corresponding to the head-related transfer function;
and constructing an error function according to the product of the first magnitude spectrum and the equalization function and the square of the difference value of the second magnitude spectrum.
In a possible implementation, before constructing the error function according to the product of the first magnitude spectrum and the equalization function and the square of the difference of the second magnitude spectrum, the method includes:
and performing 1/9 octave smoothing treatment on the first amplitude spectrum and the second amplitude spectrum.
In a possible implementation manner, the obtaining, according to the error function, an equalization filter corresponding to the position where the user is located includes:
performing derivation on an equalization function in the error function to obtain a partial derivative of the error function;
making the partial derivative be zero to obtain an optimal balance function;
and acquiring the minimum phase of the optimal equalization function, and performing phase reconstruction on the optimal equalization function according to the minimum phase to acquire the equalization filter.
In a possible implementation manner, before obtaining the equalization filter corresponding to the position where the user is located according to the error function, the method includes:
and carrying out regularization processing on the error function to obtain the error function after regularization processing.
Drawings
Fig. 1 is a schematic structural diagram of an application scenario provided in an embodiment of the present invention;
fig. 2 is a flowchart of a method for equalizing signals using an in-ear headphone according to an embodiment of the present invention;
fig. 3a is a flowchart of a method for obtaining a head-related transfer function corresponding to a position where a user is located according to an embodiment of the present invention;
fig. 3b is a flowchart of another method for obtaining a head-related transfer function corresponding to a position where a user is located according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for obtaining an impulse response function between a speaker and two ears of a user according to an embodiment of the present invention;
FIG. 5 is a flow chart of a method for constructing an error function according to an embodiment of the present invention;
fig. 6 is a flowchart of a method for obtaining an equalization filter according to an embodiment of the present invention;
fig. 7 is a functional block diagram of a processor according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings.
In the description of the embodiments of the present invention, words such as "exemplary," "for example," or "for example" are used to indicate examples, illustrations, or illustrations. Any embodiment or design described as "exemplary," "e.g.," or "e.g.," an embodiment of the invention is not to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "exemplary," "e.g.," or "exemplary" is intended to present relevant concepts in a concrete fashion.
In the description of the embodiment of the present invention, the term "and/or" is only one kind of association relationship describing the association object, and means that there may be three relationships, for example, a and/or B, and may mean: a exists alone, B exists alone, and A and B exist at the same time. In addition, the term "plurality" means two or more unless otherwise specified. For example, the plurality of systems refers to two or more systems, and the plurality of screen terminals refers to two or more screen terminals.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the indicated technical feature. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
Fig. 1 is a schematic structural diagram of an application scenario provided in an embodiment of the present invention. As shown in fig. 1, the application scenario includes: a speaker positioned in the room and a plurality of selectable listening positions arranged in the room. The loudspeakers and the room in which the loudspeakers are located constitute an audio reproduction system. The listening orientation may be a user-defined orientation or a system-pre-specified orientation, and fig. 1 shows only three optional listening orientations.
The speaker is an external speaker for playing an audio signal selected by a user. The speakers may be speakers and televisions, or other devices capable of playing audio, classified by device category. The specific type of speaker, divided by the transduction principle, may be of the moving coil type or the capacitive type. The specific type of speaker, divided by frequency, may be a woofer, midrange speaker or tweeter, or a combination of different frequencies. The loudspeaker is divided according to sound radiation materials, and the specific type of the loudspeaker can be a paper basin type, a horn type or a diaphragm type; the paper is divided according to the shape of the cone, and can be round, oval, double cones or an eraser folded ring. The specific type of speaker, divided by the voice coil impedance, may be low impedance or high impedance. The embodiment of the present invention does not specifically limit the category of the device including the speaker and the type of the speaker.
Fig. 2 shows a flowchart of a method for implementing signal equalization by using an in-ear headphone according to an embodiment of the present invention. The in-ear earphone is an earphone with double microphones, and can be a full in-ear earphone or a half in-ear earphone. When a user needs to configure the speaker with an equalization filter, the first audio signal S is played in a room through the speaker, the user is located in a place different from the speaker in the room, and the user wears the in-ear headphone of the type, and the specific method includes steps S1 to S4 shown in fig. 2.
S1, acquiring a head related transfer function corresponding to the position of a user. The head-related transfer function corresponding to the position of the user comprises the following steps: head related transfer functions of the speakers to the left and right ears of the user. The head-related transfer function is essentially a set of filters that describe the transmission of sound waves from the speakers to the ears of the user. The process of scattering the audio signal emitted from the speaker through the head, the pinna, etc. and then arriving at both ears can be regarded as a linear time-invariant filtering system, wherein the transmission characteristic can be completely described by a frequency domain transfer function. In the embodiment of the invention, the head-related transfer function corresponding to the position of the user is taken as the standard impulse response function from the loudspeaker to the two ears of the user.
In the embodiment of the present invention, step S1 may include steps S101 to S102 as shown in fig. 3 a.
S101, acquiring a horizontal angle and a pitch angle of the azimuth where the user is located relative to the loudspeaker. Wherein, horizontal angle and pitch angle are all measured with the speaker as the center. A micro angle measuring device may be built in the speaker to measure the horizontal angle and the pitch angle. In the step, the user can also upload the measured horizontal angle and the measured pitch angle after measuring the horizontal angle and the pitch angle by using measuring equipment, wherein the measuring equipment can be an angle measuring instrument or intelligent equipment provided with an application program for measuring the angle.
And S102, according to the obtained horizontal angle and pitch angle, matching a head-related transfer function corresponding to the position where the user is located in a head-related transfer function library of the user. In this step, the head-related transfer function library of the user is constructed based on horizontal angle samples and pitch angle samples of the user in different directions relative to the speaker and corresponding head-related transfer function samples.
In the embodiment of the present invention, step S1 may further include steps S111 to S113 shown in fig. 3 b.
And S111, acquiring physiological characteristic parameters of the user and a horizontal angle and a pitch angle of the azimuth of the user relative to the loudspeaker. Wherein, the physiological characteristic parameters comprise: the physiological characteristic parameters can be obtained by uploading by a user, and can also be obtained by scanning the head of the user through intelligent equipment provided with an application program with a 3D scanning function.
And S112, acquiring a head-related transfer function set matched with the user from a preset head-related transfer function library of multiple persons according to the acquired auricle characteristic parameters and head characteristic parameters.
And S113, according to the obtained horizontal angle and the pitch angle, matching a head related transfer function corresponding to the azimuth where the user is located in the head related transfer function set. The head-related transfer function library of the multiple persons is constructed based on physiological characteristic parameter samples of different users, horizontal angle samples and pitch angle samples of the positions of the different users relative to the loudspeaker, and head-related transfer function samples corresponding to the two types of characteristics. The head-related transfer function sample needs to be collected in a full-noise elimination laboratory, and the collection object can be an artificial head or a real person; placing the collection object at different positions of a laboratory, and recording the orientation of the collection object relative to a sound source; a miniature microphone is arranged in the ear of the acquisition object and is used for recording an audio signal emitted by a sound source; on the basis of audio signals obtained by a miniature microphone and audio signals emitted by a sound source, an impulse response function is obtained through system analysis, and then a head-related transfer function sample is obtained through Fourier transform.
And S2, obtaining an impulse response function between the loudspeaker and the ears of the user.
The impulse response function represents the zero state response of the first audio signal S played by the loudspeaker at both ears of the user. In the embodiment of the present invention, step S2 specifically includes step S201 and step S202 shown in fig. 4.
Step S201 is specifically to obtain a cross-correlation function between the first audio signal S played by the speaker and the collected second audio signal by using a cross-correlation method. The second audio signal comprises a left audio signal Record _ L and a right audio signal Record _ R picked up by the dual microphones of the in-ear headphone. The cross-correlation function between the signal S and the signal Record _ L is denoted R S-Record_L (τ) and the cross-correlation function between the signal S and the signal Record _ R is denoted R S-Record_R (τ), wherein τ is the signal acquisition time.
The specific way of step S202 is to perform decorrelation processing on the cross-correlation function to obtain an impulse response function between the speaker and the ears of the user. During the decorrelation process, the variance σ of the audio signal played by the loudspeaker is calculated first S 2 Then, impulse response functions between the speaker and the ears of the user are calculated according to formula (1).
Figure BDA0002823627270000071
In equation (1), BRIR _ L (τ) and BRIR _ R (τ) are impulse response functions between the speaker and the user's left and right ears, respectively. And S2, according to the audio signals at the ears of the user obtained by the in-ear earphone, an impulse response function between the loudspeaker and the ears of the user is constructed, so that the accuracy of the impulse response function is improved, and the audio perception effect at the ears of the user is enhanced.
And S3, constructing an error function of the impulse response function approximating the head-related transfer function. The purpose of this step is to equalize the impulse response function with the head-related transfer function as the target, so that it approaches the head-related transfer function.
In the embodiment of the present invention, step S3 specifically includes steps S301 to S302 shown in fig. 5.
And S301, obtaining a first amplitude spectrum corresponding to the impulse response function and a second amplitude spectrum corresponding to the head-related transfer function.
And S302, after the two amplitude spectrums are obtained, performing 1/9 octave smoothing on the first amplitude spectrum and the second amplitude spectrum.
And S303, constructing an error function according to the product of the first amplitude spectrum and the equalization function and the square of the difference value of the second amplitude spectrum. The constructed error function is characterized in that the impulse response function infinitely approximates the error of the head-related transfer function by taking the head-related transfer function as a target in a frequency domain. The error function is constructed as shown in equation (2).
Figure BDA0002823627270000081
In the formula (2), E mag (f) For the error of the impulse response function approaching the head-related transfer function, | HRTFS _ L (f) | and | HRTFS _ R (f) | are the second amplitude spectra corresponding to the head-related transfer functions on the left and right sides of the user, respectively, | BRIRCS _ L (f) | and | BRIRCS _ R (f) | are the first amplitude spectra corresponding to the impulse response function between the speaker and the ears of the user, respectively, | Eq (f) | is the equalization function, and f is the frequency.
And S4, obtaining the equalization filter according to the constructed error function. The purpose of this step is to solve the equalization function in the error function. The equalization filter is obtained by taking the head-related transfer function as a target, the filtering influence of the physiological structure characteristics of the user on the sound is considered, and the optimal listening effect can be achieved when the sound of the loudspeaker reaches the two ears of the user.
In the embodiment of the present invention, step S4 includes steps S401 to 404 shown in fig. 6.
Step S401, firstly, regularization processing is carried out on the error function. Namely, a regularization term is added to the original form to prevent a pathological condition from occurring when an error function is solved. The regularization term is the product of the regularization factor β (f) and the square of the equalization function | Eq (f) |, and the error function after regularization is shown in equation (3). The value of the regularization factor can be set according to actual conditions, and the invention is not particularly limited.
Figure BDA0002823627270000082
And S402, after regularization processing, derivation is carried out on an equalization function in the error function to obtain a partial derivative corresponding to the error function.
And S403, setting the partial derivative to be zero to obtain a form of a formula (4), and solving to obtain an optimal balance function.
Figure BDA0002823627270000083
And S404, according to the minimum phase corresponding to the optimal equalization function, carrying out phase reconstruction on the optimal equalization function to obtain an equalization filter configured for a loudspeaker in the audio playback system.
An embodiment of the present invention further provides a processor, configured to execute a method for implementing signal equalization by using an in-ear headphone as shown in fig. 2, applied to a speaker of an audio playback system in a room, where the in-ear headphone includes two microphones, and the processor includes:
the first acquisition module is used for playing a first audio signal in a room through a loudspeaker and acquiring a head-related transfer function corresponding to the position of a user;
the second acquisition module is used for acquiring an impulse response function between the loudspeaker and the ears of the user according to the second audio signals acquired by the double microphones;
the optimization module is used for balancing the impulse response function by taking the head-related transfer function as an optimization target to obtain a balance filter corresponding to the position of the user;
and the equalizing module is used for performing signal equalization on the audio signal to be played by the loudspeaker by using the equalizing filter.
In a possible implementation manner, the first obtaining module is specifically configured to: acquiring a horizontal angle and a pitch angle of the azimuth of the user relative to the loudspeaker;
according to the horizontal angle and the pitch angle, matching a head-related transfer function corresponding to the azimuth where the user is located in a preset head-related transfer function library of the user;
the preset head-related transfer function library of the user is constructed on the basis of horizontal angle samples and pitch angle samples of the user in different directions relative to the loudspeaker and corresponding head-related transfer function samples.
In a possible implementation, the first obtaining module may be further configured to:
acquiring auricle characteristic parameters and head characteristic parameters of a user and a horizontal angle and a pitch angle of the azimuth of the user relative to a loudspeaker;
acquiring a head-related transfer function set matched with the user from a preset head-related transfer function library of multiple persons according to the auricle characteristic parameters and the head characteristic parameters;
according to the horizontal angle and the pitch angle, matching a head-related transfer function corresponding to the azimuth where the user is located in the head-related transfer function set;
the preset multi-person head-related transfer function library is constructed on the basis of auricle characteristic parameter samples and head characteristic parameter samples of different users, horizontal angle samples and pitching angle samples of different users in different directions and corresponding head-related transfer function samples.
In a possible implementation, the second obtaining module is specifically configured to
Obtaining a cross-correlation function between the first audio signal and the second audio signal by using a cross-correlation method;
and performing decorrelation on the cross-correlation function according to the variance of the first audio signal to obtain an impulse response function between a loudspeaker and the ears of the user.
In a possible implementation, the optimization module is specifically configured to:
constructing an error function of the impulse response function approximating the head-related transfer function according to the head-related transfer function and the impulse response function;
and obtaining an equalization filter corresponding to the position of the user according to the error function.
In one possible implementation, the constructing an error function that approximates the head-related transfer function with an impulse response function includes:
acquiring a first amplitude spectrum corresponding to the impulse response function and a second amplitude spectrum corresponding to the head-related transfer function;
and constructing an error function according to the product of the first magnitude spectrum and the equalization function and the square of the difference value of the second magnitude spectrum.
In a possible implementation, before the constructing an error function according to a product of the first magnitude spectrum and the equalization function and a square of a difference of the second magnitude spectrum, the method includes:
and performing 1/9 octave smoothing treatment on the first amplitude spectrum and the second amplitude spectrum.
In a possible implementation manner, the obtaining, according to the error function, an equalization filter corresponding to the position where the user is located includes:
performing derivation on an equalization function in the error function to obtain a partial derivative of the error function;
making the partial derivative be zero to obtain an optimal balance function;
and acquiring the minimum phase of the optimal equalization function, and performing phase reconstruction on the optimal equalization function according to the minimum phase to acquire the equalization filter.
In a possible implementation manner, before obtaining the equalization filter corresponding to the position where the user is located according to the error function, the method includes:
and carrying out regularization processing on the error function to obtain the error function after regularization processing.
The method steps in the embodiments of the present invention may be implemented by hardware, or may be implemented by software instructions executed by a processor. The software instructions may be comprised of corresponding software modules that may be stored in Random Access Memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is to be understood that various numerical references referred to in the embodiments of the present invention are only for convenience of description and distinction, and are not intended to limit the scope of the embodiments of the present invention.

Claims (9)

1. A method for equalizing a signal using in-ear headphones for use with a loudspeaker in a room audio playback system, the method comprising:
a loudspeaker plays a first audio signal in a room; a user is located in the room other than the speaker and wears the in-ear headphones; the in-ear headphone comprises a dual microphone;
acquiring a head-related transfer function corresponding to the position of a user;
obtaining an impulse response function between a loudspeaker and two ears of a user according to a second audio signal acquired by the double microphones;
balancing the impulse response function by taking the head-related transfer function as an optimization target to obtain a balance filter corresponding to the position of the user;
performing signal equalization on the audio signal to be played by the loudspeaker by using the equalization filter;
wherein, the equalizing the impulse response function by taking the head-related transfer function as an optimization target to obtain an equalization filter corresponding to the position of the user comprises:
according to the head-related transfer function and the impulse response function, constructing an error function of the impulse response function approaching the head-related transfer function;
and obtaining an equalization filter corresponding to the position of the user according to the error function.
2. The method of claim 1, wherein the obtaining the head-related transfer function corresponding to the position of the user comprises:
acquiring a horizontal angle and a pitch angle of the azimuth of the user relative to the loudspeaker;
according to the horizontal angle and the pitch angle, matching a head-related transfer function corresponding to the position of the user in a preset head-related transfer function library of the user;
the preset head-related transfer function library of the user is constructed on the basis of horizontal angle samples and pitch angle samples of the user in different directions relative to the loudspeaker and corresponding head-related transfer function samples.
3. The method of claim 1, wherein the obtaining the head-related transfer function corresponding to the position of the user comprises:
acquiring auricle characteristic parameters and head characteristic parameters of a user and a horizontal angle and a pitch angle of the azimuth of the user relative to a loudspeaker;
according to the auricle characteristic parameters and the head characteristic parameters, acquiring a head-related transfer function set matched with the user from a preset head-related transfer function library of multiple persons;
according to the horizontal angle and the pitch angle, head-related transfer functions corresponding to the azimuth where the user is located are matched in the head-related transfer function set;
the preset multi-person head-related transfer function library is constructed on the basis of auricle characteristic parameter samples and head characteristic parameter samples of different users, horizontal angle samples and pitching angle samples of different users in different directions and corresponding head-related transfer function samples.
4. The method of claim 1, wherein obtaining an impulse response function between the speaker and ears of the user according to the second audio signals collected by the two microphones comprises:
obtaining a cross-correlation function between the first audio signal and the second audio signal by using a cross-correlation method;
and performing decorrelation on the cross-correlation function according to the variance of the first audio signal to obtain an impulse response function between a loudspeaker and the ears of the user.
5. The method of claim 1, wherein constructing an error function that approximates the head-related transfer function with an impulse response function comprises:
acquiring a first amplitude spectrum corresponding to the impulse response function and a second amplitude spectrum corresponding to the head-related transfer function;
and constructing an error function according to the product of the first amplitude spectrum and the equalization function and the square of the difference value of the second amplitude spectrum.
6. The method of claim 5, wherein prior to constructing an error function from the product of the first magnitude spectrum and the equalization function and the square of the difference of the second magnitude spectrum, comprising:
and performing 1/9 octave smoothing treatment on the first amplitude spectrum and the second amplitude spectrum.
7. The method of claim 1, wherein obtaining the equalization filter corresponding to the position of the user according to the error function comprises:
performing partial derivation on the error function to obtain a partial derivative of the error function;
making the partial derivative be zero to obtain an optimal balance function;
and acquiring the minimum phase of the optimal equalization function, and performing phase reconstruction on the optimal equalization function according to the minimum phase to acquire the equalization filter.
8. The method of claim 1, wherein before obtaining the equalization filter corresponding to the position of the user according to the error function, the method comprises:
and carrying out regularization processing on the error function to obtain the error function after regularization processing.
9. A processor configured to perform the method of any one of claims 1 to 8.
CN202011423517.3A 2020-12-08 2020-12-08 Method and processor for realizing signal equalization by using in-ear earphone Active CN112492446B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011423517.3A CN112492446B (en) 2020-12-08 2020-12-08 Method and processor for realizing signal equalization by using in-ear earphone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011423517.3A CN112492446B (en) 2020-12-08 2020-12-08 Method and processor for realizing signal equalization by using in-ear earphone

Publications (2)

Publication Number Publication Date
CN112492446A CN112492446A (en) 2021-03-12
CN112492446B true CN112492446B (en) 2023-03-14

Family

ID=74940772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011423517.3A Active CN112492446B (en) 2020-12-08 2020-12-08 Method and processor for realizing signal equalization by using in-ear earphone

Country Status (1)

Country Link
CN (1) CN112492446B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113766384A (en) * 2021-09-24 2021-12-07 北京小米移动软件有限公司 Method and device for generating target parameters of energy compensation filter and earphone
CN114171048A (en) * 2021-11-30 2022-03-11 雷欧尼斯(北京)信息技术有限公司 Indoor multi-position frequency domain audio frequency equalization method, device and equipment
CN114760560A (en) * 2022-03-23 2022-07-15 歌尔股份有限公司 Sound signal processing method, sound signal processing device, earphone equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9627015D0 (en) * 1996-12-28 1997-02-19 Central Research Lab Ltd Processing audio signals
US8094826B2 (en) * 2006-01-03 2012-01-10 Sl Audio A/S Method and system for equalizing a loudspeaker in a room
JP2012004668A (en) * 2010-06-14 2012-01-05 Sony Corp Head transmission function generation device, head transmission function generation method, and audio signal processing apparatus
JP6596896B2 (en) * 2015-04-13 2019-10-30 株式会社Jvcケンウッド Head-related transfer function selection device, head-related transfer function selection method, head-related transfer function selection program, sound reproduction device
CN106559722B (en) * 2015-09-25 2018-12-04 中国科学院声学研究所 Audio playback systems equalization methods based on human hearing characteristic
US10390171B2 (en) * 2018-01-07 2019-08-20 Creative Technology Ltd Method for generating customized spatial audio with head tracking

Also Published As

Publication number Publication date
CN112492446A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN112492446B (en) Method and processor for realizing signal equalization by using in-ear earphone
CN112492445B (en) Method and processor for realizing signal equalization by using ear-covering type earphone
JP6121481B2 (en) 3D sound acquisition and playback using multi-microphone
Schärer et al. Evaluation of equalization methods for binaural signals
CN106535076B (en) space calibration method of stereo sound system and mobile terminal equipment thereof
JP6995777B2 (en) Active monitoring headphones and their binaural method
US10757522B2 (en) Active monitoring headphone and a method for calibrating the same
US10728666B2 (en) Variable acoustics loudspeaker
JP6821699B2 (en) How to regularize active monitoring headphones and their inversion
US11405723B2 (en) Method and apparatus for processing an audio signal based on equalization filter
JP2020108143A (en) Spatial repositioning of multiple audio streams
CN112584277B (en) Indoor audio frequency equalizing method
JP2017046322A (en) Signal processor and control method of the same
US10142760B1 (en) Audio processing mechanism with personalized frequency response filter and personalized head-related transfer function (HRTF)
CN112449286B (en) System and method for complementary audio output
CN113534052A (en) Bone conduction equipment virtual sound source positioning performance test method, system, device and medium
WO2021212287A1 (en) Audio signal processing method, audio processing device, and recording apparatus
US11653163B2 (en) Headphone device for reproducing three-dimensional sound therein, and associated method
KR20210028124A (en) Loudspeaker system with active directivity control
Griesinger Accurate reproduction of binaural recordings through individual headphone equalization and time domain crosstalk cancellation
Song et al. Simulation of realistic background noise using multiple loudspeakers
JP2018139345A (en) Filter generation device, filter generation method, and program
Choadhry et al. Headphone Filtering in Spectral Domain
Sunder et al. Modeling distance-dependent individual head-related transfer functions in the horizontal plane using frontal projection headphones
Kinnunen Headphone development research

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
GR01 Patent grant
GR01 Patent grant