WO2023020208A1 - 音频信号处理方法及装置、耳机、存储介质 - Google Patents

音频信号处理方法及装置、耳机、存储介质 Download PDF

Info

Publication number
WO2023020208A1
WO2023020208A1 PCT/CN2022/107699 CN2022107699W WO2023020208A1 WO 2023020208 A1 WO2023020208 A1 WO 2023020208A1 CN 2022107699 W CN2022107699 W CN 2022107699W WO 2023020208 A1 WO2023020208 A1 WO 2023020208A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio signal
signal
frequency
test
received
Prior art date
Application number
PCT/CN2022/107699
Other languages
English (en)
French (fr)
Inventor
练添富
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023020208A1 publication Critical patent/WO2023020208A1/zh

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones

Definitions

  • the present application relates to the technical field of electronic equipment, and in particular to an audio signal processing method and device, an earphone, and a storage medium.
  • the embodiment of the present application discloses an audio signal processing method and device, an earphone, and a storage medium, which can enable the earphone to provide personalized ear shape adaptive equalization and wearing leakage adaptive equalization for different users, and improve the active performance of the earphone on the audio signal. Effectiveness of noise reduction.
  • the first aspect of the embodiment of the present application discloses an audio signal processing method, which is applied to an earphone, the earphone includes a speaker and a feedback microphone, and the method includes:
  • test audio signal Outputting a test audio signal through the loudspeaker, wherein the test audio signal is obtained by mixing a basic audio signal and an infrasound wave signal;
  • first equalization parameter corresponding to the basic audio signal according to the received audio signal
  • second equalization parameter corresponding to the infrasonic signal according to the received audio signal
  • the first equalization parameter is used for Ear shape adaptive equalization matching the user's ear shape is performed on the target audio signal to be output
  • the second equalization parameter is used to perform wearing leakage adaptive equalization matching the earphone wearing state on the target audio signal.
  • the second aspect of the embodiment of the present application discloses an audio signal processing method, which is applied to an earphone, the earphone includes a speaker and a feedback microphone, and the method includes:
  • test audio signal includes any one of a white noise signal and an audio data signal
  • the test ear shape transfer function and the target ear shape transfer function calculate the first equalization parameter corresponding to the basic audio signal, and the first equalization parameter is used for the target audio signal to be output Perform ear shape adaptive equalization that matches the user's ear shape.
  • the third aspect of the embodiment of the present application discloses an audio signal processing method, which is applied to an earphone, the earphone includes a speaker and a feedback microphone, and the method includes:
  • test audio signal includes an infrasonic signal
  • the second equalization parameter is used to match the target audio signal to be output with the earphone wearing state Wear leaky adaptive equalization.
  • the fourth aspect of the embodiment of the present application discloses an audio signal compensation device, which is applied to an earphone, the earphone includes a speaker and a feedback microphone, and the audio signal processing device includes:
  • the first output unit is configured to output a test audio signal through the speaker, wherein the test audio signal is obtained by mixing a basic audio signal and an infrasound wave signal;
  • a first receiving unit configured to collect a received audio signal corresponding to the test audio signal through the feedback microphone
  • a first parameter calculation unit configured to determine a first equalization parameter corresponding to the basic audio signal according to the received audio signal, and determine a second equalization parameter corresponding to the infrasonic signal according to the received audio signal, wherein,
  • the first equalization parameter is used to perform ear shape adaptive equalization that matches the user's ear shape on the target audio signal to be output
  • the second equalization parameter is used to perform wearing leakage that matches the earphone wearing state on the target audio signal.
  • the fifth aspect of the embodiment of the present application discloses an audio signal compensation device, which is applied to an earphone, the earphone includes a speaker and a feedback microphone, and the audio signal processing device includes:
  • a second output unit configured to output a test audio signal through the speaker, wherein the test audio signal includes any one of a white noise signal and an audio data signal;
  • a second receiving unit configured to collect a received audio signal corresponding to the test audio signal through the feedback microphone
  • a function determination unit configured to determine a test ear shape transfer function corresponding to the received audio signal according to the received audio signal
  • the second parameter calculation unit is configured to calculate a first equalization parameter corresponding to the basic audio signal according to the test ear shape transfer function and the target ear shape transfer function based on the least squares criterion, and the first equalization parameter Ear shape adaptive equalization for matching the user's ear shape with the target audio signal to be output.
  • the sixth aspect of the embodiment of the present application discloses an audio signal compensation device, which is applied to an earphone, the earphone includes a speaker and a feedback microphone, and the audio signal processing device includes:
  • a third output unit configured to output a test audio signal through the speaker, wherein the test audio signal includes an infrasound wave signal
  • a third receiving unit configured to collect a received audio signal corresponding to the test audio signal through the feedback microphone
  • the third parameter calculation unit is configured to calculate the signal energy of the received audio signal, and determine a second equalization parameter corresponding to the infrasound wave signal according to the signal energy, and the second equalization parameter is used for the target audio to be output
  • the signal is subjected to wearing leakage adaptive equalization that matches the wearing state of the earphone.
  • the seventh aspect of the embodiment of the present application discloses an earphone, including a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor realizes the implementation of the present application. For example, all or part of the steps in any audio signal processing method disclosed in the first aspect, the second aspect or the third aspect.
  • the eighth aspect of the embodiment of the present application discloses a computer-readable storage medium, which stores a computer program, wherein, when the computer program is executed by a processor, the first aspect, the second aspect or the third aspect of the embodiment of the present application is implemented. All or part of steps in any audio signal processing method disclosed.
  • FIG. 1A is a schematic diagram of an application scenario of an audio signal processing method disclosed in an embodiment of the present application
  • FIG. 1B is a schematic diagram of another application scenario of the audio signal processing method disclosed in the embodiment of the present application.
  • FIG. 2 is a schematic flowchart of an audio signal processing method disclosed in an embodiment of the present application
  • Fig. 3 is a schematic flow chart of mixing a basic audio signal and an infrasonic signal disclosed in an embodiment of the present application;
  • FIG. 4A is a schematic diagram of a test audio signal disclosed in an embodiment of the present application.
  • Fig. 4B is a schematic diagram of another test audio signal disclosed in the embodiment of the present application.
  • Fig. 5 is a schematic flowchart of another audio signal processing method disclosed in the embodiment of the present application.
  • FIG. 6 is a schematic diagram of an amplitude-frequency response corresponding to an ear-shaped transfer function disclosed in an embodiment of the present application
  • Fig. 7 is a schematic diagram of the magnitude-frequency response of the first equalizer configured according to the first equalization parameters determined by the ear-shaped transfer function shown in Fig. 6;
  • Fig. 8 is a schematic diagram of a system amplitude-frequency response under different leakage degrees disclosed in the embodiment of the present application.
  • Fig. 9 is a schematic diagram of the amplitude-frequency response of the second equalizer configured according to the second equalization parameters determined according to the different leakage degrees shown in Fig. 8;
  • Fig. 10 is a schematic diagram of the amplitude-frequency response of the system after being equalized by the second equalizer shown in Fig. 9;
  • Fig. 11 is a schematic flowchart of another audio signal processing method disclosed in the embodiment of the present application.
  • Fig. 12 is a schematic structural diagram of an earphone disclosed in an embodiment of the present application.
  • FIG. 13 is a schematic flowchart of a fourth audio signal processing method disclosed in the embodiment of the present application.
  • Fig. 14 is a schematic flowchart of a fifth audio signal processing method disclosed in the embodiment of the present application.
  • Fig. 15 is a modular schematic diagram of an audio signal processing device disclosed in an embodiment of the present application.
  • Fig. 16 is a modular schematic diagram of another audio signal processing device disclosed in the embodiment of the present application.
  • Fig. 17 is a modular schematic diagram of another audio signal processing device disclosed in the embodiment of the present application.
  • Fig. 18 is a schematic modular diagram of an earphone disclosed in an embodiment of the present application.
  • the embodiment of the present application discloses an audio signal processing method and device, an earphone, and a storage medium, which can enable the earphone to provide personalized ear shape adaptive equalization and wearing leakage adaptive equalization for different users, effectively improving the audio signal performance of the earphone. Effectiveness of Active Noise Cancellation.
  • Figure 1A is a schematic diagram of an application scenario of the audio signal processing method disclosed in the embodiment of the present application
  • Figure 1B is another application scenario of the audio signal processing method disclosed in the embodiment of the application schematic diagram.
  • the application scenario may include a user 10 and an earphone 20.
  • the user 10 may detect the influence of individual factors such as the ear shape of the user 10 and the wearing state of the earphone 20 through the earphone 20 on the listening effect of the user.
  • corresponding equalization parameters can be determined for the above-mentioned personalization factors, so as to configure a suitable equalizer to carry out equalization filtering on the target audio signal to be output by the earphone 20, so as to realize targeted personalized equalization, which is beneficial to the earphone 20.
  • the earphone 20 performs more accurate noise reduction processing on the equalized target audio signal, so as to improve the effectiveness of the earphone 20 for active noise reduction.
  • the earphone 20 may use a test audio signal to detect the influence of the aforementioned individual factors on the listening effect of the user 10, and the test audio signal may be obtained by mixing a basic audio signal and an infrasonic signal.
  • the above-mentioned basic audio signal refers to the main audio components used to form the test audio signal, which can be used to detect the influence of the user 10's own ear shape on listening to the test audio signal;
  • the above-mentioned infrasound signal refers to the low-frequency sound In the range of human hearing (generally 20-20000 Hz), that is, audio signals with a sound frequency below 20 Hz can be used to detect the influence of the wearing state of the earphone 20 worn by the user 10 on the listening test audio signal, especially when the earphone is worn.
  • the earphone 20 can use the obtained test audio signal to analyze the influence of multiple different individual factors at the same time, and then set corresponding equalization parameters for different individual factors, so as to realize earphone 20 at the same time.
  • Shape adaptive equalization and wearing leakage adaptive equalization, etc. help to improve the equalization effect of the earphone 20 on audio signals.
  • the earphone 20 may include a speaker and a feedback microphone.
  • the feedback microphone is located between the speaker and the user.
  • the earphone 20 can output the above-mentioned test audio signal through its speaker, wherein the test audio signal can be generated in real time when the earphone 20 needs to detect the above-mentioned individual factors, or can be pre-generated and stored in the earphone 20 .
  • test audio signal for the situation that the test audio signal is generated in advance, before the earphone 20 leaves the factory, can specify the basic audio signal (such as white noise signal, audio data signal etc., audio data signal can include music file, recording file, chat voice
  • the audio data signal corresponding to the audio data with actual information) is mixed with the infrasound wave signal, and the test audio signal obtained by mixing is stored in the storage circuit of the earphone 20, so as to be called and output when the above-mentioned individual factors need to be detected .
  • the earphone 20 can collect the received audio signal corresponding to the above-mentioned test audio signal through its feedback microphone, and determine the first equalization parameter corresponding to the above-mentioned basic audio signal according to the received audio signal, and the first equalization parameter can be used
  • the ear shape adaptive equalization is performed on the target audio signal to be output by the earphone 20 .
  • the earphone 20 may also determine a second equalization parameter corresponding to the infrasound signal, and the second equalization parameter may be used for adaptive equalization of the target audio signal on wearing leakage.
  • the above method can realize the personalized equalization function of the earphone 20 based on the individual factors such as the shape of the ear of the user 10 and the wearing state of the earphone, so that after the above-mentioned equalization is performed on the target audio signal to be output, the user 10 can listen to it.
  • the target audio signal restores its actual original sound quality as much as possible (that is, restores the timbre, tone, etc. of the target audio signal when it is recorded or generated as much as possible).
  • the above-mentioned method also helps the earphone 20 to perform more accurate noise reduction processing on the target audio signal, avoiding problems such as deformation and attenuation of the target audio signal that has not been equalized during the transmission process, causing the earphone 20 to misjudge Based on the initial sound quality of the target audio signal, a noise reduction operation that does not match the actual needs of the user 10 is performed, thereby helping to improve the effectiveness of the earphone 20 for active noise reduction on the audio signal.
  • the earphone 20 can also establish a communication connection with the terminal device 30, so that when it is necessary to output a test audio signal to detect the influence of the above-mentioned personalized factors on the listening effect of the user 10, the user 10 can communicate with the terminal device 30.
  • the terminal device 30 interacts, so that the earphone 20 is triggered by the terminal device 30 to perform the above detection, and a corresponding equalization parameter is determined.
  • the terminal device 30 detects the user 10's test interaction (touch operations such as clicking or swiping the test button on the terminal device 30, sending "test" to the terminal device 30, etc.
  • test audio signal may include a test audio signal generated in advance and stored in the earphone 20 or on the terminal device 30 (need to be transmitted to the earphone 20 for output), and may also include combining the basic audio signal output by the terminal device 30 with the infrasound wave The resulting test audio signal is mixed in real time.
  • the terminal device 30 when the terminal device 30 detects that the user 10 controls its output audio data signal, it can transmit the corresponding audio data (such as music files, recording files, chat voice, etc.) to the earphone 20, then the earphone 20 When playing the corresponding audio data signal, it can trigger itself to use the audio data signal as the basic audio signal to mix with the infrasonic signal stored or generated by the earphone 20 to obtain a real-time test audio signal and output it.
  • the corresponding audio data such as music files, recording files, chat voice, etc.
  • the above-mentioned terminal device 30 may include various devices or systems with wireless communication functions, such as mobile phones, smart wearable devices, vehicle-mounted terminals, tablet computers, PCs (Personal Computers, personal computers), PDAs (Personal Digital Assistants, personal digital assistants) Assistant), etc., are not specifically limited in the embodiments of the present application.
  • FIG. 2 is a schematic flowchart of an audio signal processing method disclosed in an embodiment of the present application.
  • the method may be applied to the above-mentioned earphone, and the earphone may include a speaker and a feedback microphone.
  • the audio signal processing method may include the following steps:
  • a test audio signal obtained by mixing the basic audio signal and the infrasonic signal can be used for targeted testing.
  • the above-mentioned basic audio signal may include a white noise signal, an audio data signal (such as an audio data signal corresponding to audio data with actual information such as music files, recording files, and chat voices), etc., which can cover a relatively large frequency range, especially It is the main frequency band included in the hearing range of the human ear, so it can be used to detect the audio system where the earphone is located (that is, the audio signal output by the earphone is transmitted between the earphone and the user) for the test audio signal in the above frequency range Impact.
  • an audio data signal such as an audio data signal corresponding to audio data with actual information such as music files, recording files, and chat voices
  • the individualized differences in ear shapes of different users mainly affect the audio signal transmission process in the higher frequency range (such as 1000 Hz or above)
  • the subsequent In the step the analysis is performed on the higher frequency range, so as to realize corresponding ear shape adaptive equalization based on individual differences in ear shapes of different users.
  • the above-mentioned infrasound wave signal may include a pure tone signal at a specific infrasound frequency (that is, less than 20 Hz), such as an infrasound wave signal with a frequency of 10 Hz, 12 Hz, 15 Hz, etc., which is only for the ultra-low frequency range of the infrasound frequency, so that it can be used It is used to detect the influence of the audio system where the earphone is located on the test audio signal in the ultra-low frequency range. On this basis, the low-frequency leakage that may be caused by the user's different earphone wearing status mainly affects the audio signal transmission process in the lower frequency range (such as the frequency band below 1000 Hz).
  • the lower frequency range can be analyzed in subsequent steps, so as to realize the corresponding adaptive equalization of wearing leakage based on the individualized differences in the earphone wearing states of different users.
  • FIG. 3 is a schematic flowchart of mixing a basic audio signal and an infrasonic signal disclosed in an embodiment of the present application.
  • the basic audio signal when it is necessary to generate a test audio signal, the basic audio signal can be input into a high-pass filter first, and the basic audio signal is filtered through the high-pass filter, and then the filtered basic audio signal is combined with the infrasonic signal Enter into a mixer for mixing.
  • the mixer can be used to directly add the filtered basic audio signal and the infrasonic signal, and can also be used to add the filtered basic audio signal and the infrasonic signal after adjusting the gain, adjusting the time delay, etc.
  • the cutoff frequency of the above-mentioned high-pass filter can be higher than the corresponding frequency of the infrasound signal, thereby effectively reducing the interference of the basic audio signal to the infrasound signal, and facilitating the independent realization of the above-mentioned ear shape adaptive equalization and wearing leakage adaptive equalization.
  • the above process of mixing the basic audio signal and the infrasonic signal can be performed in the earphone or outside the earphone.
  • the basic audio signal and the infrasound signal can be stored in the storage circuit of the earphone respectively in advance, and when the test audio signal needs to be obtained, the earphone can call the specified basic audio signal and the infrasound signal to perform the above mixing process To obtain a test audio signal, and output the test audio signal through its built-in speaker.
  • the basic audio signal can be stored on the terminal device connected to the earphone.
  • the terminal device When the terminal device outputs the basic audio signal through the earphone (such as playing music files, recording files, chatting voice, etc.), it can be real-time
  • the basic audio signal is mixed with the specified infrasonic signal to obtain a mixed test audio signal and output to the user.
  • Fig. 4A is a schematic diagram of a test audio signal disclosed in an embodiment of the present application, showing that when the above-mentioned basic audio signal is a white noise signal, the white noise signal is passed through a high-pass filter and combined with an infrasonic signal (with a frequency of 10Hz pure tone signal as an example) mixed with the test audio signal obtained.
  • Fig. 4A is a schematic diagram of a test audio signal disclosed in an embodiment of the present application, showing that when the above-mentioned basic audio signal is a white noise signal, the white noise signal is passed through a high-pass filter and combined with an infrasonic signal (with a frequency of 10Hz pure tone signal as an example) mixed with the test audio signal obtained.
  • Fig. 4A is a schematic diagram of a test audio signal disclosed in an embodiment of the present application, showing that when the above-mentioned basic audio signal is a white noise signal, the white noise signal is passed through a high-pass filter and combined with an infra
  • FIG. 4B is a schematic diagram of another test audio signal disclosed in the embodiment of the present application, showing that when the above-mentioned basic audio signal is an audio data signal (taking the audio data signal corresponding to a music file as an example), the audio data A test audio signal obtained by passing the signal through a high-pass filter and mixing it with an infrasonic signal (still taking a pure tone signal with a frequency of 10 Hz as an example).
  • the earphone after the earphone outputs the above-mentioned test audio signal, it can collect the received audio signal corresponding to the test audio signal through its built-in feedback microphone immediately.
  • the test audio signal is used for transmission in the audio system where the earphone is located.
  • the feedback microphone After being received by the feedback microphone, it can be used to evaluate the impact of the audio signal during the transmission of the audio system, so as to determine in subsequent steps the corresponding equalization parameters. It can be understood that since the feedback microphone is located between the speaker and the user, the above audio system can also be approximately replaced by a path through which audio signals are transmitted between the speaker and the feedback microphone.
  • the feedback microphone of the earphone can continuously collect the audio signal, so that according to the time stamp of the above-mentioned test audio signal output by the speaker, the time when the feedback microphone is near the time stamp (such as delayed by 0.01 milliseconds, delayed by 0.1 milliseconds, etc.) can be obtained The collected received audio signal.
  • the feedback microphone of the earphone may not be continuously turned on, but is triggered to be turned on by the speaker after the speaker outputs the above-mentioned test audio signal, and the audio signal collected after the feedback microphone is turned on is used as the audio signal related to the above-mentioned test audio signal corresponding to the received audio signal.
  • the earphone can also use its built-in signal processing module to compare the waveform of the test audio signal output by the speaker with the received audio signal.
  • a similarity threshold such as 50%, 80%, etc.
  • the earphone after the earphone collects the above-mentioned received audio signal, it can analyze the difference between the received audio signal and the above-mentioned test audio signal according to the received audio signal, so as to evaluate the transmission process of the audio signal in the audio system where the earphone is located. The impact received, and then the equalization parameters needed to equalize the impact can be determined.
  • the earphone can respectively calculate the above-mentioned A first equalization parameter corresponding to the basic audio signal, and a second equalization parameter corresponding to the above-mentioned infrasound wave signal.
  • the first equalization parameter can be used to realize the ear shape adaptive equalization, so as to compensate for the audio signal in the higher frequency range (such as 1000Hz or above frequency band) according to the individualized difference of the ear shape of different users;
  • the second equalization parameter can be It is used to realize the adaptive equalization of wearing leakage, to compensate for the different situations of low-frequency leakage in the audio signal caused by different users' individualized differences in the wearing state of the earphones, especially the improper wearing of the earphones, improper earplug size, etc. Audio signals in the range (such as the frequency band below 1000Hz).
  • the corresponding equalizer when the target audio signal to be output needs to be equalized, the corresponding equalizer can be configured according to the above equalization parameters.
  • the foregoing filter may be composed of one or more filters.
  • a bandpass filter or a bandstop filter of the corresponding frequency band can be configured for equalization filtering; when it is necessary to perform more complex equalization on audio signals in multiple frequency bands, Corresponding equalization filtering can also be performed by configuring cascaded FIR (Finite Impulse Response, finite-length unit impulse response) filters or IIR (Infinite Impulse Response, infinite-length unit impulse response) filters.
  • the target audio signal heard by the user can be restored to its actual original sound quality as much as possible, which in turn helps to perform more accurate noise reduction processing on the target audio signal to be output by the earphone, and avoids
  • the target audio signal has problems such as deformation and attenuation during the transmission process, which leads to the earphones misjudging the initial sound quality of the target audio signal and performing a noise reduction operation that does not match the actual needs of the user, which is conducive to improving the audio signal performance of the earphones. Effectiveness of Active Noise Cancellation.
  • FIG. 5 is a schematic flowchart of another audio signal processing method disclosed in an embodiment of the present application.
  • the method may be applied to the above-mentioned earphone, and the earphone may include a loudspeaker and a feedback microphone.
  • the audio signal processing method may include the following steps:
  • the earphone When the earphone is not playing audio data, respond to an active test instruction, and acquire a test audio signal corresponding to the active test instruction, where the test audio signal is obtained by mixing a white noise signal and a first sound wave signal.
  • the active test instruction when the earphone is not playing audio data, the active test instruction can be triggered by the user, or by the terminal device connected to the earphone, so that when the earphone is not playing music files, recording files, Actively detect the influence of personalized factors such as the user's own ear shape and the wearing state of the earphone on the user's own listening effect in the state of chatting voice.
  • the earphone may respond to the active test instruction to acquire a test audio signal obtained by mixing the white noise signal and the first sound wave signal, so as to perform the above-mentioned detection through the test audio signal.
  • the above-mentioned active test instruction may include a detection trigger operation (such as specified touch operation, voice operation, mobile operation, etc.)
  • a detection trigger operation such as specified touch operation, voice operation, mobile operation, etc.
  • a corresponding active test command can be sent to the earphone.
  • the earphone can trigger its built-in DSP (Digital Signal Process, digital signal processing) module to obtain the test audio signal corresponding to the active test instruction, and then in the subsequent steps, it can communicate with the The speaker connected to the DSP module outputs the test audio signal.
  • DSP Digital Signal Process, digital signal processing
  • the above-mentioned test audio signal corresponding to the active test instruction may be obtained by mixing the white noise signal specified by the active test instruction with the first sound wave signal.
  • the white noise signal can be input into a high-pass filter (the cut-off frequency can be 20Hz, 30Hz, 40Hz, etc.) etc.), to obtain a mixed test audio signal, which can effectively reduce the interference of the white noise signal to the first sound wave signal, and is conducive to independent testing of the two.
  • the above-mentioned process of mixing the white noise signal and the first sound wave signal can be performed in real time in the earphone, or can be performed in advance outside the earphone, and the mixed test audio signal is stored in the storage circuit connected to the above-mentioned DSP module.
  • step 504 and step 506 are similar to the above-mentioned step 202 and step 204, and will not be repeated here.
  • the earphone after the earphone collects the above-mentioned received audio signal, it can evaluate the influence of the corresponding test audio signal in the transmission process of the audio system where the earphone is located according to the received audio signal, so as to deduce A test ear shape transfer function determined by individual differences in user ear shape, the test ear shape transfer function can be used to calculate a first equalization parameter for implementing ear shape adaptive equalization in a subsequent step.
  • the earphone when the earphone derives its corresponding test ear shape transfer function according to the above-mentioned received audio signal, it can first perform Fourier transform on the received audio signal, and then determine its corresponding ear shape transfer function according to the received audio signal after Fourier transform. Test the ear shape transfer function.
  • the built-in signal processing module of the earphone (such as the above-mentioned DSP module, etc.) can first perform frame and window processing on the received audio signal, that is, divide the macroscopically unstable audio signal into multiple audio signals with short-term stationarity.
  • the windowing truncation can be realized by the window function shown in formula 1:
  • the piecewise function w(n) is a window function
  • N is the unit window length.
  • the effect of windowing and truncation can be realized by performing time-domain convolution on the received audio signal and the window function.
  • the received audio signal of a certain frame obtained after frame division and windowing can be short-time Fourier transformed by algorithms such as FFT (FastFourierTransform, Fast Fourier Transform), and its expression can be shown in the following formula 2 :
  • n discrete time
  • continuous frequency ⁇ 2 ⁇ k/N
  • k 0,1,...,N-1
  • N is the Fourier transform length
  • x(m) is the audio signal of the mth frame.
  • the earphone can determine the test ear shape transfer function corresponding to the above-mentioned received audio signal.
  • the test ear shape transfer function H(k) can be expressed as:
  • x(n) corresponds to the aforementioned X n (e j ⁇ ).
  • the earphone determines the above-mentioned test ear shape transfer function, it can also obtain a corresponding target ear shape transfer function.
  • the target ear shape transfer function may include the ear shape transfer function measured when the earphone is placed in a standard ear shape fixture (such as IEC711, etc.), that is, the earphone is placed in a standard ear shape with good airtightness in an anechoic room environment.
  • the ear shape transfer function at this time is detected; the ear shape transfer function obtained by statistics can also be included, for example, the transfer function when a large number of users normally wear earphones is obtained in an anechoic room environment, and the statistics are averaged, Obtain the corresponding target ear shape transfer function; for another example, if the transfer function of the above-mentioned large number of users wearing earphones is expressed in the form of a function curve, the mean value curve can be obtained for the above-mentioned function curve, and the function corresponding to the mean value curve can be determined is the target ear shape function.
  • the earphone can calculate the first equalization parameter corresponding to the white noise signal based on the least squares criterion and according to the test ear shape transfer function and the target ear shape transfer function.
  • the first equalization parameters may include tap coefficients, gain coefficients, etc. for configuring the filters included in the corresponding first equalizer.
  • the first equalizer may include an equalizer composed of FIR (Finite Unit Impulse Response) filters, so that a regularization filter, etc.
  • the first equalizer is designed with the goal of minimizing the equalization error.
  • the expression of the response M(k) of the first equalizer in the frequency domain can be as shown in the following formula 4:
  • H(k) is the above-mentioned test ear shape transfer function
  • D(k) is the above-mentioned target ear shape transfer function
  • B(k) can represent the Fourier transform of the regularized filter response
  • can represent the regularized Weighting scalar for the filter.
  • the M(k) calculated by the above formula 4 can be used to configure the corresponding FIR filter after undergoing inverse Fourier transform.
  • Figure 6 is a schematic diagram of the amplitude-frequency response corresponding to an ear-shaped transfer function disclosed in the embodiment of the present application
  • Figure 7 is based on the ear-shaped transfer function shown in Figure 6
  • the dotted line represents the frequency response of the above-mentioned test ear transfer function
  • the solid line represents the frequency response of the target ear transfer function. The difference between the two is obvious in the higher frequency range of 1000 Hz or above.
  • the audio signal can be equalized in the above-mentioned higher frequency range, so that the equalized ear shape transfer function (dotted line) is as close as possible to the target ear shape transfer function (real line), so as to achieve ear shape adaptive equalization.
  • the received audio signal may be input into the first band-pass filter, so as to obtain the first low-frequency received signal corresponding to the above-mentioned first sound wave signal.
  • the passband of the first bandpass filter may include the frequency corresponding to the above-mentioned first sound wave signal, and at the same time, the passband may be relatively narrow, so that it can only filter out the earphones that are affected by the wearing state of the user's earphones and cause different degrees of wearing leakage.
  • the low-frequency audio signal reduces the interference caused by the above-mentioned basic audio signal (white noise signal in this embodiment).
  • the center frequency of the first band-pass filter can also be 10 Hz, and the bandwidth of its pass band can be 4 Hz, 6 Hz, 8 Hz, etc. Examples are not specifically limited.
  • the earphone can evaluate the wearing leakage that occurs during the transmission of the audio signal in the audio system where the earphone is located in the subsequent steps.
  • the wearing leakage is mainly caused by improper wearing of the earphone and improper earplug size. and other reasons, and are concentrated in the middle and low frequency bands, so the evaluation can be realized through the first low-frequency received signal in the ultra-low frequency range, and the second equalization parameters used to achieve adaptive equalization of wearing leakage are further calculated in subsequent steps .
  • the adaptive equalization of wearing leakage performed on the user's individualized differences in earphone wearing states may only be performed on audio signals in a lower frequency range (eg, frequency bands below 1000 Hz).
  • the signal energy of the above-mentioned first low-frequency received signal can be calculated to calculate the signal energy of the first low-frequency received signal in subsequent steps.
  • the energy determines the corresponding low-frequency leakage, and then calculates the second equalization parameter used to realize the self-adaptive equalization of the wearing leakage.
  • the calculated signal energy and the target energy can be measured according to the same method signal energy) to obtain normalized signal energy, which is convenient to directly look up the table in subsequent steps to determine its corresponding low-frequency leakage degree.
  • the built-in processor of the earphone may perform windowing and segmentation on the first low-frequency received signal according to the unit window length to obtain at least one frame of low-frequency sub-signals.
  • the window function used for windowing and segmenting the first low-frequency received signal may include a rectangular window function, or other forms of window functions, such as a triangular window function, a Hamming window function, and the like.
  • the above windowing segmentation step can be performed only by using a rectangular window function.
  • the built-in processor of the earphone can separately calculate the short-term average energy of each frame of low-frequency sub-signal, and smooth the calculated short-time average energy to obtain the smoothed short-time average energy.
  • the calculation may be performed in the manner shown in the following formula 5:
  • E n represents the short-term average energy of the low-frequency sub-signal in the nth frame (or at the n moment)
  • n is the discrete time
  • w(nm) is the time-shift representation of the window function w(n)
  • x(m) represents the Frame low-frequency sub-signal
  • N is the unit window length.
  • E n (m) ⁇ ⁇ E n (m-1) + (1- ⁇ ) ⁇ E n (m), 0 ⁇ 1
  • E n (m) is the energy of the smoothed audio signal
  • is a coefficient for performing the above-mentioned exponential smoothing.
  • the built-in processor of the earphone can compare the above-mentioned smoothed audio signal energy E n (m) with the above-mentioned target energy to obtain a ratio between the two, and use this ratio as the normalized signal energy of the first low-frequency received signal .
  • the way to calculate the normalized signal energy can be shown as formula 7:
  • Pnor is the normalized signal energy
  • E ng is the above target energy
  • the earphone may pre-classify different leakage degrees according to different signal energy ranges.
  • the earphone can divide the corresponding leakage degree according to a uniform step size (such as 0.2 unit of normalized signal energy, 0.4 unit of normalized signal energy, etc.), or can divide different leakage according to other distribution methods degree.
  • a uniform step size such as 0.2 unit of normalized signal energy, 0.4 unit of normalized signal energy, etc.
  • FIG. 8 is a schematic diagram of a system amplitude-frequency response under different leakage degrees disclosed in an embodiment of the present application.
  • curve A is the corresponding frequency response when the user wears the earphone normally (that is, when no low-frequency leakage occurs)
  • curves B, C, D, and E can respectively represent the frequency response under different leakage degrees, and according to Leakage severity can be ranked as B, C, D, E from low to high.
  • each different leakage degree can be matched with the corresponding leakage frequency response curve, and the leakage frequency response curve matched by each leakage degree can be obtained by matching the wearing state of the earphones with the earphones of each leakage degree. It is obtained by testing (that is, testing frequency response).
  • the earphone can uniquely determine the leakage frequency response curve matching the leakage degree according to the above leakage degree, and then obtain an equalized frequency response curve matching the leakage frequency response curve in the subsequent steps, and according to the equalized A frequency response curve is used to determine a second equalization parameter corresponding to the infrasound wave signal.
  • FIG. 9 is a schematic diagram of the amplitude-frequency response of the second equalizer configured according to the second equalization parameters determined according to the different leakage levels shown in FIG.
  • the corresponding second equalization parameters can be calculated from the leakage degrees, so as to configure the corresponding first equalization parameters based on the second equalization parameters.
  • the second equalizer realizes the corresponding self-adaptive equalization of wearing leakage.
  • the second equalizer corresponding to the frequency response curve B in Figure 9 can be used to equalize and compensate the target audio signal to be output by the earphone at the leakage level corresponding to the frequency response curve B in Figure 8; the frequency response curve E in Figure 9
  • the corresponding second equalizer can be used to equalize and compensate the target audio signal to be output by the earphone at the leakage level corresponding to the frequency response curve E in FIG. 8 .
  • step 512, step 514 and step 516 can be performed after the above step 506, so that the earphone can independently and simultaneously implement the above ear shape adaptive equalization and wearing leakage adaptive equalization.
  • implementing the audio signal processing method described in the above embodiments can realize the corresponding ear shape adaptive equalization and wearing leakage adaptive equalization according to the individual factors such as the ear shape of different users wearing earphones and the wearing state of the earphones.
  • the target audio signal heard by the user can be restored to its actual original sound quality as much as possible, which in turn helps to perform more accurate noise reduction processing on the target audio signal to be output by the earphone, thereby helping to improve the earphone quality. Effectiveness of Active Noise Cancellation on audio signals.
  • the amount of repeated calculations can be reduced as much as possible, and the efficiency of earphone equalization and noise reduction can be improved.
  • FIG. 11 is a schematic flowchart of another audio signal processing method disclosed in the embodiment of the present application.
  • the method can be applied to the above-mentioned earphone, and the earphone can specifically include a speaker, a feedforward microphone, and a feedback microphone.
  • the audio signal processing method may include the following steps:
  • the earphone when the earphone is already playing audio data (such as playing music files, recording files, chatting voice, etc.), it can automatically detect the user's own ear shape and wear the earphone without the need for active triggering by the user. The impact of personalized factors such as wearing status on the user's own listening effect. In order to realize the above detection, the earphone can mix the audio data signal to be played with the second sound wave signal to obtain a corresponding test audio signal.
  • audio data such as playing music files, recording files, chatting voice, etc.
  • the audio data signal can be input into a high-pass filter (cutoff frequency can be 20Hz, 30Hz, 40Hz, etc.) ) to mix the second sound wave signal to obtain a mixed test audio signal, which can effectively reduce the interference of the audio data signal to the second sound wave signal, and is conducive to independent testing of the two.
  • a high-pass filter cutoff frequency can be 20Hz, 30Hz, 40Hz, etc.
  • the mixing of the above-mentioned audio data signal and the second sound wave signal can be intermittently performed periodically, that is, the earphone can first play the mixed test audio signal for a certain period of time, and then play the unmixed audio data for a certain period of time signal, the two take turns.
  • the earphone can control the speaker to output the above-mentioned test audio signal every first time length (such as 8 seconds, 6 seconds, etc.), and after outputting the test audio signal for a second time length (such as 3 seconds, 1 second, etc.), The speaker is then controlled to resume outputting audio data signals.
  • the above-mentioned first duration is longer than the second duration, so that whenever the test audio signal of the second duration is continuously output, the earphone will continue to output the audio data signal of (first duration-second duration), so as to avoid continuous and uninterrupted Performing detection results in unnecessary waste of power consumption.
  • the test audio signal is only mixed with the second sound wave signal, and the human ear has no feeling for the second sound wave signal of the subsonic frequency, so the audio data signal playback function of the earphone will not be affected .
  • step 1106 is similar to the above-mentioned step 204 and will not be repeated here.
  • test ear shape transfer function corresponding to the received audio signal.
  • Step 1108 and Step 1110 are similar to Step 508 and Step 510 above. It should be noted that, in the embodiment of the present application, the white noise signal is replaced by an audio data signal.
  • FIG. 12 is a schematic structural diagram of an earphone disclosed in an embodiment of the present application.
  • the earphone in addition to the speaker 121 and the feedback microphone 122 arranged in front of the speaker 121, the earphone can also include a feedforward microphone 123, and the feedforward microphone 123 can be arranged behind the speaker 121 (that is, when the user wears For the earphone, the feed-forward microphone is between the speaker and the external environment), so as to collect the ambient sound of the outside world through the feed-forward microphone 123 .
  • the earphone may first collect ambient sound through its feed-forward microphone, and then judge whether it is suitable for performing the above-mentioned test steps according to the collected ambient sound.
  • the ambient sound may be filtered by a third band-pass filter to obtain a low-frequency ambient sound signal.
  • the passband of the third bandpass filter may include the frequency corresponding to the infrasound wave signal, so that low-frequency environmental sound signals that may interfere with the infrasound wave signal in the environmental sound may be acquired in a targeted manner.
  • the earphone can also calculate the noise energy corresponding to the low-frequency ambient sound signal, and perform the above-mentioned pass when the noise energy is lower than the noise energy threshold (which can be set to 0, indicating that a test environment requiring no interference noise at all) The step of outputting a test audio signal by the speaker.
  • the noise energy threshold which can be set to 0, indicating that a test environment requiring no interference noise at all
  • the earphone when the earphone controls the speaker to output the above-mentioned test audio signal every first time length, the earphone can collect the ambient sound at the moment when the test audio signal is not output (that is, the infrasonic signal is not mixed) to perform the above calculation and judgment, and When it is judged that the noise energy of the ultra-low frequency is lower than the noise energy threshold, the step of mixing the infrasonic signal to output the test audio signal is performed, thereby effectively avoiding the interference of the ultra-low frequency noise on the wearing leakage equalization of the earphone.
  • the degree to which the received audio signal is interfered by the environmental sound can be judged.
  • the correlation between the two is higher, and the earphone leakage degree is also higher at this time; when the environmental sound interferes with the received audio signal to a lesser degree, the two The correlation between the two is lower, and the degree of on-wear leakage of the headset is also lower at this time.
  • the earphone can first calculate the correlation coefficient between the ambient sound and the above-mentioned received audio signal, and the calculation method can be shown in the following formula 8:
  • step 1112 and step 1114 may not be performed after step 1110, but only need to be performed before subsequent step 1116.
  • the infrasonic signal included in the unoutputted test audio signal can also be used as s j to directly calculate the correlation between the environmental sound s i and the infrasonic signal s j coefficient, so that the correlation between the two can be directly determined, which is helpful for judging the wearing leakage degree of the earphone.
  • the correlation coefficient is not greater than the correlation threshold, filter the received audio signal through a first bandpass filter to obtain a first low-frequency received signal.
  • Step 1116 , Step 1118 and Step 1120 are similar to Step 512 , Step 514 and Step 516 above. It should be noted that, in the embodiment of the present application, the first sound wave signal is replaced by the second sound wave signal, and the first sound wave signal and the second sound wave signal may be the same or different.
  • the first equalizer is used to perform earshaping on frequency bands in the target audio signal to be output that are higher than or equal to the target frequency threshold
  • the second equalizer is used to perform wear leakage adaptive equalization on frequency bands in the target audio signal that are lower than the target frequency threshold.
  • the above-mentioned first equalizer may include an equalizer composed of a finite-length unit impulse response FIR filter
  • the second equalizer may include an equalizer composed of an infinite-length unit impulse response IIR filter
  • the audio signal processing method described in the above embodiments can realize the corresponding ear shape adaptive equalization and wearing leakage adaptive equalization according to the individual factors such as the ear shape of different users wearing earphones and the wearing state of the earphones.
  • the target audio signal heard by the user can be restored to its actual original sound quality as much as possible, which in turn helps to perform more accurate noise reduction processing on the target audio signal to be output by the earphone, thereby helping to improve the earphone quality.
  • Effectiveness of Active Noise Cancellation on audio signals by configuring a corresponding compensation filter, targeted compensation can be performed on the target audio signal to be output by the earphone, further improving the accuracy and effectiveness of audio signal compensation based on user preference.
  • FIG. 13 is a schematic flowchart of a fourth audio signal processing method disclosed in an embodiment of the present application, which can be applied to the above-mentioned earphone.
  • the audio signal processing method may include the following steps:
  • test audio signal includes any one of a white noise signal and an audio data signal
  • test audio signal in the embodiment of the present application adopts either a white noise signal or an audio data signal, so that the earphone can individually provide personalized ear shape adaptive equalization for different users.
  • the earphone when the earphone outputs a test audio signal through its loudspeaker, it can also first determine whether the earphone is in the wearing state, and only respond to the user's request to the earphone or contact with the earphone when it is judged that the earphone is in the wearing state.
  • the active test command issued by the connected device outputs the above-mentioned test audio signal through its speaker.
  • the earphone can configure the first equalizer according to the first equalization parameter, so as to be used in the target audio signal to be output that is higher than or equal to the target frequency threshold (eg 1000Hz) frequency band for ear shape adaptive equalization.
  • the target frequency threshold eg 1000Hz
  • FIG. 14 is a schematic flowchart of a fifth audio signal processing method disclosed in an embodiment of the present application, which can be applied to the above-mentioned earphone.
  • the audio signal processing method may include the following steps:
  • test audio signal includes an infrasound wave signal
  • test audio signal in the embodiment of the present application only uses the infrasonic signal, so that the earphone can individually provide personalized adaptive equalization of wearing leakage for different users.
  • the above-mentioned received audio signal may be filtered through a first band-pass filter to obtain the first low-frequency received signal, and then the first low-frequency received signal may be calculated.
  • the signal energy is normalized, and the leakage degree is determined according to the normalized signal energy, and the second equalization parameter corresponding to the above-mentioned infrasonic wave signal is calculated according to the leakage degree.
  • the earphone can also collect the ambient sound of the current environment in advance, so as to judge whether it is suitable for performing the above test steps according to the collected ambient sound.
  • the earphone can calculate the correlation coefficient according to the environmental sound and the above-mentioned received audio signal, and only when the correlation coefficient is not greater than the correlation threshold, the above-mentioned passing through the first band
  • the pass filter filters the received audio signal to obtain the first low-frequency received signal, so as to avoid causing greater interference to the subsequent calculation of the equalization parameters of the earphone, thereby avoiding reducing the accuracy and reliability of the equalization of the audio signal.
  • the ambient sound may also be filtered by a third bandpass filter to obtain a low-frequency ambient sound signal.
  • the passband of the third bandpass filter may include the frequency corresponding to the infrasound wave signal, so that low-frequency environmental sound signals that may interfere with the infrasound wave signal in the environmental sound may be acquired in a targeted manner.
  • the earphone can also calculate the noise energy corresponding to the low-frequency ambient sound signal, and perform the above-mentioned pass when the noise energy is lower than the noise energy threshold (which can be set to 0, indicating that a test environment requiring no interference noise at all) The step of outputting a test audio signal by the speaker.
  • the earphone when the earphone controls the speaker to output the above-mentioned test audio signal every first time length, the earphone can collect the ambient sound at the moment when the test audio signal is not output (that is, the infrasonic signal is not mixed) to perform the above calculation and judgment, and When it is judged that the noise energy of the ultra-low frequency is lower than the noise energy threshold, the step of mixing the infrasonic signal to output the test audio signal is performed, thereby effectively avoiding the interference of the ultra-low frequency noise on the wearing leakage equalization of the earphone.
  • the earphone can configure the second equalizer according to the second equalization parameter, so as to be used in the target audio signal to be output that is lower than the target frequency threshold (such as 1000Hz) frequency band for wearing leakage adaptive equalization.
  • the target frequency threshold such as 1000Hz
  • FIG. 15 is a modular diagram of an audio signal processing device disclosed in an embodiment of the present application.
  • the audio signal processing device can be applied to the above-mentioned earphone, and the earphone can include a speaker, a feedback microphone and a feed-forward microphone.
  • the audio signal processing device may include a first output unit 1501, a first receiving unit 1502, and a first parameter calculation unit 1503, wherein:
  • the first output unit 1501 is configured to output a test audio signal through a speaker, wherein the test audio signal is obtained by mixing a basic audio signal and an infrasonic signal;
  • the first receiving unit 1502 is configured to collect a received audio signal corresponding to the test audio signal through a feedback microphone;
  • the first parameter calculation unit 1503 is configured to determine a first equalization parameter corresponding to the basic audio signal according to the received audio signal, and determine a second equalization parameter corresponding to the infrasound wave signal according to the received audio signal, wherein the first equalization parameter is used to treat
  • the output target audio signal is subjected to ear shape adaptive equalization matching the user's ear shape, and the second equalization parameter is used to perform wearing leakage adaptive equalization matching the earphone wearing state on the target audio signal.
  • the target audio signal heard by the user can be restored to its actual original sound quality as much as possible, which in turn helps to perform more accurate noise reduction processing on the target audio signal to be output by the earphone, and avoids
  • the target audio signal has problems such as deformation and attenuation during the transmission process, which leads to the earphones misjudging the initial sound quality of the target audio signal and performing a noise reduction operation that does not match the actual needs of the user, which is conducive to improving the audio signal performance of the earphones. Effectiveness of Active Noise Cancellation.
  • the test audio signal is obtained by mixing the basic audio signal filtered by a high-pass filter and the infrasound signal, and the cut-off frequency of the high-pass filter is higher than the corresponding frequency of the infrasound signal.
  • the above-mentioned audio signal processing device may further include an acquisition unit not shown, which is used for when the earphone is not playing audio data before the first output unit 1501 outputs the test audio signal through the speaker Next, in response to the active test instruction, a test audio signal corresponding to the active test instruction is obtained, wherein the test audio signal is obtained by mixing the white noise signal and the first sound wave signal.
  • the above-mentioned audio signal processing device may further include a mixing unit not shown, which is used for playing audio data on the earphone before the first output unit 1501 outputs the test audio signal through the speaker , mixing the audio data signal to be played with the second sound wave signal to obtain a test audio signal;
  • the above-mentioned first output unit 1501 can specifically be used to control the speaker to output a test audio signal every first time period when the earphone is playing audio data, and control the speaker to resume after the speaker outputs the test audio signal for a second time period.
  • An audio data signal is output, wherein the first duration is longer than the second duration.
  • the above-mentioned first parameter calculation unit 1503 may include a first calculation subunit and a second calculation subunit not shown, wherein:
  • the first calculation subunit is used to determine the test ear shape transfer function corresponding to the received audio signal according to the received audio signal; based on the least squares criterion, according to the test ear shape transfer function and the target ear shape transfer function, calculate the basic audio frequency The first equalization parameter corresponding to the signal.
  • the second calculation subunit is used to filter the received audio signal through the first bandpass filter to obtain the first low-frequency received signal; calculate the normalized signal energy of the first low-frequency received signal; determine the leakage according to the normalized signal energy degree, and calculate the second equalization parameter corresponding to the infrasonic signal according to the degree of leakage.
  • the second calculation subunit calculates the normalized energy of the first low-frequency received signal, it may specifically include:
  • the second calculation subunit when the second calculation subunit calculates the second equalization parameter corresponding to the infrasonic signal according to the degree of leakage, it may specifically include:
  • An equalization frequency response curve matching the leakage frequency response curve is obtained, and a second equalization parameter corresponding to the infrasonic signal is determined according to the equalization frequency response curve.
  • the second calculation subunit before the second calculation subunit filters the received audio signal through the first bandpass filter to obtain the first low-frequency received signal, it can also collect the environmental sound through the feed-forward microphone; according to the environmental sound and the received The audio signal is calculated to obtain a correlation coefficient; it filters the received audio signal through a first bandpass filter, and the step of obtaining the first low-frequency received signal may specifically include:
  • the step of filtering the received audio signal through the first band-pass filter to obtain the first low-frequency received signal is performed.
  • the second calculation subunit calculates the above correlation coefficient, it may specifically include:
  • a correlation coefficient between the low-frequency ambient sound signal and the second low-frequency received signal is calculated as a correlation coefficient between the ambient sound and the received audio signal.
  • the audio signal processing device may further include a configuration unit not shown in the figure, and the configuration unit may be specifically used to determine the first parameter corresponding to the basic audio signal in the first parameter calculation unit 1503 according to the received audio signal.
  • the first equalizer is configured according to the first equalization parameter
  • the second equalizer is configured according to the second equalization parameter, wherein the first equalizer is used to adjust the target audio signal.
  • the ear shape adaptive equalization is performed on the frequency band of the target frequency threshold
  • the second equalizer is used to perform wearing leakage adaptive equalization on the frequency band of the target audio signal which is lower than the target frequency threshold.
  • the first equalizer includes an equalizer composed of a finite-length unit impulse response FIR filter.
  • the second equalizer includes an equalizer composed of infinite unit impulse response IIR filters.
  • the second calculation subunit can also filter the environmental sound through the third bandpass filter to obtain a low-frequency environmental sound signal; calculate the corresponding low-frequency environmental sound signal The noise energy; in the case that the noise energy is lower than the noise energy threshold, execute the step of outputting the test audio signal through the speaker.
  • the audio signal processing device described in the above embodiments it is possible to realize the corresponding ear shape adaptive equalization and wearing leakage adaptive equalization according to the individual factors such as the ear shape of different users wearing earphones and the earphone wearing state.
  • the target audio signal heard by the user can be restored to its actual original sound quality as much as possible, which in turn helps to perform more accurate noise reduction processing on the target audio signal to be output by the earphone, thereby helping to improve the earphone quality.
  • Effectiveness of Active Noise Cancellation on audio signals by configuring a corresponding compensation filter, targeted compensation can be performed on the target audio signal to be output by the earphone, further improving the accuracy and effectiveness of audio signal compensation based on user preferences.
  • FIG. 16 is a modular schematic diagram of another audio signal processing device disclosed in the embodiment of the present application.
  • the audio signal processing device can be applied to the above-mentioned earphone, and the earphone can include a speaker, a feedback microphone and a feed-forward microphone.
  • the audio signal processing device may include a second output unit 1601, a second receiving unit 1602, a function determining unit 1603, and a second parameter calculating unit 1604, wherein:
  • the second output unit 1601 is configured to output a test audio signal through a speaker, wherein the test audio signal includes any one of a white noise signal and an audio data signal;
  • the second receiving unit 1602 is configured to collect a received audio signal corresponding to the test audio signal through a feedback microphone
  • a function determining unit 1603, configured to determine a test ear shape transfer function corresponding to the received audio signal according to the received audio signal;
  • the second parameter calculation unit 1604 is used to calculate the first equalization parameter corresponding to the test audio signal according to the test ear shape transfer function and the target ear shape transfer function based on the least squares criterion, and the first equalization parameter is used for the signal to be output
  • the target audio signal is subjected to ear shape adaptive equalization that matches the user's ear shape.
  • any one of white noise signal and audio data signal is used as the test audio signal, so that the earphone can individually provide personalized ear shape adaptive equalization for different users.
  • FIG. 17 is a modular schematic diagram of another audio signal processing device disclosed in the embodiment of the present application.
  • the audio signal processing device can be applied to the above-mentioned earphone, and the earphone can include a speaker, a feedback microphone and a feedforward microphone.
  • the audio signal processing device may include a third output unit 1701, a third receiving unit 1702, and a third parameter calculation unit 1703, wherein:
  • the third output unit 1701 is configured to output a test audio signal through a speaker, wherein the test audio signal includes an infrasound wave signal;
  • the third receiving unit 1702 is configured to collect a received audio signal corresponding to the test audio signal through a feedback microphone
  • the third parameter calculation unit 1703 is configured to calculate the signal energy of the received audio signal, and determine the second equalization parameter corresponding to the infrasound wave signal according to the signal energy, and the second equalization parameter is used to match the target audio signal to be output with the earphone wearing state The wearing leakage adaptive equalization.
  • the earphone can individually provide personalized adaptive equalization of wearing leakage for different users.
  • FIG. 18 is a schematic modular diagram of an earphone disclosed in an embodiment of the present application.
  • the headset may include:
  • a memory 1801 storing executable program codes
  • processor 1802 coupled with a memory 1801;
  • the processor 1802 invokes the executable program code stored in the memory 1801 to execute all or part of the steps in any audio signal processing method described in the above-mentioned embodiments.
  • the embodiment of the present application further discloses a computer-readable storage medium, which stores a computer program for electronic data exchange, wherein the computer program enables the computer to execute any audio signal processing method described in the above-mentioned embodiments All or some of the steps in .
  • the embodiments of the present application further disclose a computer program product.
  • the computer program product When the computer program product is run on a computer, the computer can execute all or part of the steps in any audio signal processing method described in the above embodiments.
  • ROM read-only Memory
  • RAM random access memory
  • PROM programmable read-only memory
  • EPROM Erasable Programmable Read Only Memory
  • OTPROM One-time Programmable Read-Only Memory
  • EEPROM Electronically Erasable Programmable Read-Only Memory
  • CD-ROM Compact Disc Read-Only Memory

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Soundproofing, Sound Blocking, And Sound Damping (AREA)

