Method and system for compensating frequency response of microphone
11785383 · 2023-10-10
Assignee
Inventors
Cpc classification
International classification
Abstract
A method and system for compensating a frequency response of a microphone array are provided. The method includes: multiple microphones in a microphone array respectively receiving a compensation signal sent from a calibration speaker and outputting multiple output signals respectively; determining a uniform frequency response of the multiple microphones based on the multiple output signals; calculating a compensation gain for each of the multiple microphones according to the uniform frequency response; and storing the calculated compensation gain of each microphone.
Claims
1. A method for compensating a frequency response of a microphone, comprising: receiving a compensation signal at multiple microphones in a microphone array from a calibration speaker and outputting multiple output signals; determining a uniform frequency response of the multiple microphones based on the multiple output signals; calculating a compensation gain for each of the multiple microphones according to the uniform frequency response; and storing the calculated compensation gain of each microphone; and determining whether the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, wherein when the calibration speaker is not positioned to be equally spaced from the microphones in the microphone array, determining whether the calibration speaker is located on a central symmetry axis of the microphone array; wherein, responsive to the calibration speaker being located on the central symmetry axis of the microphone array and a number of microphones in the microphone array being an even number, the multiple microphones are grouped by grouping every two microphones equally spaced from the calibration speaker; wherein, responsive to the calibration speaker being located on the central symmetry axis of the microphone array and the number of microphones in the microphone array being an odd number, multiple microphones other than the microphone located on the central symmetry axis are grouped by grouping every two microphones equally spaced from the calibration speaker; and wherein when the number of microphones in the microphone array is an even number, a frequency response of an output signal of one microphone in each group of microphones is selected as a uniform frequency response of the group, a compensation gain of the selected microphone is set to 1, and a compensation gain of the other microphone in the group of microphones is calculated as a ratio of the uniform frequency response of the group to a frequency response amplitude of an output signal of the other microphone in the group of microphones.
2. The method of claim 1, wherein when the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, a frequency response of an output signal of one microphone in the microphone array is selected as the uniform frequency response, a compensation gain of the selected microphone is set to 1, and the compensation gain of each of the remaining microphones in the microphone array is calculated as a ratio of the uniform frequency response to a frequency response amplitude of an output signal of the microphone.
3. The method of claim 1, wherein when the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, frequency response amplitudes of all or part of the multiple output signals are calculated, a weighted sum of the frequency response amplitudes is taken as the uniform frequency response, and the compensation gain of each microphone in the microphone array is calculated as a ratio of the uniform frequency response to a frequency response amplitude of an output signal of the microphone.
4. The method of claim 1, wherein when the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, frequency response energies of all or part of the multiple output signals are calculated, a weighted sum of the frequency response energies is taken as the uniform frequency response, and the compensation gain of each of the multiple microphones is calculated as a ratio of the uniform frequency response to a frequency response energy of an output signal of the microphone.
5. The method of claim 1, wherein when the number of microphones in the microphone array is an even number, frequency response amplitudes of output signals of each group of microphones are calculated, a weighted sum of the frequency response amplitudes of the output signals is taken as a uniform frequency response of the group, and a compensation gain of each microphone in the group of microphones is calculated as a ratio of the uniform frequency response of the group to a frequency response amplitude of an output signal of the microphone.
6. The method of claim 1, wherein when the number of microphones in the microphone array is an even number, frequency response energies of multiple output signals of each group of microphones are calculated, a weighted sum of the frequency response energies is taken as a uniform frequency response of the group, and a compensation gain of each microphone in the group of microphones is calculated as a ratio of the uniform frequency response of the group to a frequency response energy of an output signal of the microphone.
7. The method of claim 1, wherein when the number of microphones in the microphone array is an odd number, a frequency response of an output signal of one microphone in each group of microphones is selected as a uniform frequency response of the group, a compensation gain of the selected microphone is set to 1, a compensation gain of the other microphone in the group of microphones is calculated as a ratio of the uniform frequency response of the group to a frequency response amplitude of an output signal of the other microphone in the group of microphones, and a compensation gain of the microphone located on the central symmetry axis is set to 1.
8. The method of claim 1, wherein when the number of microphones in the microphone array is an odd number, frequency response amplitudes of output signals of each group of microphones are calculated, a weighted sum of the frequency response amplitudes of the output signals is taken as a uniform frequency response of the group, a compensation gain of each microphone in the group of microphones is calculated as a ratio of the uniform frequency response of the group to a frequency response amplitude of an output signal of the microphone, and a compensation gain of the microphone located on the central symmetry axis is set to 1.
9. The method of claim 1, wherein when the number of microphones in the microphone array is an even number, frequency response energies of output signals of each group of microphones are calculated, a weighted sum of the frequency response energies of the output signals is taken as a uniform frequency response of the group, a compensation gain of each microphone in the group of microphones is calculated as a ratio of the uniform frequency response of the group to a frequency response energy of an output signal of the microphone, and a compensation gain of the microphone located on the central symmetry axis is set to 1.
10. A system for compensating a frequency response of a microphone, comprising: a calibration speaker configured to transmit a compensation signal; a microphone array comprising multiple microphones to receive the compensation signal and to transmit multiple output signals; a processor configured to: determine a uniform frequency response of the multiple microphones based on the multiple output signals; calculate a compensation gain for each of the multiple microphones according to the uniform frequency response; determine whether the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, determine whether the calibration speaker is located on a central symmetry axis of the microphone array responsive to the calibration speaker not being positioned to be equally spaced from the microphones in the microphone array; group the multiple microphones such that every two microphones are equally spaced from the calibration speaker responsive to the calibration speaker being located on the central symmetry axis of the microphone array and a number of microphones in the microphone array being an even number; group multiple microphones other than the microphone located on the central symmetry axis such that every two microphones are equally spaced from the calibration speaker responsive to the calibration speaker being located on the central symmetry axis of the microphone array and the number of microphones in the microphone array being an odd number; and select a frequency response of an output signal of one microphone in each group of microphones as a uniform frequency response of the group, set a compensation gain of the selected microphone to 1, and calculate a compensation gain of the other microphone in the group of microphones as a ratio of the uniform frequency response of the group to a frequency response amplitude of an output signal of the other microphone in the group of microphones responsive to the number of microphones in the microphone array being an even number; and a memory configured to store the calculated compensation gain of each microphone.
11. A computer-program product embodied in a non-transitory computer readable medium that is stored in memory and that is executable by a processor for compensating a frequency response of a microphone, the computer-program product comprising instructions for: receiving a compensation signal at multiple microphones in a microphone array from a calibration speaker and outputting multiple output signals; determining a uniform frequency response of the multiple microphones based on the multiple output signals; calculating a compensation gain for each of the multiple microphones according to the uniform frequency response; storing the calculated compensation gain of each microphone; and determining whether the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, wherein when the calibration speaker is not positioned to be equally spaced from the microphones in the microphone array, determining whether the calibration speaker is located on a central symmetry axis of the microphone array; wherein, responsive to the calibration speaker being located on the central symmetry axis of the microphone array and a number of microphones in the microphone array being an even number, the multiple microphones are grouped by grouping every two microphones equally spaced from the calibration speaker; wherein, responsive to the calibration speaker being located on the central symmetry axis of the microphone array and the number of microphones in the microphone array being an odd number, multiple microphones other than the microphone located on the central symmetry axis are grouped by grouping every two microphones equally spaced from the calibration speaker; and wherein when the number of microphones in the microphone array is an even number, a frequency response of an output signal of one microphone in each group of microphones is selected as a uniform frequency response of the group, a compensation gain of the selected microphone is set to 1, and a compensation gain of the other microphone in the group of microphones is calculated as a ratio of the uniform frequency response of the group to a frequency response amplitude of an output signal of the other microphone in the group of microphones.
12. The computer-program product of claim 11, wherein when the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, a frequency response of an output signal of one microphone in the microphone array is selected as the uniform frequency response, a compensation gain of the selected microphone is set to 1, and the compensation gain of each of the remaining microphones in the microphone array is calculated as a ratio of the uniform frequency response to a frequency response amplitude of an output signal of the microphone.
13. The computer-program product of claim 11, wherein when the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, frequency response amplitudes of all or part of the multiple output signals are calculated, a weighted sum of the frequency response amplitudes is taken as the uniform frequency response, and the compensation gain of each microphone in the microphone array is calculated as a ratio of the uniform frequency response to a frequency response amplitude of an output signal of the microphone.
14. The computer-program product of claim 11, wherein when the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, frequency response energies of all or part of the multiple output signals are calculated, a weighted sum of the frequency response energies is taken as the uniform frequency response, and the compensation gain of each of the multiple microphones is calculated as a ratio of the uniform frequency response to a frequency response energy of an output signal of the microphone.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The system may be better understood with reference to the following description and in conjunction with the accompanying drawings. Parts in the figures are not to scale, but the focus is placed on explaining the principle of the present invention. In addition, in the figures, similar or identical reference numerals refer to similar or identical elements.
(2)
(3)
(4)
(5)
(6)
(7)
(8)
DETAILED DESCRIPTION
(9) As required, detailed embodiments of the present invention are disclosed herein; however, it is to be understood that the disclosed embodiments are merely exemplary of the invention that may be embodied in various and alternative forms. The figures are not necessarily to scale; some features may be exaggerated or minimized to show details of particular components. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a representative basis for teaching one skilled in the art to variously employ the present invention.
(10) It should be understood that the following description of the embodiments is given for illustrative purposes only, and not restrictive. The division of examples in the functional blocks, modules, or units shown in the drawings should not be construed as representing these functional blocks, and these modules or units must be implemented as physically separated units. The functional blocks, modules, or units shown or described may be implemented as individual units, circuits, chips, functions, modules, or circuit elements. One or more functional blocks or units may also be implemented in a common circuit, chip, circuit element, or unit.
(11) When multiple people are talking in a vehicle at the same time, some voice enhancement processing, such as a blind spot separation (BSS) algorithm, is required to isolate clean voices in the voice recognition process.
x.sub.1(t)=Σ.sub.j=1.sup.Ns.sub.j(t)
x.sub.2(t)=Σ.sub.j=1.sup.Nα.sub.js.sub.j(t−δ.sub.j)
(12) where N represents the number of sources, δ.sub.j represents an arrival delay between the microphones (i.e., a time difference between sound from a source to two microphones), and α.sub.j is a relative attenuation factor, which corresponds to an attenuation ratio of a path between the source and the microphones.
(13) The above expression assumes that the microphones have the same frequency response. In other words, when a person speaks to microphones (j=1), if the distances between the person and the microphones are the same (α=1, δ=0), the microphone inputs are the same (s(t)), so the microphone outputs should be the same, i.e. x.sub.1 (t)=x.sub.2 (t). However, in use, attributes of the microphones will change with time, temperature, and humidity, and the changes may be inconsistent. Even microphones with the same initial specifications may have inconsistent attributes after being used for a period of time. That is, even though the inputs are both s(t), output signals x.sub.1(t) and x.sub.2 (t) are not the same.
(14)
(15)
(16) After receiving a recalibration control signal sent by a user to the system, the system is set in a recalibration mode. The control signal controls the speaker to send out a compensation signal, and microphone 1 and microphone 2 are started to record the compensation signal and respectively output microphone output signals x.sub.1(t) and x.sub.2(t) to the vehicle host system. The compensation signal may be a chrip signal with a broadband frequency and a uniform amplitude. For example, the chrip signal may linearly scan from a frequency of 0.1 kHz to a frequency of 4 kHz, and the duration is always 5 s. For example, the recording duration of the microphone is about 7-8 s. However, those skilled in the art can understand that the chrip range of the chrip signal, the duration, the microphone recording time, and other parameters are described here as examples only, and are not intended to be specifically limited. The above parameters may be changed according to specific requirements.
(17) The vehicle host system receives the microphone output signals x.sub.1(t) and x.sub.2(t), and converts the output signals into frequency domain signals X1(jω) and X2(jω). Then, a uniform frequency response (UFR) of microphone 1 and microphone 2 may be calculated based on the frequency domain signals. Next, gains of the two microphones may be calculated based on the uniform frequency response. For example, a compensation gain of microphone 1 is gain1 and a compensation gain of microphone 2 is gain2. Finally, the calculated compensation gains gain1 and gain2 of the two microphones may be saved in the system for use in algorithms such as BSS. For example, once the BSS algorithm is invoked, calibrated and updated; microphone gains are first invoked from a memory to compensate frequency responses of the microphone output signals, and then the compensated output signals are used as inputs to the BSS algorithm. For example, a frequency spectrum of an audio signal received from microphone 1 will be multiplied by gain1, and a frequency spectrum of an audio signal received from microphone 2 will be multiplied by gain2. Therefore, the frequency responses of the output signals of the two microphones are compensated through the stored corresponding compensation gains. The accuracy of subsequent voice processing algorithms (such as the BSS algorithm) is further improved.
(18) For the purpose of briefly explaining the principle,
(19)
(20) For the microphone array in
(21)
(22) Alternatively, frequency response amplitudes of output signals of all or part of the microphones in the microphone array may be calculated respectively, and a weighted sum of the frequency response amplitudes may be calculated, thereby calculating the UFR of all or part of the microphones. For example,
UFR=a*|X.sub.1(jω)|+b*|X.sub.2(jω)|+ . . . +q*|X.sub.p(jω)|,
(23) where p≤N, a+b+ . . . +q=1, N represent the total number of microphones in the microphone array, P represents the number of partial microphones in the microphone array, and a, b . . . p are weight coefficients of corresponding microphones respectively. For example, the weight coefficients may be equal to 1/p, or may also be set according to the importances of the microphones. For example, if the output of a certain microphone is more important, the weighting coefficient thereof is larger.
(24) Then, a ratio of the UFR to a frequency response amplitude of an output signal of each microphone may be calculated, thereby calculating the compensation gain of each microphone in the microphone array. For example,
(25)
(26) Alternatively, frequency response energy values of the output signals of all or part of the microphones in the microphone array may be calculated respectively, and a UFR of all or part of microphones in the microphone array is obtained by calculating a weighted sum of the frequency response energy values. For example,
UFR=a*|X.sub.1(jω)|.sup.2+b*|X.sub.2(jω)|.sup.2+ . . . +q*|X.sub.p(jω)|.sup.2).sup.1/2,
(27) where p≤N, a+b+ . . . +q=1, N represent the total number of microphones in the microphone array, P represents the number of partial microphones in the microphone array, and a, b . . . p are weight coefficients of corresponding microphones respectively.
(28) Then, the compensation gain of each microphone may be calculated by calculating a ratio of the UFR to a frequency response energy of an output signal of the microphone. For example,
(29)
(30)
(31) The microphone array arranged in a linear array shown in
(32) For each group of microphones, the gain may be calculated according to a dual-microphone frequency response compensation scheme shown in
(33)
(34) By analogy, the gains of the microphones numbered N/2 and N/2+1 in the N/2th group of microphones are calculated, so that compensation gains of all the microphones are finally obtained.
(35) Alternatively, frequency response amplitudes of output signals of two microphones in each group of microphones may be calculated, and a weighted sum of the frequency response amplitudes may be taken as a UFR of the group. By calculating a ratio of the UFR of each group to the frequency response amplitude of the output signal of each microphone in the group, a compensation gain of each microphone in the group of microphones is obtained.
(36) For example, the UFR of the first group of microphones may be calculated by the following formula:
UFR=a*|X.sub.1(jω)|+q*|X.sub.N(jω)|,
(37) Then, the gains of two microphones in the first group of microphones are respectively calculated as:
(38)
(39) By analogy, the gains of the microphones numbered N/2 and N/2+1 in the N/2th group of microphones are calculated, so that the gains of all the microphones are calculated.
(40) Alternatively, frequency response energies of output signals of two microphones in each group of microphones may be calculated, and a weighted sum of the frequency response energies may be taken as a UFR of the group. Then, the compensation gain of each microphone in each group is calculated by calculating a ratio of the UFR of the group to a frequency response energy of an output signal of the microphone.
(41) For example, the UFR of the first group of microphones may be calculated by the following formula:
UFR=a*|X.sub.1(jω)|+q*|X.sub.p(jω)|.sup.2).sup.1/2,
(42) The gains of two microphones in the first group of microphones are respectively calculated as:
(43)
(44) By analogy, the gains of the microphones numbered N/2 and N/2+1 in the N/2th group of microphones are calculated, so that the gains of all the microphones are calculated.
(45) The microphone array arranged in a linear array shown in
(46)
(47) Processor 703 is also configured to determine whether the calibration speaker is positioned to be equally spaced from the microphones in the microphone array. When the processor determines that the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, a frequency response of an output signal of one microphone in the microphone array may be selected as a uniform frequency response UFR, a compensation gain of the selected microphone is set to 1, and a compensation gain of each microphone in the remaining microphones of the microphone array is calculated as a ratio of the uniform frequency response UFR to a frequency response amplitude of an output signal of the microphone.
(48) Further, processor 703 is also configured to calculate, when it is determined that the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, frequency response amplitudes of all or part of the multiple output signals, take a weighted sum of the frequency response amplitudes as the uniform frequency response UFR, and calculate the compensation gain of each microphone in the microphone array as a ratio of the uniform frequency response UFR to a frequency response amplitude of an output signal of the microphone.
(49) Further, processor 703 is also further configured to calculate, when it is determined that the calibration speaker is positioned to be equally spaced from the microphones in the microphone array, frequency response energies of all or part of the multiple output signals, take a weighted sum of the frequency response energies as the uniform frequency response UFR, and set the compensation gain of each of the multiple microphones as a ratio of the uniform frequency response UFR to a frequency response energy of an output signal of the microphone.
(50) Further, the processor 703 is also configured to further determine, when the processor determines that the calibration speaker is not positioned to be equally spaced from the microphones in the microphone array, whether the calibration speaker is located on a central symmetry axis of the microphone array. If the calibration speaker is located on the central symmetry axis of the microphone array and the number of microphones in the microphone array is an even number, the multiple microphones are grouped by grouping every two microphones equally spaced from the calibration speaker. If the calibration speaker is located on the central symmetry axis of the microphone array and the number of microphones in the microphone array is an odd number, multiple microphones other than the microphone located on the central symmetry axis are grouped by grouping every two microphones equally spaced from the calibration speaker.
(51) Further, processor 703 is also further configured to select, when the number of microphones in the microphone array is an even number, a frequency response of an output signal of one microphone in each group of microphones as a uniform frequency response of the group, set a compensation gain of the selected microphone to 1, and calculate a compensation gain of the other microphone in the group of microphones as a ratio of the uniform frequency response of the group to a frequency response amplitude of an output signal of the other microphone in the group of microphones.
(52) Further, processor 703 is also further configured to calculate, when the number of microphones in the microphone array is an even number, frequency response amplitudes of output signals of each group of microphones, take a weighted sum of the frequency response amplitudes of the output signals as a uniform frequency response of the group, and calculate a compensation gain of each microphone in the group of microphones as a ratio of the uniform frequency response of the group to a frequency response amplitude of an output signal of the microphone.
(53) Further, processor 703 is also further configured to calculate, when the processor determines that the number of microphones in the microphone array is an even number, frequency response energies of multiple output signals of each group of microphones, take a weighted sum of the frequency response energies as a uniform frequency response of the group, and calculate a compensation gain of each microphone in the group of microphones as a ratio of the uniform frequency response of the group to a frequency response energy of an output signal of the microphone.
(54) Further, processor 703 is also further configured to select, when the number of microphones in the microphone array is an odd number, a frequency response of an output signal of one microphone in each group of microphones as a uniform frequency response of the group, set a compensation gain of the selected microphone to 1, calculate a compensation gain of the other microphone in the group of microphones as a ratio of the uniform frequency response of the group to a frequency response amplitude of an output signal of the other microphone in the group of microphones, and set a compensation gain of the microphone located on the central symmetry axis to 1.
(55) Further, processor 703 is also further configured to calculate, when the number of microphones in the microphone array is an odd number, frequency response amplitudes of output signals of each group of microphones, take a weighted sum of the frequency response amplitudes of the output signals as a uniform frequency response of the group, calculate a compensation gain of each microphone in the group of microphones as a ratio of the uniform frequency response of the group to a frequency response amplitude of an output signal of the microphone, and set a compensation gain of the microphone located on the central symmetry axis to 1.
(56) Further, processor 703 is also further configured to calculate, when the number of microphones in the microphone array is an odd number, frequency response energies of output signals of each group of microphones, take a weighted sum of the frequency response energies of the output signals as a uniform frequency response of the group, calculate a compensation gain of each microphone in the group of microphones as a ratio of the uniform frequency response of the group to a frequency response energy of an output signal of the microphone, and set a compensation gain of the microphone located on the central symmetry axis to 1.
(57) The processor of the present invention as a whole may be a microprocessor, an application specific integrated circuit (ASIC), a system on chip (SoC), a mobile computing device (e.g., a tablet computer or a mobile phone), a media player, etc.
(58) Any one or more of the processor, memory, or system described herein includes computer-executable instructions that may be compiled or interpreted from computer programs created using various programming languages and/or technologies. Generally speaking, a processor (such as a microprocessor) receives and executes instructions, for example, from a memory, a computer-readable medium, etc. The processor includes a non-transitory computer-readable storage medium capable of executing instructions of a software program. The computer-readable medium can be, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof.
(59) The description of the implementations has been presented for the purposes of illustration and description. Appropriate modifications and changes of the implementations can be implemented in view of the above description or can be obtained through practical methods. For example, unless otherwise indicated, one or more of the methods described may be performed by a combination of suitable devices and/or systems. The method can be performed in the following manner: using one or more logic devices (for example, processors) in combination with one or more additional hardware elements (such as storage devices, memories, circuits, hardware network interfaces, etc.) to perform stored instructions. The method and associated actions can also be executed in parallel and/or simultaneously in various orders other than the order described in this application. The system is illustrative in nature, and may include additional elements and/or omit elements. The subject matter of the present disclosure includes all novel and non-obvious combinations of the disclosed various methods and system configurations and other features, functions, and/or properties.
(60) As used in this application, an element or step listed in the singular form and preceded by the word “one/a” should be understood as not excluding a plurality of said elements or steps, unless such exclusion is indicated. Furthermore, references to “one implementation” or “an example” of the present disclosure are not intended to be interpreted as excluding the existence of additional implementations that also incorporate the recited features. The present invention has been described above with reference to specific embodiments. However, those of ordinary skill in the art will understand that various modifications and changes can be made without departing from the broader spirit and scope of the present invention as set forth in the appended claims.