Abstract

一种音频信号处理方法及装置、耳机、存储介质,该方法应用于耳机,包括:通过扬声器输出测试音频信号,该测试音频信号由基础音频信号与次声波信号混合得到;通过反馈麦克风采集与测试音频信号对应的接收音频信号;根据接收音频信号确定与基础音频信号对应的第一均衡参数,以及与次声波信号对应的第二均衡参数,其中,第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡,第二均衡参数用于对该目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。实施本申请实施例,能够使得耳机针对不同用户提供个性化的耳形自适应均衡以及佩戴泄漏自适应均衡,从而有助于提升耳机对音频信号进行主动降噪的有效性。

Description

音频信号处理方法及装置、耳机、存储介质
本申请要求于2021年8月19日提交、申请号为202110954133.2、发明名称为“音频信号处理方法及装置、耳机、存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子设备技术领域,尤其涉及一种音频信号处理方法及装置、耳机、存储介质。
背景技术
当前,耳机用户在佩戴使用耳机时,由于不同用户在耳形的生理结构、尺寸等方面存在差异,且不同用户的耳机佩戴方式也千差万别,往往会给用户造成预期之外不同程度的听音差异。在实践中发现,传统的音频处理方法往往难以针对上述听音差异进行有效的调整,进而也导致耳机无法根据用户的实际需求来对待输出的音频信号进行合适的降噪处理,降低了耳机对音频信号进行主动降噪的有效性。
发明内容
本申请实施例公开了一种音频信号处理方法及装置、耳机、存储介质,能够使得耳机针对不同用户提供个性化的耳形自适应均衡以及佩戴泄漏自适应均衡,提升了耳机对音频信号进行主动降噪的有效性。
本申请实施例第一方面公开一种音频信号处理方法,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述方法包括:
通过所述扬声器输出测试音频信号,其中,所述测试音频信号由基础音频信号与次声波信号混合得到;
通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
根据所述接收音频信号确定与所述基础音频信号对应的第一均衡参数,以及根据所述接收音频信号确定与所述次声波信号对应的第二均衡参数,其中,所述第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡,所述第二均衡参数用于对所述目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
本申请实施例第二方面公开一种音频信号处理方法,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述方法包括:
通过所述扬声器输出测试音频信号,其中,所述测试音频信号包括白噪声信号和音频数据信号中的任一种;
通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
根据所述接收音频信号,确定与所述接收音频信号对应的测试耳形传递函数;
基于最小二乘准则,根据所述测试耳形传递函数以及目标耳形传递函数,计算得到与所述基础音频信号对应的第一均衡参数,所述第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡。
本申请实施例第三方面公开一种音频信号处理方法,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述方法包括:
通过所述扬声器输出测试音频信号,其中,所述测试音频信号包括次声波信号;
通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
计算所述接收音频信号的信号能量,并根据所述信号能量确定与所述次声波信号对应的第二均衡参数,所述第二均衡参数用于对待输出的目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
本申请实施例第四方面公开一种音频信号补偿装置,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述音频信号处理装置包括:
第一输出单元,用于通过所述扬声器输出测试音频信号,其中,所述测试音频信号由基础音频信号与次声波信号混合得到;
第一接收单元,用于通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
第一参数计算单元,用于根据所述接收音频信号确定与所述基础音频信号对应的第一均衡参数,以及根据所述接收音频信号确定与所述次声波信号对应的第二均衡参数,其中,所述第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡,所述第二均衡参数用于对所述目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
本申请实施例第五方面公开一种音频信号补偿装置,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述音频信号处理装置包括:
第二输出单元,用于通过所述扬声器输出测试音频信号,其中,所述测试音频信号包括白噪声信号和音频数据信号中的任一种;
第二接收单元,用于通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
函数确定单元,用于根据所述接收音频信号,确定与所述接收音频信号对应的测试耳形传递函数;
第二参数计算单元,用于基于最小二乘准则,根据所述测试耳形传递函数以及目标耳形传递函数,计算得到与所述基础音频信号对应的第一均衡参数,所述第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡。
本申请实施例第六方面公开一种音频信号补偿装置,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述音频信号处理装置包括:
第三输出单元,用于通过所述扬声器输出测试音频信号,其中,所述测试音频信号包括次声波信号;
第三接收单元,用于通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
第三参数计算单元,用于计算所述接收音频信号的信号能量,并根据所述信号能量确定与所述次声波信号对应的第二均衡参数,所述第二均衡参数用于对待输出的目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
本申请实施例第七方面公开了一种耳机,包括存储器及处理器,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器实现如本申请实施例第一方面、第二方面或第三方面公开的任意一种音频信号处理方法中的全部或部分步骤。
本申请实施例第八方面公开了一种计算机可读存储介质,其存储计算机程序,其中,所述计算机程序被处理器执行时实现如本申请实施例第一方面、第二方面或第三方面公开的任意一种音频信号处理方法中的全部或部分步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和有益效果将从说明书、附图以及权利要求书中体现。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图进行简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1A是本申请实施例公开的音频信号处理方法的一种应用场景示意图;
图1B是本申请实施例公开的音频信号处理方法的另一种应用场景示意图;
图2是本申请实施例公开的一种音频信号处理方法的流程示意图;
图3是本申请实施例公开的一种混合基础音频信号与次声波信号的流程示意图;
图4A是本申请实施例公开的一种测试音频信号的示意图;
图4B是本申请实施例公开的另一种测试音频信号的示意图;
图5是本申请实施例公开的另一种音频信号处理方法的流程示意图;
图6是本申请实施例公开的一种耳形传递函数对应的幅频响应示意图;
图7是根据图6所示的耳形传递函数确定的第一均衡参数所配置的第一均衡器的幅频响应示意图;
图8是本申请实施例公开的一种不同泄漏程度下的***幅频响应示意图;
图9是根据图8所示的不同泄漏程度确定的第二均衡参数所配置的第二均衡器的幅频响应示意图;
图10是通过图9所示的第二均衡器进行均衡后的***幅频响应示意图;
图11是本申请实施例公开的又一种音频信号处理方法的流程示意图;
图12是本申请实施例公开的一种耳机的结构示意图;
图13是本申请实施例公开的第四种音频信号处理方法的流程示意图;
图14是本申请实施例公开的第五种音频信号处理方法的流程示意图;
图15是本申请实施例公开的一种音频信号处理装置的模块化示意图;
图16是本申请实施例公开的另一种音频信号处理装置的模块化示意图;
图17是本申请实施例公开的又一种音频信号处理装置的模块化示意图;
图18是本申请实施例公开的一种耳机的模块化示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整的描述,显然, 所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,本申请实施例的术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、***、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本申请实施例公开了一种音频信号处理方法及装置、耳机、存储介质,能够使得耳机针对不同用户提供个性化的耳形自适应均衡以及佩戴泄漏自适应均衡,有效提升了耳机对音频信号进行主动降噪的有效性。
以下将结合附图进行详细描述。
请一并参阅图1A及图1B,图1A是本申请实施例公开的音频信号处理方法的一种应用场景示意图,图1B则是本申请实施例公开的音频信号处理方法的另一种应用场景示意图。如图1A所示,该应用场景可以包括用户10及耳机20,用户10可以通过该耳机20检测用户10自身的耳形、佩戴耳机20的佩戴状态等个性化因素对自身听音效果的影响,进而可以针对上述个性化因素确定相应的均衡参数,以用于配置合适的均衡器,来对该耳机20待输出的目标音频信号进行均衡滤波,实现具有针对性的个性化均衡,从而有利于该耳机20对均衡后的目标音频信号进行更准确的降噪处理,提升该耳机20进行主动降噪的有效性。
示例性地,耳机20可以利用测试音频信号来检测上述个性化因素对用户10的听音效果的影响,该测试音频信号可以是由基础音频信号与次声波信号混合得到的。其中,上述基础音频信号,指的是用于构成测试音频信号的主要音频成分,可以用于检测用户10自身的耳形对其收听测试音频信号的影响;上述次声波信号,指的是声音频率低于人耳听音范围(一般为20~20000Hz),即声音频率为20Hz以下的音频信号,可以用于检测用户10佩戴该耳机20的佩戴状态对其收听测试音频信号的影响,尤其是耳机佩戴方式不当、耳塞尺寸不合适等原因导致的测试音频信号中低频泄漏的情况(表现为测试音频信号在中低频频段的非常规衰减)。通过混合上述基础音频信号以及次声波信号,耳机20可以利用所得到的测试音频信号同时分析多个不同个性化因素的影响,进而可以针对不同的个性化因素设置相应的均衡参数,从而可以同时实现耳形自适应均衡以及佩戴泄漏自适应均衡等,有助于提升耳机20对音频信号的均衡效果。
在本申请实施例中,耳机20可以包括扬声器以及反馈麦克风,当用户10佩戴该耳机20时,其反馈麦克风处于扬声器与用户之间。具体地,该耳机20可以通过其扬声器输出上述测试音频信号,其中,该测试音频信号可以在耳机20需要检测上述个性化因素的时候实时生成,也可以预先生成并存储在该耳机20中。示例性地,对于预先生成测试音频信号的情况,在耳机20出厂前,可以将指定的基础音频信号(如白噪声信号、音频数据信号等,音频数据信号可以包括音乐文件、录音文件、聊天语音等具有实际信息的音频数据对应的音频数据信号)与次声波信号混合,并将混合所得到的测试音频信号存储在耳机20的存储电路中,以在需要检测上述个性化因素的时候进行调用并输出。在此基础上,耳机20可以通过其反馈麦克风采集与上述测试音频信号对应的接收音频信号,并根据该接收音频信号确定与上述基础音频信号对应的第一均衡参数,该第一均衡参数可以用于对耳机20待输出的目标音频信号进行耳形自适应均衡。同时,根据该接收音频信号,耳机20还可以确定与上述次声波信号对应的第二均衡参数,该第二均衡参数可以用于对目标音频信号进行佩戴泄漏自适应均衡。
可见,上述方法能够基于用户10自身的耳形以及耳机佩戴状态等个性化因素,实现耳机20的个性化均衡功能,从而在对待输出的目标音频信号进行上述均衡之后,可以使得用户10收听到的目标音频信号尽可能还原其实际的初始音质(即尽可能还原该目标音频信号被录制或生成时的音色、音调等)。进一步地,上述方法还有助于该耳机20对该目标音频信号进行更准确的降噪处理,避免由于未经过均衡的目标音频信号在传播过程中出现变形、衰减等问题,导致耳机20误判目标音频信号的初始音质而进行了与用户10的实际需求不相匹配的降噪操作,从而有助于提升耳机20对音频信号进行主动降噪的有效性。
可选地,如图1B所示,耳机20还可以与终端设备30建立通信连接,从而当需要输出测试音频信号以 检测上述个性化因素对用户10的听音效果的影响时,用户10可以与终端设备30进行交互,以通过该终端设备30触发耳机20进行上述检测,确定出相应的均衡参数。在一些实施例中,终端设备30在检测到用户10针对其的测试交互操作(如点击或划动终端设备30上的测试按钮等触控操作、向终端设备30发出“测试”等包含指定关键字的语音操作、将终端设备30按照预设轨迹进行移动等移动操作)时,可以向耳机20发出相应的测试指令,以触发该耳机20输出测试音频信号。其中,该测试音频信号可以包括预先生成并存储在耳机20内或终端设备30上(需传输至耳机20进行输出)的测试音频信号,也可以包括将终端设备30所输出的基础音频信号与次声波信号实时混合所得到的测试音频信号。在另一些实施例中,终端设备30在检测到用户10控制其输出音频数据信号时,可以将相应的音频数据(如音乐文件、录音文件、聊天语音等)传输至该耳机20,则耳机20在播放对应的音频数据信号时,可以触发其自身将该音频数据信号作为基础音频信号,以与耳机20存储或生成的次声波信号进行混合,得到实时的测试音频信号并进行输出。
其中,上述终端设备30可以包括具备无线通信功能的各类设备或***,如手机、智能可穿戴设备、车载终端、平板电脑、PC(Personal Computer,个人电脑)、PDA(Personal Digital Assistant,个人数字助理)等,本申请实施例中不作具体限定。
请参阅图2,图2是本申请实施例公开的一种音频信号处理方法的流程示意图,该方法可以应用于上述的耳机,该耳机可以包括扬声器以及反馈麦克风。如图2所示,该音频信号处理方法可以包括以下步骤:
202、通过扬声器输出测试音频信号,其中,该测试音频信号由基础音频信号与次声波信号混合得到。
在本申请实施例中,为了确定耳机用户自身的耳形、佩戴耳机时的佩戴状态等个性化因素对用户自身听音效果的影响,可以采用由基础音频信号与次声波信号混合得到的测试音频信号来进行针对性的检测。
其中,上述基础音频信号可以包括白噪声信号、音频数据信号(如音乐文件、录音文件、聊天语音等具有实际信息的音频数据对应的音频数据信号)等,其能够覆盖较大的频率范围,尤其是人耳听音范围所包括的主要频段,从而可以用于检测该耳机所处的音频***(即耳机输出的音频信号在耳机与用户之间传输的通路)对上述频率范围内的测试音频信号的影响。具体地,由于不同用户的耳形个性化差异主要影响较高频率范围内(如1000Hz或以上频段)的音频信号传递过程,通过对上述测试音频信号中包含的基础音频信号进行检测,可以在后续步骤中针对该较高频率范围进行分析,以基于不同用户的耳形个性化差异实现相应的耳形自适应均衡。
其中,上述次声波信号可以包括特定次声频率(即小于20Hz)下的纯音信号,例如频率为10Hz、12Hz、15Hz等的次声波信号,其仅针对次声频率这一超低频率范围,从而可以用于检测该耳机所处的音频***对该超低频率范围内的测试音频信号的影响。在此基础上,由于用户不同的耳机佩戴状态所可能导致的低频泄漏主要影响较低频率范围(如1000Hz以下频段)的音频信号传递过程,通过对上述测试音频信号中包含的次声波信号进行检测,可以在后续步骤中针对该较低频率范围进行分析,以基于不同用户的耳机佩戴状态个性化差异实现相应的佩戴泄漏自适应均衡。
示例性地,请参阅图3,图3是本申请实施例公开的一种混合基础音频信号与次声波信号的流程示意图。如图3所示,在需要生成测试音频信号时,可以先将基础音频信号输入高通滤波器,通过该高通滤波器对基础音频信号进行滤波,然后再将滤波后的基础音频信号与次声波信号一同输入混合器进行混合。其中,该混合器可以用于直接将滤波后的基础音频信号与次声波信号相加,也可以用于对滤波后的基础音频信号与次声波信号调整增益后相加、调整时延后相加等,从而得到混合的测试音频信号。需要说明的是,上述高通滤波器的截止频率可以高于次声波信号对应的频率,从而有效降低基础音频信号对次声波信号的干扰,便于独立实现上述耳形自适应均衡以及佩戴泄漏自适应均衡。
可选地,上述混合基础音频信号与次声波信号的过程可以在耳机中进行,也可以在耳机外进行。一些实施例中,可以将基础音频信号和次声波信号预先分别存储在该耳机的存储电路中,在需要获取测试 音频信号的时候,耳机可以调用指定的基础音频信号和次声波信号,执行上述混合的过程以得到测试音频信号,并通过其内置的扬声器来输出该测试音频信号。另一些实施例中,也可以将指定的基础音频信号和次声波信号预先混合,并将混合得到的测试音频信号存储在该耳机的存储电路中,在需要输出测试音频信号的时候再进行调用以及输出。还有一些实施例中,基础音频信号可以存储在与该耳机连接的终端设备上,当终端设备通过该耳机输出基础音频信号时(如播放音乐文件、录音文件、聊天语音等),可以实时地将该基础音频信号与指定的次声波信号进行上述混合,得到混合后的测试音频信号并向用户输出。
示例性地,请一并参阅图4A及图4B。图4A是本申请实施例公开的一种测试音频信号的示意图,示出了当上述基础音频信号为白噪声信号的情况下,将该白噪声信号通过高通滤波器并与次声波信号(以频率为10Hz的纯音信号为例)混合所得到的测试音频信号。图4B是本申请实施例公开的另一种测试音频信号的示意图,示出了当上述基础音频信号为音频数据信号(以音乐文件对应的音频数据信号为例)的情况下,将该音频数据信号通过高通滤波器并与次声波信号(仍以频率为10Hz的纯音信号为例)混合所得到的测试音频信号。
204、通过反馈麦克风采集与测试音频信号对应的接收音频信号。
在本申请实施例中,耳机在输出上述测试音频信号之后,可以立即通过其内置的反馈麦克风采集与该测试音频信号对应的接收音频信号。该测试音频信号用于在耳机所处的音频***中进行传输,在被反馈麦克风所接收后,可以用于评估音频信号在该音频***的传输过程中所受到的影响,以在后续步骤中确定出相应的均衡参数。可以理解,由于反馈麦克风处于扬声器与用户之间,上述音频***也可以由音频信号在该扬声器以及反馈麦克风之间传输的通路来近似替代。
示例性地,耳机的反馈麦克风可以持续采集音频信号,从而可以根据扬声器输出上述测试音频信号的时间戳,获取反馈麦克风在该时间戳附近(如延后0.01毫秒、延后0.1毫秒等)的时刻所采集到的接收音频信号。在一些实施例中,耳机的反馈麦克风也可以不持续开启,而是在扬声器输出上述测试音频信号之后,由该扬声器触发开启,并将该反馈麦克风开启后采集到的音频信号作为与上述测试音频信号对应的接收音频信号。可选地,对于通过反馈麦克风采集到的接收音频信号,耳机还可以利用其内置的信号处理模块,将上述扬声器输出的测试音频信号与该接收音频信号进行波形对比,当对比结果表示该测试音频信号与该接收音频信号的波形相似度满足相似度阈值(如50%、80%等)时,可以将该接收音频信号确认为与上述测试音频信号对应的接收音频信号。
206、根据接收音频信号确定与上述基础音频信号对应的第一均衡参数,以及根据该接收音频信号确定与上述次声波信号对应的第二均衡参数,其中,第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡,第二均衡参数则用于对该目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
在本申请实施例中,耳机在采集到上述接收音频信号之后,可以根据该接收音频信号来分析其与上述测试音频信号的差异,以评估音频信号在耳机所处的音频***的传输过程中所受到的影响,进而可以确定出均衡该影响所需的均衡参数。具体地,由于上述测试音频信号由能够覆盖较大频率范围的基础音频信号以及仅针对次声频率这一超低频率范围的次声波信号混合得到,基于对应的接收音频信号,耳机可以分别计算与上述基础音频信号对应的第一均衡参数,以及与上述次声波信号对应的第二均衡参数。其中,第一均衡参数可以用于实现耳形自适应均衡,以针对不同用户的耳形个性化差异,来补偿较高频率范围内(如1000Hz或以上频段)的音频信号;第二均衡参数可以用于实现佩戴泄漏自适应均衡,以针对不同用户的耳机佩戴状态个性化差异,尤其是耳机佩戴方式不当、耳塞尺寸不合适等原因导致的音频信号中低频泄漏的不同情况,来补偿较低频率范围内(如1000Hz以下频段)的音频信号。通过分别实现上述耳形自适应均衡以及佩戴泄漏自适应均衡,可以针对耳机待输出的目标音频信号进行全面的补偿,以均衡其在耳机所处的音频***中传输所可能受到的影响,使得用户收听到的目标音频信号尽可能还原其实际的初始音质。
在一些实施例中,当需要对待输出的目标音频信号进行均衡时,可以根据上述均衡参数来配置相应 的均衡器。示例性地,上述滤波器可以由一个或多个滤波器组成。具体地,当需要对特定频率范围的音频信号进行均衡时,可以配置相应频带的带通滤波器或带阻滤波器进行均衡滤波;当需要对多个频段的音频信号进行较复杂的均衡时,也可以通过配置级联的FIR(Finite Impulse Response,有限长单位冲激响应)滤波器或IIR(Infinite Impulse Response,无限长单位冲激响应)滤波器来进行相应的均衡滤波。
可见,实施上述实施例所描述的音频信号处理方法,能够针对佩戴耳机的不同用户的耳形、耳机佩戴状态等个性化因素,实现相应的耳形自适应均衡以及佩戴泄漏自适应均衡。通过实现上述个性化均衡,能够使得用户收听到的目标音频信号尽可能还原其实际的初始音质,进而有助于对耳机待输出的目标音频信号进行更准确的降噪处理,避免由于未经过均衡的目标音频信号在传播过程中出现变形、衰减等问题,导致耳机误判目标音频信号的初始音质而进行了与用户的实际需求不相匹配的降噪操作,从而有利于提升耳机对音频信号进行主动降噪的有效性。
请参阅图5,图5是本申请实施例公开的另一种音频信号处理方法的流程示意图,该方法可以应用于上述的耳机,该耳机可以包括扬声器以及反馈麦克风。如图5所示,该音频信号处理方法可以包括以下步骤:
502、在耳机未进行音频数据播放的情况下,响应主动测试指令,获取与该主动测试指令对应的测试音频信号,其中,该测试音频信号是由白噪声信号与第一次声波信号混合得到的。
在本申请实施例中,耳机未进行音频数据播放时,可以由用户触发主动测试指令,或者由与该耳机连接的终端设备触发主动测试指令,以在该耳机未处于播放音乐文件、录音文件、聊天语音等的状态下主动检测用户自身的耳形、佩戴耳机时的佩戴状态等个性化因素对用户自身听音效果的影响。具体地,耳机在获取上述主动测试指令后,可以响应该主动测试指令,获取由白噪声信号与第一次声波信号混合得到的测试音频信号,以通过该测试音频信号进行上述检测。
其中,上述主动测试指令可以包括用户直接针对该耳机进行的检测触发操作(如指定的触控操作、语音操作、移动操作等),以使该耳机在检测到指定的检测触发操作时,可以视为获取相应的主动测试指令;也可以包括用户针对与该耳机通信连接的终端设备进行的检测触发操作(如指定的触控操作、按钮点击操作等),以使终端设备在检测到检测触发操作时,可以向上述耳机发出相应的主动测试指令。在此基础上,当耳机获取到主动测试指令之后,可以触发其内置的DSP(Digital Signal Process,数字信号处理)模块获取与该主动测试指令对应的测试音频信号,进而可以在后续步骤中通过与该DSP模块连接的扬声器输出该测试音频信号。
示例性地,上述与主动测试指令对应的测试音频信号,可以由该主动测试指令指定的白噪声信号与第一次声波信号混合得到。具体举例来说,可以先将白噪声信号输入高通滤波器(截止频率可为20Hz、30Hz、40Hz等)进行滤波,再将滤波后的白噪声信号与具备次声频率(如8Hz、10Hz、12Hz等)的第一次声波信号进行混合,以得到混合后的测试音频信号,从而可以有效降低白噪声信号对第一次声波信号的干扰,有利于针对两者分别进行独立的测试。
可以理解,上述混合白噪声信号与第一次声波信号的过程可以在耳机中实时进行,也可以在耳机外预先进行,并将混合得到的测试音频信号存储在与上述DSP模块连接的存储电路中。
504、通过扬声器输出测试音频信号。
506、通过反馈麦克风采集与测试音频信号对应的接收音频信号。
其中,步骤504以及步骤506与上述步骤202以及步骤204类似,此处不再赘述。
508、根据上述接收音频信号,确定与该接收音频信号对应的测试耳形传递函数。
在本申请实施例中,耳机在采集到上述接收音频信号之后,可以根据该接收音频信号评估其对应的测试音频信号在该耳机所处的音频***传输的过程中所受到的影响,从而推导出由用户耳形个性化差异决定的测试耳形传递函数,该测试耳形传递函数可以用于在后续步骤中计算用于实现耳形自适应均衡的第一均衡参数。
示例性地,耳机在根据上述接收音频信号推导其对应的测试耳形传递函数时,可以先对该接收音频信号进行傅里叶变换,再根据傅里叶变换后的接收音频信号确定其对应的测试耳形传递函数。具体地, 耳机内置的信号处理模块(如上述DSP模块等)可以先对接收音频信号进行分帧加窗处理,即,将宏观上不平稳的音频信号分割为具备短时平稳性的多个音频信号帧(如帧长为10~30毫秒的音频信号帧),再根据指定的窗函数对上述音频信号帧进行加窗截断,得到每一帧接收音频信号。示例性地,加窗截断可以通过如公式1所示的窗函数来实现:
公式1:
w(n)=1,0≤n≤N-1;
w(n)=0,其他
其中,分段函数w(n)为窗函数,N为单位窗口长度。通过将上述接收音频信号与该窗函数进行时域上的卷积,即可实现加窗截断的效果。
进一步地,对分帧加窗后得到的某一帧接收音频信号,可以通过FFT(FastFourierTransform,快速傅里叶变换)等算法进行短时傅里叶变换,其表达式可以如以下公式2所示:
公式2:
Figure PCTCN2022107699-appb-000001
其中,n为离散时间,连续频率ω=2πk/N,k=0,1,...,N-1,N为傅里叶变换长度,x(m)则为第m帧音频信号。需要说明的是,由于用户耳形个性化差异决定的测试耳形传递函数仅在较高频率范围内(如1000Hz或以上频段)差异明显,因此上述计算过程均可以仅针对该较高频率范围内的接收音频信号进行。
在此基础上,该耳机可以确定出与上述接收音频信号对应的测试耳形传递函数。示例性地,当采用如上述公式1所示的矩形窗函数时,测试耳形传递函数H(k)可以表示为:
公式3:
Figure PCTCN2022107699-appb-000002
其中,x(n)与上述X n(e )对应。
510、基于最小二乘准则,根据上述测试耳形传递函数以及目标耳形传递函数,计算得到与上述白噪声信号对应的第一均衡参数。
具体地,该耳机在确定出上述测试耳形传递函数之后,还可以获取相应的目标耳形传递函数。其中,该目标耳形传递函数可以包括耳机处于标准耳形治具(如IEC711等)中时所测得的耳形传递函数,即在消音室环境下将耳机置于气密性良好的标准耳形治具中,检测此时的耳形传递函数;也可以包括统计所得到的耳形传递函数,例如在消音室环境下获取大量用户正常佩戴耳机时的传递函数,并对其统计求均值,得到相应的目标耳形传递函数;又例如,若上述大量用户正常佩戴耳机时的传递函数以函数曲线的形式表示,则可以针对上述函数曲线求取均值曲线,并将该均值曲线对应的函数确定为目标耳形函数。
在此基础上,耳机可以基于最小二乘准则,根据上述测试耳形传递函数以及目标耳形传递函数,计算得到与上述白噪声信号对应的第一均衡参数。其中,该第一均衡参数可以包括用于配置相应的第一均衡器中所包含的滤波器的抽头系数、增益系数等。通过由该第一均衡参数配置得到的第一均衡器,可以在后续步骤中对耳机待输出的目标音频信号进行耳形自适应均衡。可选地,该第一均衡器可以包括由FIR(有限长单位冲激响应)滤波器组成的均衡器,从而可以采用正则化滤波器等,并基于上述最小二乘准 则以及通过正则化滤波器使均衡误差最小化的目标设计该第一均衡器,示例性地,该第一均衡器的响应M(k)在频域上的表达式可以如以下公式4所示:
公式4:
Figure PCTCN2022107699-appb-000003
其中,H(k)为上述测试耳形传递函数,D(k)为上述目标耳形传递函数,B(k)可以表示正则化滤波器响应的傅里叶变换,β则可以表示该正则化滤波器的加权标量。通过上述公式4计算得到的M(k)经过傅里叶逆变换后,既可用于配置相应的FIR滤波器。通过配置上述FIR均衡器,可以根据测试耳形传递函数与目标耳形传递函数之间的差异,使经过均衡后的耳形传递函数可以尽可能接近目标耳形传递函数。
示例性地,请一并参阅图6及图7,图6是本申请实施例公开的一种耳形传递函数对应的幅频响应示意图,图7则是根据图6所示的耳形传递函数确定的第一均衡参数所配置的第一均衡器的幅频响应示意图。如图6所示,虚线表示上述测试耳形传递函数的频率响应,实线则表示目标耳形传递函数的频率响应,两者在1000Hz或以上频段的较高频率范围内区别明显。通过采用如图7所示的第一均衡器,可以在上述较高频率范围内对音频信号进行均衡,以使经过均衡后的耳形传递函数(虚线)尽可能接近目标耳形传递函数(实线),从而实现耳形自适应均衡。
512、通过第一带通滤波器对上述接收音频信号进行滤波,得到第一低频接收信号。
在本申请实施例中,耳机在采集到上述接收音频信号之后,可以将该接收音频信号输入到第一带通滤波器中,以获取与上述第一次声波信号对应的第一低频接收信号。其中,该第一带通滤波器的通带可以包含上述第一次声波信号对应的频率,同时该通带可以相对较窄,从而可以仅滤出受用户耳机佩戴状态影响而导致不同程度佩戴泄漏的低频音频信号,减少上述基础音频信号(本实施例中为白噪声信号)带来的干扰。示例性地,以上述第一次声波信号对应的频率为10Hz为例,第一带通滤波器的中心频率可以同样为10Hz,其通带的带宽则可以为4Hz、6Hz、8Hz等,本申请实施例中不作具体限定。
基于上述第一低频接收信号,耳机可以在后续步骤中据此评估音频信号在耳机所处的音频***的传输过程中所发生的佩戴泄漏,该佩戴泄漏主要由耳机佩戴方式不当、耳塞尺寸不合适等原因导致,且集中于中低频段,故可以通过处于超低频率范围内的第一低频接收信号来实现评估,并在后续步骤中进一步计算用于实现佩戴泄漏自适应均衡的第二均衡参数。可以理解,针对用户耳机佩戴状态个性化差异(即佩戴泄漏个性化差异)所进行的佩戴泄漏自适应均衡可以仅针对较低频率范围(如1000Hz以下频段)内的音频信号进行。
514、计算第一低频接收信号的归一化信号能量;
在本申请实施例中,为了评估测试音频信号在耳机所处的音频***传输的过程中发生低频泄漏的程度,可以通过计算上述第一低频接收信号的信号能量,以在后续步骤中根据该信号能量确定出相应的低频泄漏情况,进而计算用于实现佩戴泄漏自适应均衡的第二均衡参数。可选地,为了更准确、更方便地评估低频泄漏程度,可以将计算出的上述信号能量与目标能量(即耳机处于标准耳形治具,如IEC711等,中的时候按照同样方法所测得的信号能量)相比,以得到归一化信号能量,便于在后续步骤中直接查表确定出其对应的低频泄漏程度。
示例性地,为了计算第一低频接收信号的信号能量,该耳机内置的处理器可以先按照单位窗口长度对第一低频接收信号进行加窗分割,得到至少一帧低频子信号。其中,对第一低频接收信号进行加窗分割所采用的窗函数可以包括矩形窗函数,也可以包括其他形态的窗函数,如三角窗函数、汉明窗函数等。优选地,为了减少加窗分割前后的计算量,可以仅采用矩形窗函数进行上述的加窗分割步骤。
在此基础上,该耳机内置的处理器可以分别计算每帧低频子信号的短时平均能量,并对计算得到的短时平均能量进行平滑处理,以得到平滑处理后的短时平均能量。示例性地,在对每帧低频子信号分别计算其短时平均能量时,可以采用如以下公式5所示的方式进行计算:
公式5:
Figure PCTCN2022107699-appb-000004
其中,E n表示第n帧(或n时刻的)低频子信号的短时平均能量,n为离散时间,w(n-m)为窗函数w(n)的时移表示,x(m)表示各帧低频子信号,N为单位窗口长度。进一步地,在得到各帧低频子信号的短时平均能量后,还可以采用如以下公式6所示的方式进行平滑处理:
公式6:
E n(m)=α·E n(m-1)+(1-α)·E n(m),0<α<1
其中,E n(m)为平滑后的音频信号能量,α则为进行上述指数平滑的系数。该耳机内置的处理器可以将上述平滑后的音频信号能量E n(m)与上述目标能量相比,得到两者的比值,并将该比值作为上述第一低频接收信号的归一化信号能量。示例性地,计算归一化信号能量的方式可以如公式7所示:
公式7:
Figure PCTCN2022107699-appb-000005
其中,Pnor为归一化信号能量,E ng则为上述目标能量。
516、根据该归一化信号能量确定泄漏程度,并根据泄漏程度计算得到与上述第一次声波信号对应的第二均衡参数。
在本申请实施例中,耳机可以预先按照不同的信号能量范围来划分不同的泄漏程度。示例性地,耳机可以按照统一的步长(如0.2单位的归一化信号能量、0.4单位的归一化信号能量等)来划分相应的泄漏程度,也可以按照其他分布方式来划分不同的泄漏程度。请参阅图8,图8是本申请实施例公开的一种不同泄漏程度下的***幅频响应示意图。如图8所示,若曲线A为用户正常佩戴耳机时(即未发生低频泄漏时)对应的频响,则曲线B、C、D、E可以分别表示不同泄漏程度下的频响,且按照泄漏严重程度从低到高可排序为B、C、D、E。需要说明的是,每个不同的泄漏程度均可以与相应的泄漏频响曲线相匹配,且每个泄漏程度匹配的泄漏频响曲线,可以是通过对耳机佩戴状态分别符合各个泄漏程度时的耳机进行检测(即检测频响)得到的。在此基础上,耳机可以根据上述泄漏程度,唯一确定出与该泄漏程度匹配的泄漏频响曲线,进而可以在后续步骤中获取与该泄漏频响曲线匹配的均衡频响曲线,并根据该均衡频响曲线,确定与上述次声波信号对应的第二均衡参数。
请一并参阅图9及图10,图9是根据图8所示的不同泄漏程度确定的第二均衡参数所配置的第二均衡器的幅频响应示意图,图10则是通过图9所示的第二均衡器进行均衡后的***幅频响应示意图。如图9所示,根据上述归一化信号能量所确定出的该耳机的不同低频泄漏程度,可以由该泄漏程度计算得到对应的第二均衡参数,以基于该第二均衡参数配置相应的第二均衡器,实现相应的佩戴泄漏自适应均衡。可以理解,当泄漏程度越严重时,其对应的第二均衡器针对1000Hz频段以下的较低频率范围内的音频信号的均衡补偿程度越高。示例性地,图9中频响曲线B对应的第二均衡器,可以用于对图8中频响曲线B对 应的泄漏程度下的耳机待输出的目标音频信号进行均衡补偿;图9中频响曲线E对应的第二均衡器,则可以用于对图8中频响曲线E对应的泄漏程度下的耳机待输出的目标音频信号进行均衡补偿。通过进行上述均衡补偿后,如图10所示,各种泄漏程度下的耳机的频响将趋于一致,尽可能接近未泄漏的状态。
可以理解,上述步骤512、步骤514以及步骤516,可以接在上述步骤506之后执行,从而该耳机可以独立、同时地实现上述耳形自适应均衡以及佩戴泄漏自适应均衡。
可见,实施上述实施例所描述的音频信号处理方法,能够针对佩戴耳机的不同用户的耳形、耳机佩戴状态等个性化因素,实现相应的耳形自适应均衡以及佩戴泄漏自适应均衡。通过实现上述个性化均衡,能够使得用户收听到的目标音频信号尽可能还原其实际的初始音质,进而有助于对耳机待输出的目标音频信号进行更准确的降噪处理,从而有利于提升耳机对音频信号进行主动降噪的有效性。此外,通过同时地实现上述耳形自适应均衡以及佩戴泄漏自适应均衡,还能够尽可能减少重复计算量,提升耳机进行均衡和降噪的效率。
请参阅图11,图11是本申请实施例公开的又一种音频信号处理方法的流程示意图,该方法可以应用于上述的耳机,该耳机具体可以包括扬声器、前馈麦克风以及反馈麦克风。如图11所示,该音频信号处理方法可以包括以下步骤:
1102、在耳机进行音频数据播放的情况下,将待播放的音频数据信号与第二次声波信号进行混合,得到测试音频信号。
在本申请实施例中,耳机已经在进行音频数据播放时(如播放音乐文件、录音文件、聊天语音等),可以在无需用户主动触发的情况,自动地检测用户自身的耳形、佩戴耳机时的佩戴状态等个性化因素对用户自身听音效果的影响。为实现上述检测,耳机可以将其待播放的音频数据信号与第二次声波信号进行混合,以得到相应的测试音频信号。
示例性地,可以先将音频数据信号输入高通滤波器(截止频率可为20Hz、30Hz、40Hz等)进行滤波,再将滤波后的音频数据信号与具备次声频率(如8Hz、10Hz、12Hz等)的第二次声波信号进行混合,以得到混合后的测试音频信号,从而可以有效降低音频数据信号对第二次声波信号的干扰,有利于针对两者分别进行独立的测试。
1104、每隔第一时长,控制扬声器输出上述测试音频信号,并在该扬声器输出上述测试音频信号持续第二时长后,控制该扬声器恢复输出上述音频数据信号,其中,第一时长大于第二时长。
在本申请实施例中,对上述音频数据信号与第二次声波信号的混合可以周期性地间断进行,即耳机可以先播放一定时长已混合的测试音频信号,再播放一定时长未经混合的音频数据信号,两者轮流进行。示例性地,该耳机可以每隔第一时长(如8秒、6秒等)地控制扬声器输出上述测试音频信号,在输出测试音频信号持续第二时长(如3秒、1秒等)后,再控制该扬声器恢复输出音频数据信号。其中,上述第一时长大于第二时长,从而每当持续输出了第二时长的测试音频信号后,耳机都会持续输出(第一时长-第二时长)的音频数据信号,以避免持续不间断地进行检测导致不必要的功耗浪费。可以理解的是,由于测试音频信号相对于音频数据信号仅是多混合了第二次声波信号,而人耳对次声频率的第二次声波信号无感觉,因此不会影响耳机的音频数据信号播放功能。
1106、通过反馈麦克风采集与测试音频信号对应的接收音频信号。
其中,步骤1106与上述步骤204类似,此处不再赘述。
1108、根据上述接收音频信号,确定与该接收音频信号对应的测试耳形传递函数。
1110、基于最小二乘准则,根据上述测试耳形传递函数以及目标耳形传递函数,计算得到与上述音频数据信号对应的第一均衡参数。
其中,步骤1108以及步骤1110与上述步骤508以及步骤510类似。需要说明的是,在本申请实施例中,白噪声信号被替换为了音频数据信号。
1112、通过前馈麦克风采集环境音。
示例性地,请参阅图12,图12是本申请实施例公开的一种耳机的结构示意图。如图12所示,该耳机除了包括扬声器121以及设置于该扬声器121前方的反馈麦克风122之外,还可以包括前馈麦克风123,该 前馈麦克风123可以设置于扬声器121后方(即当用户佩戴该耳机时,前馈麦克风处于扬声器与外界环境之间),以通过该前馈麦克风123采集外界的环境音。
作为一种可选的实施方式,耳机可以在输出上述测试音频信号之前,先通过其前馈麦克风采集环境音,进而可以根据所采集到的环境音判断是否适于进行上述测试步骤。示例性地,耳机在采集到环境音之后,可以通过第三带通滤波器对该环境音进行滤波,得到低频环境音信号。其中,第三带通滤波器的通带可以包含上述次声波信号对应的频率,从而可以针对性地获取环境音中可能对次声波信号造成干扰的低频环境音信号。进一步地,耳机还可以计算该低频环境音信号对应的噪声能量,并在该噪声能量低于噪声能量阈值(可设为0,表示要求完全无干扰噪声的测试环境)的情况下,执行上述通过所述扬声器输出测试音频信号的步骤。可选地,当耳机每隔第一时长才控制扬声器输出上述测试音频信号时,该耳机可以在未输出测试音频信号(即未混合次声波信号)的时刻采集环境音进行上述计算和判断,并在判断出超低频率的噪声能量低于噪声能量阈值的情况下,执行混合次声波信号,以输出测试音频信号的步骤,从而有效避免了超低频率的噪声对耳机进行佩戴泄漏均衡的干扰。
1114、根据环境音以及上述接收音频信号计算得到相关系数。
在本申请实施例中,通过采集环境音并计算其与接收音频信号之间的相关性,可以判断接收音频信号受环境音干扰的程度。当环境音对接收音频信号的干扰程度较大时,两者之间的相关性较高,此时耳机的佩戴泄漏程度也较高;当环境音对接收音频信号的干扰程度较小时,则两者之间的相关性较低,此时耳机的佩戴泄漏程度也较低。可以理解,若环境音对接收音频信号的干扰程度大于一定阈值,则会对耳机后续计算均衡参数造成较大的干扰,降低其进行音频信号均衡的准确性和可靠性。为此,耳机可以先计算环境音与上述接收音频信号之间的相关系数,其计算方式可以如以下公式8所示:
公式8:
Figure PCTCN2022107699-appb-000006
其中,E表示数学期望,s i和s j分别表示环境音以及接收音频信号。在后续步骤中,若两者之间的相关系数|P ij|大于相关阈值,则可以判断出环境音对接收音频信号的干扰程度较大,此时可以停止执行后续步骤;若不大于相关阈值,则可以判断出环境音对接收音频信号的干扰程度较小,此时可以继续执行后续计算第二均衡参数的步骤。可以理解,上述步骤1112和步骤1114可以不必接于步骤1110后执行,仅需在后续步骤1116之前执行即可。
可选地,在计算上述相关系数|P ij|时,也可以采用未经输出的测试音频信号中包含的次声波信号作为s j,以直接计算环境音s i与次声波信号s j之间的相关系数,从而可以直接确定两者之间的相关性,有助于判断耳机的佩戴泄漏程度。
1116、若该相关系数不大于相关阈值,则通过第一带通滤波器对上述接收音频信号进行滤波,得到第一低频接收信号。
1118、计算第一低频接收信号的归一化信号能量。
1120、根据该归一化信号能量确定泄漏程度,并根据泄漏程度计算得到与上述第二次声波信号对应的第二均衡参数。
其中,步骤1116、步骤1118以及步骤1120与上述步骤512、步骤514以及步骤516类似。需要说明的是,在本申请实施例中,第一次声波信号被替换为了第二次声波信号,该第一次声波信号和第二次声波信号可以相同,也可以不同。
1122、根据第一均衡参数配置第一均衡器,以及根据第二均衡参数配置第二均衡器,其中,第一均 衡器用于对待输出的目标音频信号中高于或等于目标频率阈值的频段进行耳形自适应均衡,第二均衡器用于对该目标音频信号中低于目标频率阈值的频段进行佩戴泄漏自适应均衡。
可选地,上述第一均衡器可以包括由有限长单位冲激响应FIR滤波器组成的均衡器,第二均衡器则可以包括由无限长单位冲激响应IIR滤波器组成的均衡器。
可见,实施上述实施例所描述的音频信号处理方法,能够针对佩戴耳机的不同用户的耳形、耳机佩戴状态等个性化因素,实现相应的耳形自适应均衡以及佩戴泄漏自适应均衡。通过实现上述个性化均衡,能够使得用户收听到的目标音频信号尽可能还原其实际的初始音质,进而有助于对耳机待输出的目标音频信号进行更准确的降噪处理,从而有利于提升耳机对音频信号进行主动降噪的有效性。此外,通过配置相应的补偿滤波器,可以对耳机待输出的目标音频信号进行针对性的补偿,进一步提高了根据用户偏好进行音频信号补偿的准确性和有效性。
请参阅图13,图13是本申请实施例公开的第四种音频信号处理方法的流程示意图,该方法可以应用于上述的耳机。如图13所示,该音频信号处理方法可以包括以下步骤:
1302、通过扬声器输出测试音频信号,其中,该测试音频信号包括白噪声信号和音频数据信号中的任一种;
1304、通过反馈麦克风采集与测试音频信号对应的接收音频信号;
1306、根据该接收音频信号,确定与该接收音频信号对应的测试耳形传递函数;
1308、基于最小二乘准则,根据上述测试耳形传递函数以及目标耳形传递函数,计算得到与上述测试音频信号对应的第一均衡参数,该第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡。
其中,步骤1302~步骤1308在上述实施例中均有类似说明。需要特别说明的是,本申请实施例中的测试音频信号采用白噪声信号和音频数据信号中的任一种,从而使得耳机可以针对不同用户单独提供个性化的耳形自适应均衡。
一些实施例中,耳机在通过其扬声器输出测试音频信号时,还可以先判断该耳机是否处于佩戴状态,并在判断出该耳机处于佩戴状态的情况下,才响应用户向该耳机或与该耳机连接的设备发出的主动测试指令,通过其扬声器输出上述测试音频信号。
进一步地,在计算得到与上述测试音频信号对应的第一均衡参数之后,该耳机可以根据该第一均衡参数配置第一均衡器,以用于对待输出的目标音频信号中高于或等于目标频率阈值(如1000Hz)的频段进行耳形自适应均衡。
请参阅图14,图14是本申请实施例公开的第五种音频信号处理方法的流程示意图,该方法可以应用于上述的耳机。如图14所示,该音频信号处理方法可以包括以下步骤:
1402、通过扬声器输出测试音频信号,其中,该测试音频信号包括次声波信号;
1404、通过反馈麦克风采集与该测试音频信号对应的接收音频信号;
1406、计算该接收音频信号的信号能量,并根据该信号能量确定与上述次声波信号对应的第二均衡参数,该第二均衡参数用于对待输出的目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
其中,步骤1402~步骤1406在上述实施例中均有类似说明。需要特别说明的是,本申请实施例中的测试音频信号只采用次声波信号,从而使得耳机可以针对不同用户单独提供个性化的佩戴泄漏自适应均衡。
一些实施例中,耳机在计算上述第二均衡参数时,具体可以通过第一带通滤波器对上述接收音频信号进行滤波,以得到第一低频接收信号,进而可以计算该第一低频接收信号的归一化信号能量,并根据该归一化信号能量确定出泄漏程度,根据该泄漏程度计算得到与上述次声波信号对应的第二均衡参数。
另一些实施例中,该耳机还可以预先采集当前所处环境的环境音,以根据所采集到的环境音判断是否适于进行上述测试步骤。示例性地,耳机在通过其前馈麦克风采集到环境音之后,可以根据该环境音以及上述接收音频信号计算得到相关系数,并在该相关系数不大于相关阈值时,才执行上述通过第一带通滤波器对接收音频信号进行滤波,以得到第一低频接收信号的步骤,从而可以避免对耳机后续计算均 衡参数造成较大的干扰,进而避免降低其进行音频信号均衡的准确性和可靠性。
又示例性地,耳机在通过其前馈麦克风采集到环境音之后,还可以通过第三带通滤波器对该环境音进行滤波,得到低频环境音信号。其中,第三带通滤波器的通带可以包含上述次声波信号对应的频率,从而可以针对性地获取环境音中可能对次声波信号造成干扰的低频环境音信号。进一步地,耳机还可以计算该低频环境音信号对应的噪声能量,并在该噪声能量低于噪声能量阈值(可设为0,表示要求完全无干扰噪声的测试环境)的情况下,执行上述通过所述扬声器输出测试音频信号的步骤。可选地,当耳机每隔第一时长才控制扬声器输出上述测试音频信号时,该耳机可以在未输出测试音频信号(即未混合次声波信号)的时刻采集环境音进行上述计算和判断,并在判断出超低频率的噪声能量低于噪声能量阈值的情况下,执行混合次声波信号,以输出测试音频信号的步骤,从而有效避免了超低频率的噪声对耳机进行佩戴泄漏均衡的干扰。
进一步地,在计算得到与上述测试音频信号对应的第二均衡参数之后,该耳机可以根据该第二均衡参数配置第二均衡器,以用于对待输出的目标音频信号中低于目标频率阈值(如1000Hz)的频段进行佩戴泄漏自适应均衡。
请参阅图15,图15是本申请实施例公开的一种音频信号处理装置的模块化示意图,该音频信号处理装置可以应用于上述的耳机,该耳机可以包括扬声器、反馈麦克风以及前馈麦克风。如图15所示,该音频信号处理装置可以包括第一输出单元1501、第一接收单元1502以及第一参数计算单元1503,其中:
第一输出单元1501,用于通过扬声器输出测试音频信号,其中,测试音频信号由基础音频信号与次声波信号混合得到;
第一接收单元1502,用于通过反馈麦克风采集与测试音频信号对应的接收音频信号;
第一参数计算单元1503,用于根据接收音频信号确定与基础音频信号对应的第一均衡参数,以及根据接收音频信号确定与次声波信号对应的第二均衡参数,其中,第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡,第二均衡参数用于对目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
可见,采用上述实施例所描述的音频信号处理装置,能够针对佩戴耳机的不同用户的耳形、耳机佩戴状态等个性化因素,实现相应的耳形自适应均衡以及佩戴泄漏自适应均衡。通过实现上述个性化均衡,能够使得用户收听到的目标音频信号尽可能还原其实际的初始音质,进而有助于对耳机待输出的目标音频信号进行更准确的降噪处理,避免由于未经过均衡的目标音频信号在传播过程中出现变形、衰减等问题,导致耳机误判目标音频信号的初始音质而进行了与用户的实际需求不相匹配的降噪操作,从而有利于提升耳机对音频信号进行主动降噪的有效性。
在一种实施例中,上述测试音频信号是通过高通滤波器滤波后的基础音频信号与次声波信号混合得到的,该高通滤波器的截止频率高于次声波信号对应的频率。
在一种实施例中,上述音频信号处理装置还可以包括未图示的获取单元,该获取单元用于在第一输出单元1501通过扬声器输出测试音频信号之前,在耳机未进行音频数据播放的情况下,响应主动测试指令,获取与主动测试指令对应的测试音频信号,其中,测试音频信号是由白噪声信号与第一次声波信号混合得到的。
在一种实施例中,上述音频信号处理装置还可以包括未图示的混合单元,该混合单元用于在第一输出单元1501通过扬声器输出测试音频信号之前,在耳机进行音频数据播放的情况下,将待播放的音频数据信号与第二次声波信号进行混合,得到测试音频信号;
上述第一输出单元1501,具体可以用于在耳机进行音频数据播放的情况下,每隔第一时长,控制扬声器输出测试音频信号,并在扬声器输出测试音频信号持续第二时长后,控制扬声器恢复输出音频数据信号,其中,第一时长大于第二时长。
在一种实施例中,上述第一参数计算单元1503可以包括未图示的第一计算子单元以及第二计算子单元,其中:
第一计算子单元,用于根据接收音频信号,确定与接收音频信号对应的测试耳形传递函数;基于最 小二乘准则,根据测试耳形传递函数以及目标耳形传递函数,计算得到与基础音频信号对应的第一均衡参数。
第二计算子单元,用于通过第一带通滤波器对接收音频信号进行滤波,得到第一低频接收信号;计算第一低频接收信号的归一化信号能量;根据归一化信号能量确定泄漏程度,并根据泄漏程度计算得到与次声波信号对应的第二均衡参数。
其中,第二计算子单元在计算第一低频接收信号的归一化能量时,具体可以包括:
按照单位窗口长度对第一低频接收信号进行加窗分割,得到至少一帧低频子信号;
分别计算每帧低频子信号的短时平均能量;
对每帧低频子信号的短时平均能量进行平滑处理,并计算平滑处理后的短时平均能量与目标能量的比值,作为第一低频接收信号的归一化信号能量。
在一种实施例中,第二计算子单元在根据泄漏程度计算得到与次声波信号对应的第二均衡参数时,具体可以包括:
根据泄漏程度,确定与泄漏程度匹配的泄漏频响曲线,其中,每个泄漏程度匹配的泄漏频响曲线,是通过对耳机佩戴状态分别符合各个泄漏程度时的耳机进行检测得到的;
获取与泄漏频响曲线匹配的均衡频响曲线,并根据均衡频响曲线,确定与次声波信号对应的第二均衡参数。
在一种实施例中,第二计算子单元在通过第一带通滤波器对接收音频信号进行滤波,得到第一低频接收信号之前,还可以通过前馈麦克风采集环境音;根据环境音以及接收音频信号计算得到相关系数;其通过第一带通滤波器对接收音频信号进行滤波,得到第一低频接收信号的步骤具体可以包括:
若相关系数不大于相关阈值,则执行通过第一带通滤波器对接收音频信号进行滤波,得到第一低频接收信号的步骤。
进一步地,第二计算子单元在计算上述相关系数时,具体可以包括:
通过第一低通滤波器对环境音进行滤波,得到低频环境音信号;
通过第二带通滤波器对接收音频信号进行滤波,得到第二低频接收信号;
计算低频环境音信号与第二低频接收信号的相关系数,作为环境音以及接收音频信号之间的相关系数。
可见,采用上述实施例所描述的音频信号处理装置,通过同时地实现上述耳形自适应均衡以及佩戴泄漏自适应均衡,还能够尽可能减少重复计算量,提升耳机进行均衡和降噪的效率。
在一种实施例中,上述音频信号处理装置还可以包括未图示的配置单元,该配置单元具体可以用于在上述第一参数计算单元1503根据接收音频信号确定与基础音频信号对应的第一均衡参数,以及与次声波信号对应的第二均衡参数之后,根据第一均衡参数配置第一均衡器,以及根据第二均衡参数配置第二均衡器,其中,第一均衡器用于对目标音频信号中高于目标频率阈值的频段进行耳形自适应均衡,第二均衡器用于对目标音频信号中低于目标频率阈值的频段进行佩戴泄漏自适应均衡。
其中,第一均衡器包括由有限长单位冲激响应FIR滤波器组成的均衡器。
其中,第二均衡器包括由无限长单位冲激响应IIR滤波器组成的均衡器。
在一种实施例中,第二计算子单元在通过前馈麦克风采集到环境音之后,还可以通过第三带通滤波器对环境音进行滤波,得到低频环境音信号;计算低频环境音信号对应的噪声能量;在噪声能量低于噪声能量阈值的情况下,执行通过扬声器输出测试音频信号的步骤。
可见,采用上述实施例所描述的音频信号处理装置,能够针对佩戴耳机的不同用户的耳形、耳机佩戴状态等个性化因素,实现相应的耳形自适应均衡以及佩戴泄漏自适应均衡。通过实现上述个性化均衡,能够使得用户收听到的目标音频信号尽可能还原其实际的初始音质,进而有助于对耳机待输出的目标音频信号进行更准确的降噪处理,从而有利于提升耳机对音频信号进行主动降噪的有效性。此外,通过配置相应的补偿滤波器,可以对耳机待输出的目标音频信号进行针对性的补偿,进一步提高了根据用户偏好进行音频信号补偿的准确性和有效性。
请参阅图16,图16是本申请实施例公开的另一种音频信号处理装置的模块化示意图,该音频信号处理装置可以应用于上述的耳机,该耳机可以包括扬声器、反馈麦克风以及前馈麦克风。如图16所示,该音频信号处理装置可以包括第二输出单元1601、第二接收单元1602、函数确定单元1603以及第二参数计算单元1604,其中:
第二输出单元1601,用于通过扬声器输出测试音频信号,其中,测试音频信号包括白噪声信号和音频数据信号中的任一种;
第二接收单元1602,用于通过反馈麦克风采集与测试音频信号对应的接收音频信号;
函数确定单元1603,用于根据接收音频信号,确定与接收音频信号对应的测试耳形传递函数;
第二参数计算单元1604,用于基于最小二乘准则,根据测试耳形传递函数以及目标耳形传递函数,计算得到与测试音频信号对应的第一均衡参数,第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡。
采用上述实施例所描述的音频信号处理装置,测试音频信号采用白噪声信号和音频数据信号中的任一种,从而使得耳机可以针对不同用户单独提供个性化的耳形自适应均衡。
请参阅图17,图17是本申请实施例公开的又一种音频信号处理装置的模块化示意图,该音频信号处理装置可以应用于上述的耳机,该耳机可以包括扬声器、反馈麦克风以及前馈麦克风。如图17所示,该音频信号处理装置可以包括第三输出单元1701、第三接收单元1702以及第三参数计算单元1703,其中:
第三输出单元1701,用于通过扬声器输出测试音频信号,其中,测试音频信号包括次声波信号;
第三接收单元1702,用于通过反馈麦克风采集与测试音频信号对应的接收音频信号;
第三参数计算单元1703,用于计算接收音频信号的信号能量,并根据信号能量确定与次声波信号对应的第二均衡参数,第二均衡参数用于对待输出的目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
采用上述实施例所描述的音频信号处理装置,测试音频信号只采用次声波信号,从而使得耳机可以针对不同用户单独提供个性化的佩戴泄漏自适应均衡。
请参阅图18,图18是本申请实施例公开的一种耳机的模块化示意图。如图18所示,该耳机可以包括:
存储有可执行程序代码的存储器1801;
与存储器1801耦合的处理器1802;
其中,处理器1802调用存储器1801中存储的可执行程序代码,可以执行上述实施例所描述的任意一种音频信号处理方法中的全部或部分步骤。
此外,本申请实施例进一步公开了一种计算机可读存储介质,其存储用于电子数据交换的计算机程序,其中,该计算机程序使得计算机可以执行上述实施例所描述的任意一种音频信号处理方法中的全部或部分步骤。
此外,本申请实施例进一步公开一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机可以执行上述实施例所描述的任意一种音频信号处理方法中的全部或部分步骤。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质包括只读存储器(Read-Only Memory,ROM)、随机存储器(Random Access Memory,RAM)、可编程只读存储器(Programmable Read-only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、一次可编程只读存储器(One-time Programmable Read-Only Memory,OTPROM)、电子抹除式可复写只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储器、磁盘存储器、磁带存储器、或者能够用于携带或存储数据的计算机可读的任何其他介质。
以上对本申请实施例公开的一种音频信号处理方法及装置、耳机、存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (46)

  1. 一种音频信号处理方法,其特征在于,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述方法包括:
    通过所述扬声器输出测试音频信号,其中,所述测试音频信号由基础音频信号与次声波信号混合得到;
    通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
    根据所述接收音频信号确定与所述基础音频信号对应的第一均衡参数,以及根据所述接收音频信号确定与所述次声波信号对应的第二均衡参数,其中,所述第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡,所述第二均衡参数用于对所述目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
  2. 根据权利要求1所述的方法,其特征在于,所述测试音频信号是通过高通滤波器滤波后的基础音频信号与次声波信号混合得到的,所述高通滤波器的截止频率高于所述次声波信号对应的频率。
  3. 根据权利要求1所述的方法,其特征在于,在所述通过所述扬声器输出测试音频信号之前,所述方法还包括:
    在所述耳机未进行音频数据播放的情况下,响应主动测试指令,获取与所述主动测试指令对应的测试音频信号,其中,所述测试音频信号是由白噪声信号与第一次声波信号混合得到的。
  4. 根据权利要求1所述的方法,其特征在于,在所述通过所述扬声器输出测试音频信号之前,所述方法还包括:
    在所述耳机进行音频数据播放的情况下,将待播放的音频数据信号与第二次声波信号进行混合,得到测试音频信号。
  5. 根据权利要求4所述的方法,其特征在于,所述通过所述扬声器输出测试音频信号,包括:
    在所述耳机进行音频数据播放的情况下,每隔第一时长,控制所述扬声器输出所述测试音频信号,并在所述扬声器输出所述测试音频信号持续第二时长后,控制所述扬声器恢复输出所述音频数据信号,其中,所述第一时长大于所述第二时长。
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述根据所述接收音频信号确定与所述基础音频信号对应的第一均衡参数,包括:
    根据所述接收音频信号,确定与所述接收音频信号对应的测试耳形传递函数;
    基于最小二乘准则,根据所述测试耳形传递函数以及目标耳形传递函数,计算得到与所述基础音频信号对应的第一均衡参数。
  7. 根据权利要求1至5任一项所述的方法,其特征在于,所述根据所述接收音频信号确定与所述次声波信号对应的第二均衡参数,包括:
    通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号;
    计算所述第一低频接收信号的归一化信号能量;
    根据所述归一化信号能量确定泄漏程度,并根据所述泄漏程度计算得到与所述次声波信号对应的第二均衡参数。
  8. 根据权利要求7所述的方法,其特征在于,所述计算所述第一低频接收信号的归一化信号能量,包括:
    按照单位窗口长度对所述第一低频接收信号进行加窗分割,得到至少一帧低频子信号;
    分别计算每帧低频子信号的短时平均能量;
    对所述每帧低频子信号的短时平均能量进行平滑处理,并计算平滑处理后的短时平均能量与目标能量的比值,将所述比值作为所述第一低频接收信号的归一化信号能量。
  9. 根据权利要求7所述的方法,其特征在于,所述根据所述泄漏程度计算得到与所述次声波信号对应的第二均衡参数,包括:
    根据所述泄漏程度,确定与所述泄漏程度匹配的泄漏频响曲线,其中,每个泄漏程度匹配的泄漏频响曲线,是通过对耳机佩戴状态分别符合各个泄漏程度时的耳机进行检测得到的;
    获取与所述泄漏频响曲线匹配的均衡频响曲线,并根据所述均衡频响曲线,确定与所述次声波信号对应的第二均衡参数。
  10. 根据权利要求7所述的方法,其特征在于,所述耳机还包括前馈麦克风,在所述通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号之前,所述方法还包括:
    通过所述前馈麦克风采集环境音;
    根据所述环境音以及所述接收音频信号计算得到相关系数;
    所述通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号,包括:
    若所述相关系数不大于相关阈值,则执行所述通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号的步骤。
  11. 根据权利要求10所述的方法,其特征在于,所述根据所述环境音以及所述接收音频信号计算得到相关系数,包括:
    通过第一低通滤波器对所述环境音进行滤波,得到低频环境音信号;
    通过第二带通滤波器对所述接收音频信号进行滤波,得到第二低频接收信号;
    计算所述低频环境音信号与所述第二低频接收信号的相关系数,作为所述环境音以及所述接收音频信号之间的相关系数。
  12. 根据权利要求10所述的方法,其特征在于,在所述通过所述前馈麦克风采集环境音之后,所述方法还包括:
    通过第三带通滤波器对所述环境音进行滤波,得到低频环境音信号;
    计算所述低频环境音信号对应的噪声能量;
    在所述噪声能量低于噪声能量阈值的情况下,执行所述通过所述扬声器输出测试音频信号的步骤。
  13. 根据权利要求1至5任一项所述的方法,其特征在于,在所述根据所述接收音频信号确定与所述基础音频信号对应的第一均衡参数,以及根据所述接收音频信号确定与所述次声波信号对应的第二均衡参数之后,所述方法还包括:
    根据所述第一均衡参数配置第一均衡器,以及根据所述第二均衡参数配置第二均衡器,其中,所述第一均衡器用于对所述目标音频信号中高于或等于目标频率阈值的频段进行所述耳形自适应均衡,所述第二均衡器用于对所述目标音频信号中低于所述目标频率阈值的频段进行所述佩戴泄漏自适应均衡。
  14. 根据权利要求13所述的方法,其特征在于,所述第一均衡器包括由有限长单位冲激响应FIR滤波器组成的均衡器;
    所述第二均衡器包括由无限长单位冲激响应IIR滤波器组成的均衡器。
  15. 一种音频信号处理方法,其特征在于,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述方法包括:
    通过所述扬声器输出测试音频信号,其中,所述测试音频信号包括白噪声信号和音频数据信号中的任一种;
    通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
    根据所述接收音频信号,确定与所述接收音频信号对应的测试耳形传递函数;
    基于最小二乘准则,根据所述测试耳形传递函数以及目标耳形传递函数,计算得到与所述测试音频信号对应的第一均衡参数,所述第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡。
  16. 根据权利要求15所述的方法,其特征在于,在所述基于最小二乘准则,根据所述测试耳形传递函数以及目标耳形传递函数,计算得到与所述测试音频信号对应的第一均衡参数之后,所述方法还包括:
    根据所述第一均衡参数配置第一均衡器,所述第一均衡器用于对所述目标音频信号中高于或等于目标频率阈值的频段进行所述耳形自适应均衡。
  17. 根据权利要求15或16所述的方法,其特征在于,所述通过所述扬声器输出测试音频信号,包括:
    在所述耳机处于佩戴状态的情况下,响应主动测试指令,通过所述扬声器输出测试音频信号。
  18. 一种音频信号处理方法,其特征在于,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述方法包括:
    通过所述扬声器输出测试音频信号,其中,所述测试音频信号包括次声波信号;
    通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
    计算所述接收音频信号的信号能量,并根据所述信号能量确定与所述次声波信号对应的第二均衡参数,所述第二均衡参数用于对待输出的目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
  19. 根据权利要求18所述的方法,其特征在于,所述计算所述接收音频信号的信号能量,并根据所述信号能量确定与所述次声波信号对应的第二均衡参数,包括:
    通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号;
    计算所述第一低频接收信号的归一化信号能量;
    根据所述归一化信号能量确定泄漏程度,并根据所述泄漏程度计算得到与所述次声波信号对应的第 二均衡参数。
  20. 根据权利要求18或19所述的方法,其特征在于,所述耳机还包括前馈麦克风,在所述通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号之前,所述方法还包括:
    通过所述前馈麦克风采集环境音;
    根据所述环境音以及所述接收音频信号计算得到相关系数;
    所述通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号,包括:
    若所述相关系数不大于相关阈值,则执行所述通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号的步骤。
  21. 根据权利要求20所述的方法,其特征在于,在所述通过所述前馈麦克风采集环境音之后,所述方法还包括:
    通过第三带通滤波器对所述环境音进行滤波,得到低频环境音信号;
    计算所述低频环境音信号对应的噪声能量;
    在所述噪声能量低于噪声能量阈值的情况下,执行所述通过所述扬声器输出测试音频信号的步骤。
  22. 根据权利要求18或19所述的方法,其特征在于,在所述计算所述接收音频信号的信号能量,并根据所述信号能量确定与所述次声波信号对应的第二均衡参数之后,所述方法还包括:
    根据所述第二均衡参数配置第二均衡器,所述第二均衡器用于对所述目标音频信号中低于目标频率阈值的频段进行所述佩戴泄漏自适应均衡。
  23. 一种音频信号处理装置,其特征在于,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述音频信号处理装置包括:
    第一输出单元,用于通过所述扬声器输出测试音频信号,其中,所述测试音频信号由基础音频信号与次声波信号混合得到;
    第一接收单元,用于通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
    第一参数计算单元,用于根据所述接收音频信号确定与所述基础音频信号对应的第一均衡参数,以及根据所述接收音频信号确定与所述次声波信号对应的第二均衡参数,其中,所述第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡,所述第二均衡参数用于对所述目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
  24. 根据权利要求23所述的音频信号处理装置,其特征在于,所述测试音频信号是通过高通滤波器滤波后的基础音频信号与次声波信号混合得到的,所述高通滤波器的截止频率高于所述次声波信号对应的频率。
  25. 根据权利要求23所述的音频信号处理装置,其特征在于,所述音频信号处理装置还包括:
    获取单元,用于在所述第一输出单元通过所述扬声器输出测试音频信号之前,在所述耳机未进行音频数据播放的情况下,响应主动测试指令,获取与所述主动测试指令对应的测试音频信号,其中,所述测试音频信号是由白噪声信号与第一次声波信号混合得到的。
  26. 根据权利要求23所述的音频信号处理装置,其特征在于,所述音频信号处理装置还包括:
    混合单元,用于在所述第一输出单元通过所述扬声器输出测试音频信号之前,在所述耳机进行音频数据播放的情况下,将待播放的音频数据信号与第二次声波信号进行混合,得到测试音频信号。
  27. 根据权利要求26所述的音频信号处理装置,其特征在于,所述第一输出单元在用于通过所述扬声器输出测试音频信号时,包括:
    在所述耳机进行音频数据播放的情况下,每隔第一时长,控制所述扬声器输出所述测试音频信号,并在所述扬声器输出所述测试音频信号持续第二时长后,控制所述扬声器恢复输出所述音频数据信号,其中,所述第一时长大于所述第二时长。
  28. 根据权利要求23至27任一项所述的音频信号处理装置,其特征在于,所述第一参数计算单元在用于根据所述接收音频信号确定与所述基础音频信号对应的第一均衡参数时,包括:
    根据所述接收音频信号,确定与所述接收音频信号对应的测试耳形传递函数;
    基于最小二乘准则,根据所述测试耳形传递函数以及目标耳形传递函数,计算得到与所述基础音频信号对应的第一均衡参数。
  29. 根据权利要求23至27任一项所述的音频信号处理装置,其特征在于,所述第一参数计算单元在用于根据所述接收音频信号确定与所述次声波信号对应的第二均衡参数时,包括:
    通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号;
    计算所述第一低频接收信号的归一化信号能量;
    根据所述归一化信号能量确定泄漏程度,并根据所述泄漏程度计算得到与所述次声波信号对应的第 二均衡参数。
  30. 根据权利要求29所述的音频信号处理装置,其特征在于,所述第一参数计算单元在用于计算所述第一低频接收信号的归一化信号能量时,包括:
    按照单位窗口长度对所述第一低频接收信号进行加窗分割,得到至少一帧低频子信号;
    分别计算每帧低频子信号的短时平均能量;
    对所述每帧低频子信号的短时平均能量进行平滑处理,并计算平滑处理后的短时平均能量与目标能量的比值,将所述比值作为所述第一低频接收信号的归一化信号能量。
  31. 根据权利要求29所述的音频信号处理装置,其特征在于,所述第一参数计算单元在用于根据所述泄漏程度计算得到与所述次声波信号对应的第二均衡参数时,包括:
    根据所述泄漏程度,确定与所述泄漏程度匹配的泄漏频响曲线,其中,每个泄漏程度匹配的泄漏频响曲线,是通过对耳机佩戴状态分别符合各个泄漏程度时的耳机进行检测得到的;
    获取与所述泄漏频响曲线匹配的均衡频响曲线,并根据所述均衡频响曲线,确定与所述次声波信号对应的第二均衡参数。
  32. 根据权利要求29所述的音频信号处理装置,其特征在于,所述耳机还包括前馈麦克风,所述第一参数计算单元,在用于通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号之前,还用于通过所述前馈麦克风采集环境音;以及,根据所述环境音以及所述接收音频信号计算得到相关系数;
    所述第一参数计算单元在用于通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号时,包括:
    若所述相关系数不大于相关阈值,则执行所述通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号的步骤。
  33. 根据权利要求32所述的音频信号处理装置,其特征在于,所述第一参数计算单元在用于根据所述环境音以及所述接收音频信号计算得到相关系数时,包括:
    通过第一低通滤波器对所述环境音进行滤波,得到低频环境音信号;
    通过第二带通滤波器对所述接收音频信号进行滤波,得到第二低频接收信号;
    计算所述低频环境音信号与所述第二低频接收信号的相关系数,作为所述环境音以及所述接收音频信号之间的相关系数。
  34. 根据权利要求32所述的音频信号处理装置,其特征在于,所述第一参数计算单元在用于通过所述前馈麦克风采集环境音之后,还用于通过第三带通滤波器对所述环境音进行滤波,得到低频环境音信号;以及,计算所述低频环境音信号对应的噪声能量;以及,在所述噪声能量低于噪声能量阈值的情况下,触发所述第一输出单元执行所述通过所述扬声器输出测试音频信号的步骤。
  35. 根据权利要求23至27任一项所述的音频信号处理装置,其特征在于,所述音频信号处理装置还包括:
    配置单元,用于在所述第一参数计算单元根据所述接收音频信号确定与所述基础音频信号对应的第一均衡参数,以及根据所述接收音频信号确定与所述次声波信号对应的第二均衡参数之后,根据所述第一均衡参数配置第一均衡器,以及根据所述第二均衡参数配置第二均衡器,其中,所述第一均衡器用于对所述目标音频信号中高于或等于目标频率阈值的频段进行所述耳形自适应均衡,所述第二均衡器用于对所述目标音频信号中低于所述目标频率阈值的频段进行所述佩戴泄漏自适应均衡。
  36. 根据权利要求35所述的音频信号处理装置,其特征在于,所述第一均衡器包括由有限长单位冲激响应FIR滤波器组成的均衡器;
    所述第二均衡器包括由无限长单位冲激响应IIR滤波器组成的均衡器。
  37. 一种音频信号处理装置,其特征在于,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述音频信号处理装置包括:
    第二输出单元,用于通过所述扬声器输出测试音频信号,其中,所述测试音频信号包括白噪声信号和音频数据信号中的任一种;
    第二接收单元,用于通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
    函数确定单元,用于根据所述接收音频信号,确定与所述接收音频信号对应的测试耳形传递函数;
    第二参数计算单元,用于基于最小二乘准则,根据所述测试耳形传递函数以及目标耳形传递函数,计算得到与所述测试音频信号对应的第一均衡参数,所述第一均衡参数用于对待输出的目标音频信号进行与用户耳形匹配的耳形自适应均衡。
  38. 根据权利要求37所述的音频信号处理装置,其特征在于,所述音频信号处理装置还包括:
    配置单元,用于在所述第二参数计算单元基于最小二乘准则,根据所述测试耳形传递函数以及目标耳形传递函数,计算得到与所述测试音频信号对应的第一均衡参数之后,根据所述第一均衡参数配置第一均衡器,所述第一均衡器用于对所述目标音频信号中高于或等于目标频率阈值的频段进行所述耳形自适应均衡。
  39. 根据权利要求37或38所述的音频信号处理装置,其特征在于,所述第二输出单元在用于通过所述扬声器输出测试音频信号时,包括:
    在所述耳机处于佩戴状态的情况下,响应主动测试指令,通过所述扬声器输出测试音频信号。
  40. 一种音频信号处理装置,其特征在于,应用于耳机,所述耳机包括扬声器及反馈麦克风,所述音频信号处理装置包括:
    第三输出单元,用于通过所述扬声器输出测试音频信号,其中,所述测试音频信号包括次声波信号;
    第三接收单元,用于通过所述反馈麦克风采集与所述测试音频信号对应的接收音频信号;
    第三参数计算单元,用于计算所述接收音频信号的信号能量,并根据所述信号能量确定与所述次声波信号对应的第二均衡参数,所述第二均衡参数用于对待输出的目标音频信号进行与耳机佩戴状态匹配的佩戴泄漏自适应均衡。
  41. 根据权利要求40所述的音频信号处理装置,其特征在于,所述第三参数计算单元在用于计算所述接收音频信号的信号能量,并根据所述信号能量确定与所述次声波信号对应的第二均衡参数时,包括:
    通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号;
    计算所述第一低频接收信号的归一化信号能量;
    根据所述归一化信号能量确定泄漏程度,并根据所述泄漏程度计算得到与所述次声波信号对应的第二均衡参数。
  42. 根据权利要求40或41所述的音频信号处理装置,其特征在于,所述耳机还包括前馈麦克风,所述第三参数计算单元还用于通过所述前馈麦克风采集环境音;以及,根据所述环境音以及所述接收音频信号计算得到相关系数;以及,若所述相关系数不大于相关阈值,则执行所述通过第一带通滤波器对所述接收音频信号进行滤波,得到第一低频接收信号的步骤。
  43. 根据权利要求42所述的音频信号处理装置,其特征在于,所述第三参数计算单元在用于通过所述前馈麦克风采集环境音之后,还用于通过第三带通滤波器对所述环境音进行滤波,得到低频环境音信号;以及,计算所述低频环境音信号对应的噪声能量;以及,在所述噪声能量低于噪声能量阈值的情况下,触发所述第三输出单元执行所述通过所述扬声器输出测试音频信号的步骤。
  44. 根据权利要求40或41所述的音频信号处理装置,其特征在于,所述音频信号处理装置还包括:
    配置单元,用于在所述第三参数计算单元计算所述接收音频信号的信号能量,并根据所述信号能量确定与所述次声波信号对应的第二均衡参数之后,根据所述第二均衡参数配置第二均衡器,所述第二均衡器用于对所述目标音频信号中低于目标频率阈值的频段进行所述佩戴泄漏自适应均衡。
  45. 一种耳机,其特征在于,包括存储器及处理器,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器实现如权利要求1至22任一项所述的音频信号处理方法。
  46. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至22任一项所述的音频信号处理方法。
PCT/CN2022/107699 2021-08-19 2022-07-25 音频信号处理方法及装置、耳机、存储介质 WO2023020208A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110954133.2A CN115942170A (zh) 2021-08-19 2021-08-19 音频信号处理方法及装置、耳机、存储介质
CN202110954133.2 2021-08-19

Publications (1)

Publication Number Publication Date
WO2023020208A1 true WO2023020208A1 (zh) 2023-02-23

Family

ID=85239460

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/107699 WO2023020208A1 (zh) 2021-08-19 2022-07-25 音频信号处理方法及装置、耳机、存储介质

Country Status (2)

Country Link
CN (1) CN115942170A (zh)
WO (1) WO2023020208A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140341388A1 (en) * 2013-05-16 2014-11-20 Apple Inc. Adaptive audio equalization for personal listening devices
CN104661153A (zh) * 2014-12-31 2015-05-27 歌尔声学股份有限公司 一种耳机音效补偿方法、装置及耳机
CN108551631A (zh) * 2018-04-28 2018-09-18 维沃移动通信有限公司 一种音质补偿方法及移动终端
CN110996215A (zh) * 2020-02-26 2020-04-10 恒玄科技(北京)有限公司 确定耳机降噪参数的方法、装置以及计算机可读介质
CN110996216A (zh) * 2020-02-26 2020-04-10 恒玄科技(北京)有限公司 对耳机内均衡滤波器进行配置的方法、装置、***及耳机
CN111818439A (zh) * 2020-07-20 2020-10-23 恒玄科技(上海)股份有限公司 耳机的控制方法、控制装置及存储介质
CN111988690A (zh) * 2019-05-23 2020-11-24 北京小鸟听听科技有限公司 一种耳机佩戴状态检测方法、装置和耳机

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140341388A1 (en) * 2013-05-16 2014-11-20 Apple Inc. Adaptive audio equalization for personal listening devices
CN104661153A (zh) * 2014-12-31 2015-05-27 歌尔声学股份有限公司 一种耳机音效补偿方法、装置及耳机
CN108551631A (zh) * 2018-04-28 2018-09-18 维沃移动通信有限公司 一种音质补偿方法及移动终端
CN111988690A (zh) * 2019-05-23 2020-11-24 北京小鸟听听科技有限公司 一种耳机佩戴状态检测方法、装置和耳机
CN110996215A (zh) * 2020-02-26 2020-04-10 恒玄科技(北京)有限公司 确定耳机降噪参数的方法、装置以及计算机可读介质
CN110996216A (zh) * 2020-02-26 2020-04-10 恒玄科技(北京)有限公司 对耳机内均衡滤波器进行配置的方法、装置、***及耳机
CN111818439A (zh) * 2020-07-20 2020-10-23 恒玄科技(上海)股份有限公司 耳机的控制方法、控制装置及存储介质

Also Published As

Publication number Publication date
CN115942170A (zh) 2023-04-07

Similar Documents

Publication Publication Date Title
CN113676803B (zh) 一种主动降噪方法及装置
US9111543B2 (en) Processing signals
CN108141502B (zh) 降低声学***中的声学反馈的方法及音频信号处理设备
EP3791565B1 (en) Method and apparatus utilizing residual echo estimate information to derive secondary echo reduction parameters
US6639987B2 (en) Communication device with active equalization and method therefor
US8644517B2 (en) System and method for automatic disabling and enabling of an acoustic beamformer
WO2016107207A1 (zh) 一种耳机音效补偿方法、装置及耳机
WO2022247494A1 (zh) 音频信号补偿方法及装置、耳机、存储介质
WO2022218093A1 (zh) 音频信号补偿方法及装置、耳机、存储介质
US20140341386A1 (en) Noise reduction
EP3987511A1 (en) Real-time detection of conditions in acoustic devices
GB2585086A (en) Pre-processing for automatic speech recognition
CN111354368B (zh) 补偿处理后的音频信号的方法
CN113424558A (zh) 智能个人助理
WO2023020208A1 (zh) 音频信号处理方法及装置、耳机、存储介质
GB2490092A (en) Reducing howling by applying a noise attenuation factor to a frequency which has above average gain
CN116782084A (zh) 音频信号处理方法及装置、耳机、存储介质
WO2023077980A1 (zh) 音效调节方法、装置、存储介质及电子设备
WO2023016208A1 (zh) 音频信号补偿方法及装置、耳机、存储介质
CN111163411B (zh) 减少干扰音影响的方法及声音播放装置
CN115914911A (zh) 音频信号处理方法及装置、耳机、存储介质
WO2024093536A1 (zh) 音频信号处理方法及装置、音频播放设备、存储介质
WO2023138252A1 (zh) 音频信号处理方法及装置、耳机设备、存储介质
TWI837867B (zh) 聲音補償方法及頭戴式裝置
CN115580804A (zh) 一种耳机自适应输出方法、装置、设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22857521

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE