CN114786085A - Noise reduction control method and device, noise reduction earphone and storage medium - Google Patents
Noise reduction control method and device, noise reduction earphone and storage medium Download PDFInfo
- Publication number
- CN114786085A CN114786085A CN202210509398.6A CN202210509398A CN114786085A CN 114786085 A CN114786085 A CN 114786085A CN 202210509398 A CN202210509398 A CN 202210509398A CN 114786085 A CN114786085 A CN 114786085A
- Authority
- CN
- China
- Prior art keywords
- noise reduction
- domain signal
- time domain
- target
- filter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1083—Reduction of ambient noise
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10K—SOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
- G10K11/00—Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
- G10K11/16—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
- G10K11/175—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
- G10K11/178—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10K—SOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
- G10K11/00—Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
- G10K11/16—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
- G10K11/175—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
- G10K11/178—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
- G10K11/1781—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase characterised by the analysis of input or output signals, e.g. frequency range, modes, transfer functions
- G10K11/17821—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase characterised by the analysis of input or output signals, e.g. frequency range, modes, transfer functions characterised by the analysis of the input signals only
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10K—SOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
- G10K11/00—Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
- G10K11/16—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
- G10K11/175—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
- G10K11/178—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
- G10K11/1785—Methods, e.g. algorithms; Devices
- G10K11/17853—Methods, e.g. algorithms; Devices of the filter
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10K—SOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
- G10K2210/00—Details of active noise control [ANC] covered by G10K11/178 but not provided for in any of its subgroups
- G10K2210/10—Applications
- G10K2210/108—Communication systems, e.g. where useful sound is kept and noise is cancelled
- G10K2210/1081—Earphones, e.g. for telephones, ear protectors or headsets
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10K—SOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
- G10K2210/00—Details of active noise control [ANC] covered by G10K11/178 but not provided for in any of its subgroups
- G10K2210/30—Means
- G10K2210/301—Computational
- G10K2210/3016—Control strategies, e.g. energy minimization or intensity measurements
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Soundproofing, Sound Blocking, And Sound Damping (AREA)
Abstract
本公开是关于一种降噪控制方法、装置、降噪耳机及存储介质。降噪控制方法包括:获取环境时域信号,获取耳道时域信号,若环境时域信号和耳道时域信号满足预设的滤波器参数调整条件,则基于环境时域信号和耳道时域信号以及预设的频率响应函数,确定目标降噪量;根据预设的降噪配置信息和目标降噪量,将与目标降噪量对应的声泄漏补偿档位确定为目标声泄露补偿档位;基于目标声泄漏补偿档位,确定目标滤波器参数;将预设的降噪滤波器中的滤波器参数调整为目标滤波器参数。使用本公开中的方法能够在耳机佩戴松弛时,及时调整预设的降噪滤波器中的滤波器参数进行声泄漏补偿,以保证良好的降噪效果,提升用户体验。
The present disclosure relates to a noise reduction control method, a device, a noise reduction earphone and a storage medium. The noise reduction control method includes: acquiring an environmental time domain signal, and acquiring an ear canal time domain signal. domain signal and the preset frequency response function to determine the target noise reduction amount; according to the preset noise reduction configuration information and the target noise reduction amount, the sound leakage compensation gear corresponding to the target noise reduction amount is determined as the target sound leakage compensation gear determine the target filter parameters based on the target sound leakage compensation gear; adjust the filter parameters in the preset noise reduction filter to the target filter parameters. By using the method in the present disclosure, when the earphone is loosely worn, the filter parameters in the preset noise reduction filter can be adjusted in time to perform sound leakage compensation, so as to ensure a good noise reduction effect and improve user experience.
Description
技术领域technical field
本公开涉及信号处理领域,尤其涉及一种降噪控制方法、装置、降噪耳机及存储介质。The present disclosure relates to the field of signal processing, and in particular, to a noise reduction control method, a device, a noise reduction earphone and a storage medium.
背景技术Background technique
主动降噪(Active Noise Cancellation,ANC)又称作主动噪声控制(ActiveNoise Control,ANC),是一种主动产生与噪声源能量相同、相位相反的信号,使声信号与噪声源信号产生干涉,实现声波抵消的技术。主动降噪技术广泛应用在耳机、船舱、轿车座舱、车载扬声器系统、智能家居等具有音频播放功能的多媒体领域。Active Noise Cancellation (ANC), also known as Active Noise Control (ANC), is a method that actively generates a signal with the same energy and opposite phase as the noise source, so that the acoustic signal interferes with the noise source signal. The technology of sound wave cancellation. Active noise reduction technology is widely used in multimedia fields with audio playback functions such as headphones, ship cabins, car cockpits, car speaker systems, and smart homes.
目前,用户在长时间佩戴耳机后,耳机与耳道之间产生间隙,耳机与耳朵的贴合度下降,使得降噪效果不佳。At present, after a user wears the earphone for a long time, a gap is formed between the earphone and the ear canal, and the fit between the earphone and the ear is reduced, so that the noise reduction effect is poor.
发明内容SUMMARY OF THE INVENTION
为克服相关技术中存在的问题,本公开提供一种降噪控制方法、装置、降噪耳机及存储介质。In order to overcome the problems existing in the related art, the present disclosure provides a noise reduction control method, a device, a noise reduction earphone and a storage medium.
根据本公开实施例的第一方面,提供了一种降噪控制方法,应用于耳机,所述方法包括:According to a first aspect of the embodiments of the present disclosure, a noise reduction control method is provided, applied to an earphone, and the method includes:
获取环境时域信号,其中,所述环境时域信号指的是采用时域表示方式所表示的耳机周围环境中的声波信号;acquiring an environmental time domain signal, wherein the environmental time domain signal refers to a sound wave signal in the environment around the earphone represented by a time domain representation;
获取耳道时域信号,其中,所述耳道时域信号指的是采用时域表示方式所表示的耳道内的声波信号;acquiring an ear canal time domain signal, wherein the ear canal time domain signal refers to an acoustic wave signal in the ear canal represented by a time domain representation;
若所述环境时域信号和所述耳道时域信号满足预设的滤波器参数调整条件,则基于所述环境时域信号和所述耳道时域信号以及预设的频率响应函数,确定目标降噪量;If the environmental time-domain signal and the ear canal time-domain signal satisfy the preset filter parameter adjustment conditions, then based on the environmental time-domain signal and the ear canal time-domain signal and the preset frequency response function, determine target noise reduction amount;
根据预设的降噪配置信息和所述目标降噪量,将与所述目标降噪量对应的声泄漏补偿档位确定为目标声泄露补偿档位,其中,所述降噪配置信息用于表征降噪量阈值与声泄漏补偿档位之间的对应关系,所述降噪配置信息包括多个降噪量阈值和与每个所述降噪量阈值对应的声泄露补偿档位;According to the preset noise reduction configuration information and the target noise reduction amount, the sound leakage compensation gear corresponding to the target noise reduction amount is determined as the target sound leakage compensation gear, wherein the noise reduction configuration information is used for Characterizing the correspondence between the noise reduction threshold and the sound leakage compensation gear, the noise reduction configuration information includes a plurality of noise reduction thresholds and a sound leakage compensation gear corresponding to each of the noise reduction thresholds;
基于所述目标声泄漏补偿档位,确定目标滤波器参数;determining target filter parameters based on the target acoustic leakage compensation gear;
将预设的降噪滤波器中的滤波器参数调整为所述目标滤波器参数,其中,所述降噪滤波器用于对输入的声波信号进行降噪滤波处理。The filter parameters in the preset noise reduction filter are adjusted to the target filter parameters, wherein the noise reduction filter is used to perform noise reduction filtering processing on the input sound wave signal.
在一示例性的实施例中,所述方法还包括:采用如下方法判断所述环境时域信号和所述耳道时域信号是否满足预设的滤波器参数调整条件:In an exemplary embodiment, the method further includes: using the following method to determine whether the ambient time domain signal and the ear canal time domain signal satisfy preset filter parameter adjustment conditions:
基于所述环境时域信号,确定环境时域信号总能量,其中,所述环境时域信号包括多个频点,所述环境时域信号总能量指的是所述环境时域信号中各个频点的能量之和;Determine the total energy of the environmental time domain signal based on the environmental time domain signal, wherein the environmental time domain signal includes a plurality of frequency points, and the total energy of the environmental time domain signal refers to each frequency in the environmental time domain signal the sum of the energies of the points;
基于所述耳道时域信号,确定耳道时域信号总能量,其中,所述耳道时域信号包括多个频点,所述耳道时域信号总能量指的是所述耳道时域信号中各个频点的能量之和;Based on the ear canal time domain signal, the total energy of the ear canal time domain signal is determined, wherein the ear canal time domain signal includes a plurality of frequency points, and the total energy of the ear canal time domain signal refers to the time of the ear canal The sum of the energy of each frequency point in the domain signal;
若所述环境时域信号总能量与所述耳道时域信号总能量的比值大于或等于预设的能量阈值,则判定满足预设的滤波器参数调整条件。If the ratio of the total energy of the environmental time domain signal to the total energy of the ear canal time domain signal is greater than or equal to a preset energy threshold, it is determined that the preset filter parameter adjustment conditions are met.
在一示例性的实施例中,所述基于所述环境时域信号和所述耳道时域信号以及预设的频率响应函数,确定目标降噪量,包括:In an exemplary embodiment, the determining the target noise reduction amount based on the environmental time domain signal and the ear canal time domain signal and a preset frequency response function includes:
对所述环境时域信号和所述耳道时域信号分别进行傅里叶变换,获得环境频域信号和耳道频域信号,其中,所述环境频域信号指的是采用频域表示方式所表示的耳机周围环境中的声波信号,所述耳道频域信号指的是采用频域表示方式所表示的耳道内的声波信号;Fourier transform is performed on the environmental time domain signal and the ear canal time domain signal respectively to obtain the environmental frequency domain signal and the ear canal frequency domain signal, wherein the environmental frequency domain signal refers to the frequency domain representation The represented sound wave signal in the surrounding environment of the earphone, the ear canal frequency domain signal refers to the sound wave signal in the ear canal represented by the frequency domain representation;
基于所述环境频域信号和所述耳道频域信号以及预设的频率响应函数,获得交叉频率响应,所述交叉频率响应与频点相关;obtaining a cross frequency response based on the ambient frequency domain signal and the ear canal frequency domain signal and a preset frequency response function, where the cross frequency response is related to a frequency point;
根据所述交叉频率响应,获得参考降噪量;obtaining a reference noise reduction amount according to the cross frequency response;
根据所述参考降噪量,获得目标频段的平均降噪量,将所述平均降噪量确定为所述目标降噪量,其中,所述平均降噪量指的是所述目标频段中每个频点的能量的平均值。According to the reference noise reduction amount, the average noise reduction amount of the target frequency band is obtained, and the average noise reduction amount is determined as the target noise reduction amount, wherein the average noise reduction amount refers to the average noise reduction amount in the target frequency band. The average value of the energy of each frequency point.
在一示例性的实施例中,所述根据预设的降噪配置信息和所述目标降噪量,将与所述目标降噪量对应的声泄漏补偿档位确定为目标声泄露补偿档位,包括:In an exemplary embodiment, the sound leakage compensation gear corresponding to the target noise reduction amount is determined as the target sound leakage compensation gear according to the preset noise reduction configuration information and the target noise reduction amount ,include:
获取预设的降噪阈值集合,所述预设降噪阈值集合包括多个由小至大排列的噪声参数值,多个所述噪声参数值构成多个降噪量阈值,所述降噪量阈值与所述声泄漏补偿档位对应;Obtain a preset noise reduction threshold set, where the preset noise reduction threshold set includes a plurality of noise parameter values arranged from small to large, and a plurality of the noise parameter values constitute a plurality of noise reduction amount thresholds, and the noise reduction amount The threshold value corresponds to the sound leakage compensation gear;
根据所述目标降噪量和所述预设的降噪阈值集合,确定所述目标降噪量所属的降噪量阈值;determining the noise reduction threshold to which the target noise reduction belongs according to the target noise reduction and the preset noise reduction threshold set;
根据所述目标降噪量所属的降噪量阈值,将与所述目标降噪量所属的降噪量阈值对应的声泄漏补偿档位确定为目标声泄露补偿档位。According to the noise reduction amount threshold to which the target noise reduction amount belongs, the sound leakage compensation gear position corresponding to the noise reduction amount threshold to which the target noise reduction amount belongs is determined as the target sound leakage compensation gear position.
在一示例性的实施例中,所述基于所述目标声泄漏补偿档位,确定目标滤波器参数,将预设的降噪滤波器中的滤波器参数调整为所述目标滤波器参数,包括:In an exemplary embodiment, the target filter parameter is determined based on the target sound leakage compensation gear, and the filter parameter in the preset noise reduction filter is adjusted to the target filter parameter, including: :
获取芯片配置信息,所述芯片配置信息用于表征芯片中存储的滤波器系数是否支持更新;acquiring chip configuration information, where the chip configuration information is used to represent whether the filter coefficients stored in the chip support updating;
若所述芯片中存储的滤波器系数支持更新,基于所述目标声泄漏补偿档位,确定目标滤波器系数,将预设的降噪滤波器中的滤波器系数调整为所述目标滤波器系数;If the filter coefficients stored in the chip support updating, determine the target filter coefficients based on the target sound leakage compensation gear, and adjust the filter coefficients in the preset noise reduction filter to the target filter coefficients ;
若所述芯片中存储的滤波器系统不支持更新,基于所述目标声泄漏补偿档位,确定目标滤波器增益,将预设的降噪滤波器中的滤波器增益调整为所述目标滤波器增益。If the filter system stored in the chip does not support updating, determine the target filter gain based on the target sound leakage compensation gear, and adjust the filter gain in the preset noise reduction filter to the target filter gain.
在一示例性的实施例中,所述预设的降噪滤波器中的滤波器参数包括:In an exemplary embodiment, the filter parameters in the preset noise reduction filter include:
前馈滤波器中的滤波器参数;或者,the filter parameters in the feedforward filter; or,
前馈滤波器中的滤波器参数和反馈滤波器中的滤波器参数。Filter parameters in feedforward filters and filter parameters in feedback filters.
根据本公开实施例的第二方面,提供一种降噪控制装置,应用于耳机,所述降噪控制装置包括:According to a second aspect of the embodiments of the present disclosure, there is provided a noise reduction control device applied to an earphone, the noise reduction control device comprising:
第一获取模块,被配置为获取环境时域信号,其中,所述环境时域信号指的是采用时域表示方式所表示的耳机周围环境中的声波信号;a first acquisition module, configured to acquire an environmental time-domain signal, wherein the environmental time-domain signal refers to a sound wave signal in the surrounding environment of the earphone represented by a time-domain representation;
第二获取模块,被配置获取耳道时域信号,其中,所述耳道时域信号指的是采用时域表示方式所表示的耳道内的声波信号;The second acquisition module is configured to acquire the ear canal time domain signal, wherein the ear canal time domain signal refers to the acoustic wave signal in the ear canal represented by the time domain representation;
第一确定模块,被配置为若所述环境时域信号和所述耳道时域信号满足预设的滤波器参数调整条件,则基于所述环境时域信号和所述耳道时域信号以及预设的频率响应函数,确定目标降噪量;a first determining module, configured to, if the environmental time domain signal and the ear canal time domain signal satisfy a preset filter parameter adjustment condition, then, based on the environmental time domain signal and the ear canal time domain signal and The preset frequency response function determines the target noise reduction amount;
第二确定模块,被配置为根据预设的降噪配置信息和所述目标降噪量,将与所述目标降噪量对应的声泄漏补偿档位确定为目标声泄露补偿档位,其中,所述降噪配置信息用于表征降噪量阈值与声泄漏补偿档位之间的对应关系,所述降噪配置信息包括多个降噪量阈值和与每个所述降噪量阈值对应的声泄露补偿档位;The second determination module is configured to, according to the preset noise reduction configuration information and the target noise reduction amount, determine the sound leakage compensation gear corresponding to the target noise reduction amount as the target sound leakage compensation gear, wherein, The noise reduction configuration information is used to represent the corresponding relationship between the noise reduction amount threshold and the sound leakage compensation gear, and the noise reduction configuration information includes a plurality of noise reduction amount thresholds and a corresponding noise reduction amount threshold. Acoustic leakage compensation gear;
第三确定模块,被配置为基于所述目标声泄漏补偿档位,确定目标滤波器参数;a third determining module configured to determine target filter parameters based on the target acoustic leakage compensation gear;
调整模块,被配置为将预设的降噪滤波器中的滤波器参数调整为所述目标滤波器参数,其中,所述降噪滤波器用于对输入的声波信号进行降噪滤波处理。The adjustment module is configured to adjust the filter parameters in the preset noise reduction filter to the target filter parameters, wherein the noise reduction filter is used to perform noise reduction filtering processing on the input sound wave signal.
在一示例性的实施例中,所述第一确定模块还被配置为:In an exemplary embodiment, the first determining module is further configured to:
基于所述环境时域信号,确定环境时域信号总能量,其中,所述环境时域信号包括多个频点,所述环境时域信号总能量指的是所述环境时域信号中各个频点的能量之和;Determine the total energy of the environmental time domain signal based on the environmental time domain signal, wherein the environmental time domain signal includes a plurality of frequency points, and the total energy of the environmental time domain signal refers to each frequency in the environmental time domain signal the sum of the energies of the points;
基于所述耳道时域信号,确定耳道时域信号总能量,其中,所述耳道时域信号包括多个频点,所述耳道时域信号总能量指的是所述耳道时域信号中各个频点的能量之和;Based on the ear canal time domain signal, the total energy of the ear canal time domain signal is determined, wherein the ear canal time domain signal includes a plurality of frequency points, and the total energy of the ear canal time domain signal refers to the time of the ear canal The sum of the energy of each frequency point in the domain signal;
若所述环境时域信号总能量与所述耳道时域信号总能量的比值大于或等于预设的能量阈值,则判定满足预设的滤波器参数调整条件。If the ratio of the total energy of the environmental time domain signal to the total energy of the ear canal time domain signal is greater than or equal to a preset energy threshold, it is determined that the preset filter parameter adjustment conditions are met.
在一示例性的实施例中,所述第一确定模块还被配置为:In an exemplary embodiment, the first determining module is further configured to:
对所述环境时域信号和所述耳道时域信号分别进行傅里叶变换,获得环境频域信号和耳道频域信号,其中,所述环境频域信号指的是采用频域表示方式所表示的耳机周围环境中的声波信号,所述耳道频域信号指的是采用频域表示方式所表示的耳道内的声波信号;Fourier transform is performed on the environmental time domain signal and the ear canal time domain signal respectively to obtain the environmental frequency domain signal and the ear canal frequency domain signal, wherein the environmental frequency domain signal refers to the frequency domain representation The represented sound wave signal in the surrounding environment of the earphone, the ear canal frequency domain signal refers to the sound wave signal in the ear canal represented by the frequency domain representation;
基于所述环境频域信号和所述耳道频域信号以及预设的频率响应函数,获得交叉频率响应,所述交叉频率响应与频点相关;obtaining a cross frequency response based on the ambient frequency domain signal and the ear canal frequency domain signal and a preset frequency response function, where the cross frequency response is related to a frequency point;
根据所述交叉频率响应,获得参考降噪量;obtaining a reference noise reduction amount according to the cross frequency response;
根据所述参考降噪量,获得目标频段的平均降噪量,将所述平均降噪量确定为所述目标降噪量,其中,所述平均降噪量指的是所述目标频段中每个频点的能量的平均值。According to the reference noise reduction amount, the average noise reduction amount of the target frequency band is obtained, and the average noise reduction amount is determined as the target noise reduction amount, wherein the average noise reduction amount refers to the average noise reduction amount in the target frequency band. The average value of the energy of each frequency point.
在一示例性的实施例中,所述第二确定模块还被配置为:In an exemplary embodiment, the second determining module is further configured to:
获取预设的降噪阈值集合,所述预设降噪阈值集合包括多个由小至大排列的噪声参数值,多个所述噪声参数值构成多个降噪量阈值,所述降噪量阈值与所述声泄漏补偿档位对应;Obtain a preset noise reduction threshold set, where the preset noise reduction threshold set includes a plurality of noise parameter values arranged from small to large, and a plurality of the noise parameter values constitute a plurality of noise reduction amount thresholds, and the noise reduction amount The threshold value corresponds to the sound leakage compensation gear;
根据所述目标降噪量和所述预设的降噪阈值集合,确定所述目标降噪量所属的降噪量阈值;determining the noise reduction threshold to which the target noise reduction belongs according to the target noise reduction and the preset noise reduction threshold set;
根据所述目标降噪量所属的降噪量阈值,将与所述目标降噪量所属的降噪量阈值对应的声泄漏补偿档位确定为目标声泄露补偿档位。According to the noise reduction amount threshold to which the target noise reduction amount belongs, the sound leakage compensation gear position corresponding to the noise reduction amount threshold to which the target noise reduction amount belongs is determined as the target sound leakage compensation gear position.
在一示例性的实施例中降噪量阈值所述第三确定模块还被配置为:In an exemplary embodiment, the third determining module for the noise reduction amount threshold is further configured to:
获取芯片配置信息,所述芯片配置信息用于表征芯片中存储的滤波器系数是否支持更新;acquiring chip configuration information, where the chip configuration information is used to represent whether the filter coefficients stored in the chip support updating;
若所述芯片中存储的滤波器系数支持更新,基于所述目标声泄漏补偿档位,确定目标滤波器系数,将预设的降噪滤波器中的滤波器系数调整为所述目标滤波器系数;If the filter coefficients stored in the chip support updating, determine the target filter coefficients based on the target sound leakage compensation gear, and adjust the filter coefficients in the preset noise reduction filter to the target filter coefficients ;
若所述芯片中存储的滤波器系统不支持更新,基于所述目标声泄漏补偿档位,确定目标滤波器增益,将预设的降噪滤波器中的滤波器增益调整为所述目标滤波器增益。If the filter system stored in the chip does not support updating, determine the target filter gain based on the target sound leakage compensation gear, and adjust the filter gain in the preset noise reduction filter to the target filter gain.
在一示例性的实施例中,所述预设的降噪滤波器中的滤波器参数包括:In an exemplary embodiment, the filter parameters in the preset noise reduction filter include:
前馈滤波器中的滤波器参数;或者,the filter parameters in the feedforward filter; or,
前馈滤波器中的滤波器参数和反馈滤波器中的滤波器参数。Filter parameters in feedforward filters and filter parameters in feedback filters.
根据本公开实施例的第三方面,提供一种降噪耳机,所述耳机包括壳体和设置于所述壳体上的前馈麦克风、反馈麦克风、扬声器以及控制器:According to a third aspect of the embodiments of the present disclosure, a noise reduction earphone is provided, the earphone includes a housing and a feedforward microphone, a feedback microphone, a speaker, and a controller disposed on the housing:
所述前馈麦克风,用于采集耳机周围环境中的声波信号;The feedforward microphone is used to collect the sound wave signal in the surrounding environment of the earphone;
所述反馈麦克风,用于采集耳道内的声波信号;The feedback microphone is used to collect the sound wave signal in the ear canal;
所述扬声器用于播放声波信号;The loudspeaker is used for playing sound wave signal;
所述控制器分别与所述前馈麦克风、所述反馈麦克风和所述扬声器通信连接,所述控制器包括处理器和存储器,所述存储器存储有可被所述处理器执行的计算机程序指令,所述处理器被配置为调用所述计算机程序指令执行如本公开实施例的第一方面中任一项所述的方法。the controller is respectively connected in communication with the feedforward microphone, the feedback microphone and the speaker, the controller includes a processor and a memory, the memory stores computer program instructions executable by the processor, The processor is configured to invoke the computer program instructions to perform the method of any one of the first aspects of the embodiments of the present disclosure.
根据本公开实施例的第四方面,提供一种非临时性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器调用时,执行如本公开实施例的第一方面中任一项所述的方法。According to a fourth aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium on which computer program instructions are stored, characterized in that, when the computer program instructions are invoked by a processor, the execution is performed as implemented in the present disclosure. The method of any one of the first aspects of the examples.
采用本公开的上述方法,具有以下有益效果:使用本公开中的降噪控制方法,能够在耳机佩戴松弛时,及时调整预设的降噪滤波器中的滤波器参数进行声泄漏补偿,以保证良好的降噪效果,提升用户体验。The above method of the present disclosure has the following beneficial effects: using the noise reduction control method of the present disclosure, when the earphone is loosely worn, the filter parameters in the preset noise reduction filter can be adjusted in time to perform sound leakage compensation, so as to ensure Good noise reduction effect, improve user experience.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.
图1是根据一示例性的实施例示出的一种降噪耳机的示意图;1 is a schematic diagram of a noise-cancelling earphone according to an exemplary embodiment;
图2是根据一示例性的实施例示出的一种降噪控制方法的流程图;FIG. 2 is a flowchart illustrating a noise reduction control method according to an exemplary embodiment;
图3是根据一示例性的实施例示出的一种降噪控制方法的流程图;FIG. 3 is a flowchart illustrating a noise reduction control method according to an exemplary embodiment;
图4是根据一示例性的实施例示出的一种降噪控制方法的流程图;FIG. 4 is a flowchart showing a noise reduction control method according to an exemplary embodiment;
图5是根据一示例性的实施例示出的一种降噪控制方法的流程图;FIG. 5 is a flowchart illustrating a noise reduction control method according to an exemplary embodiment;
图6是根据一示例性的实施例示出的一种降噪控制方法的流程图;FIG. 6 is a flowchart showing a noise reduction control method according to an exemplary embodiment;
图7是根据一示例性的实施例示出的一种降噪控制方法的流程图;FIG. 7 is a flowchart showing a noise reduction control method according to an exemplary embodiment;
图8是根据一示例性的实施例示出的一种降噪控制装置的框图;FIG. 8 is a block diagram of a noise reduction control device according to an exemplary embodiment;
图9是根据一示例性的实施例示出的一种降噪耳机的框图。Fig. 9 is a block diagram of a noise-cancelling earphone according to an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with some aspects of the invention as recited in the appended claims.
耳机的“主动降噪”与“被动降噪”相对应:被动降噪指耳机利用外壳以物理隔档的方式削减传递到人耳处的环境噪声,所有的耳机均具备被动降噪功能;主动降噪指在被动降噪基础上,主动产生与噪声相位相反、能量相同或相近的声波,通过声波的干涉现象抵消一部分环境噪声。The "active noise reduction" of headphones corresponds to "passive noise reduction": passive noise reduction refers to the use of the shell to physically reduce the ambient noise transmitted to the human ear. All headphones have passive noise reduction; active noise reduction Noise reduction refers to actively generating sound waves with the opposite phase and the same or similar energy to the noise on the basis of passive noise reduction, and canceling part of the environmental noise through the interference phenomenon of the sound waves.
随着主动降噪技术的发展,降噪耳机逐步普及,其使用频次和使用时长大幅度增加。但是,耳机佩戴数十分钟乃至数小时后,佩戴逐渐松弛,耳机与耳朵的贴合度会下降,即耳机的佩戴贴合度会随着用户的日常活动逐渐下降。而降噪效果与佩戴状态密切相关,当佩戴状态发生变化时,降噪效果急剧下降。With the development of active noise reduction technology, noise reduction headphones have gradually become popular, and their frequency of use and duration of use have increased significantly. However, after wearing the headset for tens of minutes or even hours, the wearing will gradually loosen, and the fit between the headset and the ear will decrease, that is, the fit of the headset will gradually decrease with the user's daily activities. The noise reduction effect is closely related to the wearing state. When the wearing state changes, the noise reduction effect drops sharply.
现有技术中,出于芯片成本和系统稳定性综合考虑,降噪耳机全部采用固定滤波器配置,即主动降噪滤波器无法实时调整参数以实时适配佩戴情况,随着佩戴松弛将产生明显的声泄漏现象,用户在实用中往往又难以反复重新佩戴,因此,佩戴时间增加导致降噪效果下降。In the prior art, due to the comprehensive consideration of chip cost and system stability, all noise-cancelling headphones are configured with fixed filters, that is, the active noise-cancelling filter cannot adjust parameters in real time to adapt to the wearing situation in real time. It is often difficult for users to wear it again and again in practice. Therefore, the increase in wearing time leads to a decrease in the noise reduction effect.
图1是根据一示例性的实施例示出的一种降噪耳机的示意图,如图1所示,声学元器件主要包括:前馈(Feed-Forward,FF)麦克风1、反馈(Feed-Back,FB)麦克风2、扬声器3。前馈麦克风1置于耳机外部,实时采集外界环境噪声;反馈麦克风2置于耳机内部扬声器附近,实时检测耳道附近残留噪声。前馈麦克风1、扬声器3、前馈主动降噪芯片4组成了前馈主动降噪通路5;反馈麦克风2、扬声器3、反馈主动降噪芯片6组成了反馈主动降噪通路7。前馈主动降噪芯片4和反馈主动降噪芯片6由硬件实现的前馈滤波器和反馈滤波器组成,滤波器中的滤波器系数为可擦写参数,需要在使用前烧录相应系数。Fig. 1 is a schematic diagram of a noise reduction earphone according to an exemplary embodiment. As shown in Fig. 1 , the acoustic components mainly include: a feed-forward (Feed-Forward, FF)
本公开示例性的实施例中,提供了一种降噪控制方法,应用于耳机,耳机包括入耳式耳机、半入耳式耳机、头戴式耳机等多种耳机结构。图2是根据一示例性的实施例示出的一种降噪控制方法的流程图,如图2所示,降噪控制方法包括以下步骤:In an exemplary embodiment of the present disclosure, a noise reduction control method is provided, which is applied to an earphone, and the earphone includes various earphone structures such as an in-ear earphone, a semi-in-ear earphone, and a headphone. FIG. 2 is a flowchart of a noise reduction control method according to an exemplary embodiment. As shown in FIG. 2 , the noise reduction control method includes the following steps:
步骤S201,获取环境时域信号,其中,环境时域信号指的是采用时域表示方式所表示的耳机周围环境中的声波信号;Step S201, acquiring an environmental time-domain signal, wherein the environmental time-domain signal refers to a sound wave signal in the environment around the earphone represented by a time-domain representation;
步骤S202,获取耳道时域信号,其中,耳道时域信号指的是采用时域表示方式所表示的耳道内的声波信号;Step S202, acquiring an ear canal time domain signal, wherein the ear canal time domain signal refers to an acoustic wave signal in the ear canal represented by a time domain representation method;
步骤S203,若环境时域信号和耳道时域信号满足预设的滤波器参数调整条件,则基于环境时域信号和耳道时域信号以及预设的频率响应函数,确定目标降噪量;Step S203, if the environmental time domain signal and the ear canal time domain signal satisfy the preset filter parameter adjustment conditions, then determine the target noise reduction amount based on the environmental time domain signal and the ear canal time domain signal and the preset frequency response function;
步骤S204,根据预设的降噪配置信息和目标降噪量,将与目标降噪量对应的声泄漏补偿档位确定为目标声泄露补偿档位,其中,降噪配置信息用于表征降噪量阈值与声泄漏补偿档位之间的对应关系,降噪配置信息包括多个降噪量阈值和与每个降噪量阈值对应的声泄露补偿档位;Step S204, according to the preset noise reduction configuration information and the target noise reduction amount, determine the sound leakage compensation gear corresponding to the target noise reduction amount as the target sound leakage compensation gear, wherein the noise reduction configuration information is used to represent the noise reduction The corresponding relationship between the amount threshold and the sound leakage compensation gear, the noise reduction configuration information includes a plurality of noise reduction amount thresholds and the sound leakage compensation gear corresponding to each noise reduction amount threshold;
步骤S205,基于目标声泄漏补偿档位,确定目标滤波器参数;Step S205, determining target filter parameters based on the target sound leakage compensation gear;
步骤S206,将预设的降噪滤波器中的滤波器参数调整为目标滤波器参数,其中,降噪滤波器用于对输入的声波信号进行降噪滤波处理。Step S206: Adjust the filter parameters in the preset noise reduction filter to target filter parameters, wherein the noise reduction filter is used to perform noise reduction filtering processing on the input sound wave signal.
在步骤S201和步骤S202中,通过前馈麦克风采集环境时域信号,环境时域信号指的是采用时域表示方式所表示的耳机周围环境中的声波信号;通过反馈麦克风采集耳道时域信号,耳道时域信号指的是采用时域表示方式所表示的耳道内的声波信号。时域信号的采集时长可以根据实际需求设定,为了保证信号的准确性和时效性,采集时长一般在1~3秒之间,例如为2秒。时域信号的采样率也可以根据实际需求设定,为了方便地采集到信号,一般信号采样率至少为16kHz。In step S201 and step S202, the environmental time domain signal is collected by the feedforward microphone, and the environmental time domain signal refers to the sound wave signal in the environment around the earphone represented by the time domain representation; the ear canal time domain signal is collected by the feedback microphone , the ear canal time domain signal refers to the sound wave signal in the ear canal represented by the time domain representation. The acquisition duration of the time domain signal can be set according to actual needs. In order to ensure the accuracy and timeliness of the signal, the acquisition duration is generally between 1 and 3 seconds, for example, 2 seconds. The sampling rate of the time domain signal can also be set according to actual needs. In order to collect the signal conveniently, the general signal sampling rate is at least 16kHz.
在步骤S203中,当耳机为入耳式耳机时,由于降噪效果与耳机的佩戴的贴合度是相关的,当耳机处于完全贴合的佩戴状态时,主动降噪效果是最好的,此时不需要调整滤波器参数;而当耳机佩戴松弛时,例如用户佩戴耳机时间较长导致耳机与耳朵贴合度低时,降噪效果会变差,此时需要调整滤波器参数,以改善因贴合度不好造成的降噪效果差的问题。滤波器参数的调整条件是预先存储在耳机中的,根据环境时域信号和耳道时域信号,确定是否满足滤波器参数的调整条件。当确定满足滤波器参数调整条件时,基于获取的环境时域信号和耳道时域信号以及预设的频率响应函数,确定目标降噪量,目标降噪量为耳机在当前佩戴状态下的降噪量,可以通过任意能够计算出降噪量的公式得出。In step S203, when the earphone is an in-ear earphone, since the noise reduction effect is related to the fit of the earphone, when the earphone is in a fully fitted state, the active noise reduction effect is the best. It is not necessary to adjust the filter parameters; however, when the earphones are worn loosely, for example, when the user wears the earphones for a long time and the earphone and ear fit is low, the noise reduction effect will be poor. At this time, the filter parameters need to be adjusted to improve the The problem of poor noise reduction caused by poor fit. The adjustment conditions of the filter parameters are pre-stored in the earphone, and it is determined whether the adjustment conditions of the filter parameters are satisfied according to the environmental time domain signal and the ear canal time domain signal. When it is determined that the filter parameter adjustment conditions are met, the target noise reduction amount is determined based on the acquired environmental time domain signal and ear canal time domain signal and the preset frequency response function, and the target noise reduction amount is the reduction of the earphone in the current wearing state. The amount of noise can be obtained by any formula that can calculate the amount of noise reduction.
在步骤S204中,预设的降噪配置信息用于表征降噪量阈值与声泄漏补偿档位之间的对应关系,预先存储在耳机的存储器中,根据目标降噪量所属的降噪量阈值范围,确定对应的声泄漏补偿档位,即为目标声泄漏补偿档位。可以根据不同的耳机结构设置不同的声泄漏补偿档位,例如声泄漏补偿档位总共有0档~X档,不同档位对应不同的耳机佩戴松弛度,从0档到X档,耳机的佩戴松弛程度越来越松,即耳机与耳朵的贴合度越来越差,初始档位为0档,初始档位为耳机佩戴贴合度最高时的档位,X档为耳机佩戴贴合度最低时的档位。每个声泄漏补偿档位对应一个降噪量阈值,例如0档时对应的降噪量阈值为ε0,即如果目标降噪量大于ε0时,则对应的声泄漏补偿档位为0档。降噪配置信息包括多个降噪量阈值和与每个降噪量阈值对应的声泄露补偿档位。由于不同耳机的降噪效果不同,降噪量阈值与声泄漏补偿档位之间的对应关系可以根据不同的耳机进行自行设定,以能够在不同的佩戴松弛度下通过不同的声泄漏补偿来提高降噪量,提升降噪效果。In step S204, the preset noise reduction configuration information is used to represent the corresponding relationship between the noise reduction amount threshold and the sound leakage compensation gear, and is pre-stored in the memory of the earphone, according to the noise reduction amount threshold to which the target noise reduction amount belongs. range, and determine the corresponding sound leakage compensation gear, which is the target sound leakage compensation gear. Different sound leakage compensation gears can be set according to different headphone structures. For example, the sound leakage compensation gears have a total of 0 to X gears. Different gears correspond to different earphone wearing slack. The degree of slack is getting looser and looser, that is, the fit between the earphone and the ear is getting worse and worse. The initial gear is 0, the initial gear is the gear when the earphone is worn with the highest fit, and the X gear is the fit of the earphone. the lowest gear. Each sound leakage compensation gear corresponds to a noise reduction threshold. For example, when the noise reduction threshold is 0, the corresponding noise reduction threshold is ε 0 , that is, if the target noise reduction is greater than ε 0 , the corresponding sound leakage compensation gear is 0. . The noise reduction configuration information includes a plurality of noise reduction amount thresholds and a sound leakage compensation gear corresponding to each noise reduction amount threshold. Due to the different noise reduction effects of different headphones, the corresponding relationship between the noise reduction threshold and the sound leakage compensation gear can be set according to different headphones, so as to be able to use different sound leakage compensation under different wearing slack. Increase the amount of noise reduction and improve the noise reduction effect.
在步骤S205和步骤S206中,不同的声泄漏补偿档位对应不同的滤波器参数,基于目标降噪量对应的声泄漏补偿档位,即目标声泄漏档位,确定目标滤波器参数。将预设的降噪滤波器中的滤波器参数调整为目标滤波器参数,降噪滤波器为耳机结构中降噪芯片的主要硬件结构,耳机中的滤波器包括前馈滤波器和反馈滤波器,用于对输入的声波信号进行降噪滤波处理,调整之后的目标滤波器参数能够通过声泄漏补偿的方式提高降噪量,提升降噪效果。在此,需要说明的是,基于主动降噪的原理,该步骤中涉及到的提高降噪量是指通过改变输出的用于抵消外界噪声信号的主动噪声信号的增益,或者,改变用于对主动噪声信号进行滤波的装置的滤波特性。In steps S205 and S206, different sound leakage compensation gears correspond to different filter parameters, and the target filter parameters are determined based on the sound leakage compensation gear corresponding to the target noise reduction amount, ie, the target sound leakage gear. Adjust the filter parameters in the preset noise reduction filter to the target filter parameters. The noise reduction filter is the main hardware structure of the noise reduction chip in the headphone structure. The filters in the headphone include feedforward filters and feedback filters. , which is used to perform noise reduction filtering processing on the input sound wave signal. The adjusted target filter parameters can increase the noise reduction amount and improve the noise reduction effect by means of sound leakage compensation. Here, it should be noted that, based on the principle of active noise reduction, increasing the noise reduction amount involved in this step refers to changing the gain of the output active noise signal used to cancel the external noise signal, or changing the gain used to offset the external noise signal. Filtering characteristics of a device for filtering active noise signals.
调整滤波器参数时,可以只调整前馈滤波器的滤波器参数,也可以同时调整前馈滤波器的滤波器参数和反馈滤波器的滤波器参数。由于反馈降噪效果太强可能会造成啸叫、设备腔体共振等异常情况,因此,根据耳机的结构,比如耳机的声腔结构、元器件性能等,确定是否调整反馈滤波器的滤波器参数。同时调整前馈滤波器的滤波器参数和反馈滤波器的滤波器参数时,降噪效果变化更明显,调整后的降噪效果更好。When adjusting the filter parameters, you can only adjust the filter parameters of the feedforward filter, or you can adjust the filter parameters of the feedforward filter and the filter parameters of the feedback filter at the same time. Since the feedback noise reduction effect is too strong, it may cause abnormal conditions such as whistling and equipment cavity resonance. Therefore, it is determined whether to adjust the filter parameters of the feedback filter according to the structure of the headset, such as the acoustic cavity structure of the headset and the performance of components. When adjusting the filter parameters of the feedforward filter and the filter parameters of the feedback filter at the same time, the noise reduction effect changes more obviously, and the adjusted noise reduction effect is better.
在本公开示例性的实施例中,获取环境时域信号和耳道时域信号,当环境时域信号和耳道时域信号满足预设的滤波器参数调整条件时,基于环境时域信号和耳道时域信号,确定目标降噪量,根据降噪量阈值与声泄漏补偿档位之间的对应关系和目标降噪量,确定目标降噪量对应的声泄漏补偿档位为目标声泄漏补偿档位,基于目标声泄漏补偿档位,确定目标滤波器参数,将预设的降噪滤波器中的滤波器参数调整为目标滤波器参数,能够在耳机佩戴松弛时,及时调整预设的降噪滤波器中的滤波器参数进行声泄漏补偿,以保证良好的降噪效果,提升用户体验。In an exemplary embodiment of the present disclosure, the environmental time domain signal and the ear canal time domain signal are acquired, and when the environmental time domain signal and the ear canal time domain signal satisfy the preset filter parameter adjustment conditions, based on the environmental time domain signal and the ear canal time domain signal The ear canal time domain signal is used to determine the target noise reduction amount. According to the corresponding relationship between the noise reduction amount threshold and the sound leakage compensation gear and the target noise reduction amount, the sound leakage compensation gear corresponding to the target noise reduction amount is determined as the target sound leakage. The compensation gear, based on the target sound leakage compensation gear, determines the target filter parameters, and adjusts the filter parameters in the preset noise reduction filter to the target filter parameters. The filter parameters in the noise reduction filter perform sound leakage compensation to ensure a good noise reduction effect and improve user experience.
本公开示例性的实施例中,提供了一种降噪控制方法,应用于耳机,耳机包括入耳式耳机、半入耳式耳机、头戴式耳机等多种耳机结构。图3是根据一示例性的实施例示出的一种降噪控制方法的流程图,如图3所示,降噪控制方法包括以下步骤:In an exemplary embodiment of the present disclosure, a noise reduction control method is provided, which is applied to an earphone, and the earphone includes various earphone structures such as an in-ear earphone, a semi-in-ear earphone, and a headphone. FIG. 3 is a flowchart of a noise reduction control method according to an exemplary embodiment. As shown in FIG. 3 , the noise reduction control method includes the following steps:
步骤S301,获取环境时域信号,其中,环境时域信号指的是采用时域表示方式所表示的耳机周围环境中的声波信号;Step S301, acquiring an environmental time domain signal, wherein the environmental time domain signal refers to a sound wave signal in the environment around the earphone represented by a time domain representation method;
步骤S302,获取耳道时域信号,其中,耳道时域信号指的是采用时域表示方式所表示的耳道内的声波信号;Step S302, acquiring an ear canal time domain signal, wherein the ear canal time domain signal refers to an acoustic wave signal in the ear canal represented by a time domain representation method;
步骤S303,基于环境时域信号,确定环境时域信号总能量,其中,环境时域信号包括多个频点,环境时域信号总能量指的是环境时域信号中各个频点的能量之和;Step S303, based on the environmental time domain signal, determine the total energy of the environmental time domain signal, wherein the environmental time domain signal includes a plurality of frequency points, and the total energy of the environmental time domain signal refers to the sum of the energy of each frequency point in the environmental time domain signal ;
步骤S304,基于耳道时域信号,确定耳道时域信号总能量,其中,耳道时域信号包括多个频点,耳道时域信号总能量指的是耳道时域信号中各个频点的能量之和;Step S304, based on the ear canal time domain signal, determine the total energy of the ear canal time domain signal, wherein the ear canal time domain signal includes a plurality of frequency points, and the total energy of the ear canal time domain signal refers to each frequency in the ear canal time domain signal. the sum of the energies of the points;
步骤S305,若环境时域信号总能量与耳道时域信号总能量的比值大于或等于预设的能量阈值,则判定满足预设的滤波器参数调整条件;Step S305, if the ratio of the total energy of the environmental time domain signal to the total energy of the ear canal time domain signal is greater than or equal to a preset energy threshold, it is determined that the preset filter parameter adjustment conditions are met;
步骤S306,若环境时域信号和耳道时域信号满足预设的滤波器参数调整条件,则基于环境时域信号和耳道时域信号以及预设的频率响应函数,确定目标降噪量;Step S306, if the environmental time domain signal and the ear canal time domain signal satisfy the preset filter parameter adjustment conditions, then determine the target noise reduction amount based on the environmental time domain signal and the ear canal time domain signal and the preset frequency response function;
步骤S307,根据预设的降噪配置信息和目标降噪量,将与目标降噪量对应的声泄漏补偿档位确定为目标声泄露补偿档位,其中,降噪配置信息用于表征降噪量阈值与声泄漏补偿档位之间的对应关系,降噪配置信息包括多个降噪量阈值和与每个降噪量阈值对应的声泄露补偿档位;Step S307, according to the preset noise reduction configuration information and the target noise reduction amount, determine the sound leakage compensation gear corresponding to the target noise reduction amount as the target sound leakage compensation gear, wherein the noise reduction configuration information is used to represent the noise reduction The corresponding relationship between the amount threshold and the sound leakage compensation gear, the noise reduction configuration information includes a plurality of noise reduction amount thresholds and the sound leakage compensation gear corresponding to each noise reduction amount threshold;
步骤S308,基于目标声泄漏补偿档位,确定目标滤波器参数;Step S308, determining target filter parameters based on the target acoustic leakage compensation gear;
步骤S309,将预设的降噪滤波器中的滤波器参数调整为目标滤波器参数,其中,降噪滤波器用于对输入的声波信号进行降噪滤波处理。Step S309: Adjust the filter parameters in the preset noise reduction filter to target filter parameters, wherein the noise reduction filter is used to perform noise reduction filtering processing on the input sound wave signal.
步骤S306-步骤S309与步骤S203-步骤S206的内容相同,步骤S301-步骤S302与步骤S201-步骤S202的内容相同,在此不再赘述。Steps S306 - S309 are the same as steps S203 - S206 , and steps S301 - S302 are the same as steps S201 - S202 , and will not be repeated here.
在步骤S303和步骤S304中,分别通过环境时域信号和耳道时域信号确定环境时域信号总能量和耳道时域信号总能量,需要说明的是,步骤S303和步骤S304的先后顺序不做限制。In step S303 and step S304, the total energy of the environmental time domain signal and the total energy of the ear canal time domain signal are determined respectively by the environmental time domain signal and the ear canal time domain signal. It should be noted that the order of steps S303 and S304 is not the same. make restrictions.
获取到环境时域信号和耳道时域信号后,通过对环境时域信号和耳道时域信号进行分帧加窗处理,可以将环境时域信号分成多帧信号,也将耳道时域信号分成多帧信号,在后续相关计算中,以每一帧为单位进行逐帧计算。After obtaining the environmental time domain signal and the ear canal time domain signal, the environmental time domain signal and the ear canal time domain signal can be divided into frames and windowed, and the environmental time domain signal can be divided into multi-frame signals. The signal is divided into multi-frame signals, and in the subsequent correlation calculation, the frame-by-frame calculation is performed with each frame as the unit.
例如,时域信号(可以是环境时域信号,也可以是耳道时域信号)共有M帧,即分帧加窗处理后,分为M个窗。每帧信号共有N个采样点,也即在进行时域信号采样时,每一帧中包含N个时域采样点。前馈麦克风的环境时域信号记为sFF(m,n),反馈麦克风的耳道时域信号记为sFB(m,n)。其中,m为帧索引,即一段时域信号中M帧中的第m帧信号,m∈[0,M)且 表示整数;n为单帧信号内的采样点索引,即第m帧信号的第n个采样点,n∈[0,N)且 表示整数。M和N根据信号采样率、应用平台等因素不同而变化。为了防止块效应,便于频域计算,帧与帧之间存在一部分重叠的采样点,即前一帧的尾部数据与下一帧头部数据相同,重叠比例记为δ,δ∈(0%,100%)。δ也会根据信号采样率等其他平台因素不同而改变。即在对环境时域信号和耳道时域信号进行分帧加窗处理时,具体为重叠加窗处理,相邻的窗之间存在重叠,重叠率为1/2。For example, a time domain signal (which may be an environmental time domain signal or an ear canal time domain signal) has a total of M frames, that is, after frame-by-frame windowing processing, it is divided into M windows. Each frame of signal has N sampling points in total, that is, when the time domain signal is sampled, each frame includes N time domain sampling points. The ambient time domain signal of the feedforward microphone is denoted as s FF (m,n), and the ear canal time domain signal of the feedback microphone is denoted as s FB (m,n). Among them, m is the frame index, that is, the mth frame signal in M frames in a time domain signal, m∈[0,M) and Represents an integer; n is the sampling point index in a single frame signal, that is, the nth sampling point of the mth frame signal, n∈[0,N) and Represents an integer. M and N vary according to the signal sampling rate, application platform and other factors. In order to prevent block effect and facilitate frequency domain calculation, there are some overlapping sampling points between frames, that is, the tail data of the previous frame is the same as the header data of the next frame, and the overlap ratio is recorded as δ, δ∈(0%, 100%). δ will also vary depending on other platform factors such as the signal sample rate. That is, when the ambient time domain signal and the ear canal time domain signal are subjected to frame-by-frame windowing processing, specifically overlapping windowing processing, there is overlap between adjacent windows, and the overlap rate is 1/2.
在一示例中,当信号采样率为16kHz时,令M=60,N=512,δ=50%。即该示例中,对采样率为16kHz的一段声信号,进行分帧加窗处理后,该段声信号在时域中被分割为60帧,每帧中包含512个时域采样点,相邻帧之间的采样点的重合率为50%。In an example, when the signal sampling rate is 16 kHz, let M=60, N=512, δ=50%. That is, in this example, a segment of acoustic signal with a sampling rate of 16 kHz is divided into 60 frames in the time domain after framed and windowed, and each frame contains 512 sampling points in the time domain. The coincidence rate of sample points between frames is 50%.
由于以每一帧为单位进行逐帧计算。每一帧环境时域信号包括多个频点,即多个采样点,每一帧环境时域信号总能量为环境时域信号中各个频点的能量之和,即每个采样点的能量之和;每一帧耳道时域信号包括多个频点,即多个采样点,每一帧耳道时域信号总能量为耳道时域信号中各个频点的能量之和,即每个采样点的能量之和。计算出每一帧的总能量之后,再将所有帧的能量之和相加得出环境时域信号的总能量和耳道时域信号的总能量。环境时域信号的总能量,记为EFF,耳道时域信号的总能量,记为EFB,则:Since the frame-by-frame calculation is performed in units of each frame. Each frame of ambient time-domain signal includes multiple frequency points, that is, multiple sampling points. The total energy of each frame of ambient time-domain signal is the sum of the energy of each frequency point in the ambient time-domain signal, that is, the sum of the energy of each sampling point. and; each frame of ear canal time-domain signal includes multiple frequency points, that is, multiple sampling points, and the total energy of each frame of ear canal time-domain signal is the sum of the energy of each frequency point in the ear canal time-domain signal, that is, each The sum of the energies of the sampling points. After calculating the total energy of each frame, the sum of the energy of all frames is added to obtain the total energy of the ambient time domain signal and the total energy of the ear canal time domain signal. The total energy of the environmental time domain signal, denoted as E FF , the total energy of the ear canal time domain signal, denoted as E FB , then:
其中,sFB(m,n)—耳道时域信号;Among them, s FB (m,n)—ear canal time domain signal;
sFF(m,n)—环境时域信号;s FF (m,n)—environmental time domain signal;
M—时域信号经过分帧加窗后,获得的帧信号的数量;M—the number of frame signals obtained after the time domain signal is framed and windowed;
N—每帧信号中包含的时域采样点的数量;N—the number of time domain sampling points contained in each frame of signal;
m—M帧中的第m个帧;m—the mth frame in M frames;
n—N个时域采样点中的第n个采样点。n—the nth sampling point among the N time domain sampling points.
在步骤S305中,根据环境时域信号的总能量EFF与耳道时域信号的总能量EFB,获得能量比值,能量比值记为θ,则:In step S305, the energy ratio is obtained according to the total energy E FF of the environmental time domain signal and the total energy E FB of the ear canal time domain signal, and the energy ratio is denoted as θ, then:
预设的能量阈值为环境时域信号总能量与耳道时域信号总能量的比值的阈值,通过预设的能量阈值确定是否满足预设的滤波器参数调整条件。环境时域信号总能量和耳道时域信号总能量能够反映当前耳机的使用状态,使用状态包括触摸耳机、剧烈运动、播放声源音量过大等,当耳机处于上述使用状态时,由于佩戴不稳定,滤波器参数也会不稳定,此时不需要对其进行调整。耳道时域信号总能量与使用状态的相关度大于环境时域信号总能量与使用状态的相关度,使用状态不稳定时,耳道时域信号总能量的上升幅度会大于环境时域信号总能量的上升幅度,此时能量比值会变小。因此,当能量比值大于或等于预设的能量阈值时,判定满足预设的滤波器参数调整条件;当能量比值小于预设能量阈值时,使用状态为不稳定状态,判定不满足预设的滤波器参数调整条件。The preset energy threshold is the threshold of the ratio of the total energy of the environmental time domain signal to the total energy of the ear canal time domain signal, and whether the preset filter parameter adjustment conditions are met is determined by the preset energy threshold. The total energy of the ambient time domain signal and the total energy of the ear canal time domain signal can reflect the current use state of the headset, including touching the headset, strenuous exercise, and playing the sound source volume too loudly. stable, the filter parameters will also be unstable and do not need to be adjusted at this time. The correlation between the total energy of the ear canal time domain signal and the use state is greater than the correlation between the total energy of the ambient time domain signal and the use state. When the use state is unstable, the total energy of the ear canal time domain signal will rise more than the total energy of the ambient time domain signal. The increase in energy, the energy ratio will become smaller at this time. Therefore, when the energy ratio is greater than or equal to the preset energy threshold, it is determined that the preset filter parameter adjustment conditions are met; when the energy ratio is less than the preset energy threshold, the use state is unstable, and it is determined that the preset filter is not satisfied. conditions for adjusting the parameters of the controller.
例如,预设能量阈值记为θ0,当θ≥θ0时,满足预设的滤波器参数调整条件;当θ<θ0时,不满足预设的滤波器参数调整条件。在一示例中,预设的能量阈值θ0=1/3,根据实际情况和本实施例中的方法应用的耳机设备不同,预设的能量阈值的取值可以进行调整。并且,预设的能量阈值在耳机出厂前可以采用多次试验确定,也可以根据经验值确定并存储至耳机中。For example, the preset energy threshold is recorded as θ 0 . When θ≥θ 0 , the preset filter parameter adjustment conditions are satisfied; when θ<θ 0 , the preset filter parameter adjustment conditions are not met. In an example, the preset energy threshold θ 0 =1/3, and the value of the preset energy threshold can be adjusted according to the actual situation and different earphone devices to which the method in this embodiment is applied. Moreover, the preset energy threshold may be determined by multiple tests before the earphone leaves the factory, or may be determined and stored in the earphone according to an empirical value.
在本公开示例性的实施例中,通过环境时域信号总能量和耳道时域信号总能量的能量比值和预设的能量阈值,判定满足预设的滤波器参数调整条件时,再对滤波器参数进行调整,能够确保此时耳机的使用状态是稳定状态,避免出现因使用状态不稳定导致的频繁调整滤波器参数,给用户带来较差的听感体验。In an exemplary embodiment of the present disclosure, when it is determined that the preset filter parameter adjustment conditions are met, the filter Adjusting the parameters of the filter can ensure that the use state of the headset is stable at this time, and avoid frequent adjustment of filter parameters due to unstable use state, which brings a poor listening experience to the user.
本公开示例性的实施例中,提供了一种降噪控制方法,应用于耳机,耳机包括入耳式耳机、半入耳式耳机、头戴式耳机等多种耳机结构。图4是根据一示例性的实施例示出的一种降噪控制方法的流程图,如图4所示,降噪控制方法包括以下步骤:In an exemplary embodiment of the present disclosure, a noise reduction control method is provided, which is applied to an earphone, and the earphone includes various earphone structures such as an in-ear earphone, a semi-in-ear earphone, and a headphone. FIG. 4 is a flowchart of a noise reduction control method according to an exemplary embodiment. As shown in FIG. 4 , the noise reduction control method includes the following steps:
步骤S401,获取环境时域信号,其中,环境时域信号指的是采用时域表示方式所表示的耳机周围环境中的声波信号;Step S401, acquiring an environmental time domain signal, wherein the environmental time domain signal refers to a sound wave signal in the environment around the earphone represented by a time domain representation method;
步骤S402,获取耳道时域信号,其中,耳道时域信号指的是采用时域表示方式所表示的耳道内的声波信号;Step S402, acquiring an ear canal time domain signal, wherein the ear canal time domain signal refers to an acoustic wave signal in the ear canal represented by a time domain representation method;
步骤S403,若环境时域信号和耳道时域信号满足预设的滤波器参数调整条件,对环境时域信号和耳道时域信号分别进行傅里叶变换,获得环境频域信号和耳道频域信号,其中,所述环境频域信号指的是采用频域表示方式所表示的耳机周围环境中的声波信号,所述耳道频域信号指的是采用频域表示方式所表示的耳道内的声波信号;Step S403, if the environmental time domain signal and the ear canal time domain signal satisfy the preset filter parameter adjustment conditions, perform Fourier transform on the environmental time domain signal and the ear canal time domain signal respectively to obtain the environmental frequency domain signal and the ear canal time domain signal. Frequency domain signal, wherein the environmental frequency domain signal refers to the sound wave signal in the surrounding environment of the earphone represented by the frequency domain representation, and the ear canal frequency domain signal refers to the ear canal represented by the frequency domain representation. The acoustic signal in the channel;
步骤S404,基于环境频域信号和耳道频域信号以及预设的频率响应函数,获得交叉频率响应,交叉频率响应与频点相关;Step S404, based on the environmental frequency domain signal, the ear canal frequency domain signal and the preset frequency response function, obtain a crossover frequency response, and the crossover frequency response is related to the frequency point;
步骤S405,根据交叉频率响应,获得参考降噪量;Step S405, obtaining a reference noise reduction amount according to the cross frequency response;
步骤S406,根据参考降噪量,获得目标频段的平均降噪量,将平均降噪量确定为目标降噪量,其中,所述平均降噪量指的是所述目标频段中每个频点的能量的平均值;Step S406, obtain the average noise reduction amount of the target frequency band according to the reference noise reduction amount, and determine the average noise reduction amount as the target noise reduction amount, wherein the average noise reduction amount refers to each frequency point in the target frequency band The average value of the energy;
步骤S407,根据预设的降噪配置信息和目标降噪量,将与目标降噪量对应的声泄漏补偿档位确定为目标声泄露补偿档位,其中,降噪配置信息用于表征降噪量阈值与声泄漏补偿档位之间的对应关系,降噪配置信息包括多个降噪量阈值和与每个降噪量阈值对应的声泄露补偿档位;Step S407, according to the preset noise reduction configuration information and the target noise reduction amount, determine the sound leakage compensation gear corresponding to the target noise reduction amount as the target sound leakage compensation gear, wherein the noise reduction configuration information is used to represent the noise reduction The corresponding relationship between the amount threshold and the sound leakage compensation gear, the noise reduction configuration information includes a plurality of noise reduction amount thresholds and the sound leakage compensation gear corresponding to each noise reduction amount threshold;
步骤S408,基于目标声泄漏补偿档位,确定目标滤波器参数;Step S408, determining target filter parameters based on the target acoustic leakage compensation gear;
步骤S409,将预设的降噪滤波器中的滤波器参数调整为目标滤波器参数,其中,降噪滤波器用于对输入的声波信号进行降噪滤波处理。Step S409: Adjust the filter parameters in the preset noise reduction filter to target filter parameters, wherein the noise reduction filter is used to perform noise reduction filtering processing on the input sound wave signal.
步骤S401-步骤S402与步骤S201-步骤S202的内容相同,步骤S407-步骤S409与步骤S204-步骤S206的内容相同,在此不再赘述。Steps S401 - S402 are the same as steps S201 - S202 , and steps S407 - S409 are the same as steps S204 - S206 , and will not be repeated here.
在步骤S403中,当环境时域信号和耳道时域信号满足预设的滤波器参数调整条件时,对环境时域信号和耳道时域信号分别进行傅里叶变换,为了计算方便,可以使用快速傅里叶变换,也即离散傅里叶变换,获得环境频域信号和耳道频域信号。环境频域信号指的是采用频域表示方式所表示的耳机周围环境中的声波信号,耳道频域信号指的是采用频域表示方式所表示的耳道内的声波信号。在进行快速傅里叶变换之前,为了减少泄漏误差,对环境时域信号和耳道时域信号分别叠加窗函数,窗函数可以根据实际需求选择,例如使用布莱克曼哈里斯(Blackman-Harris)窗。In step S403, when the environmental time domain signal and the ear canal time domain signal satisfy the preset filter parameter adjustment conditions, Fourier transform is performed on the environmental time domain signal and the ear canal time domain signal respectively. The ambient frequency domain signal and the ear canal frequency domain signal are obtained using the fast Fourier transform, namely the discrete Fourier transform. The environmental frequency domain signal refers to the sound wave signal in the surrounding environment of the earphone represented by the frequency domain representation, and the ear canal frequency domain signal refers to the sound wave signal in the ear canal represented by the frequency domain representation. Before performing the fast Fourier transform, in order to reduce the leakage error, a window function is superimposed on the ambient time domain signal and the ear canal time domain signal respectively. The window function can be selected according to actual needs, for example, using a Blackman-Harris window. .
环境时域信号记为sFF(m,n),耳道时域信号记为sFB(m,n),窗函数记为w(n),环境频域信号记为SFF(m,k),耳道频域信号记为SFB(m,k),则:The ambient time domain signal is denoted as s FF (m,n), the ear canal time domain signal is denoted as s FB (m,n), the window function is denoted as w(n), and the ambient frequency domain signal is denoted as S FF (m,k ), the ear canal frequency domain signal is denoted as S FB (m,k), then:
其中,为离散傅里叶变换运算,k为傅里叶变换的尺度,即进行傅里叶变换后会生成k个频点的频谱,k的值可以根据实际需求设定,例如每帧时域信号中包括N个信号采样点时,k=N。SFF(m,k)和SFB(m,k)表示第m个帧中的第k个频点的频域信号。当然,可以理解的是,根据需求可以对傅里叶变换的尺度k进行调整,当k的取值越大时,经过傅里叶变换后频谱中的频点的数量越多,对声音信号在频域上的分析越精确。in, For the discrete Fourier transform operation, k is the scale of the Fourier transform, that is, the spectrum of k frequency points will be generated after the Fourier transform, and the value of k can be set according to actual needs, such as in the time domain signal of each frame. When including N signal sampling points, k=N. S FF (m, k) and S FB (m, k) represent the frequency domain signal of the k th frequency point in the m th frame. Of course, it can be understood that the scale k of the Fourier transform can be adjusted according to the requirements. When the value of k is larger, the number of frequency points in the spectrum after the Fourier transform is greater, and the sound signal is in the The analysis in the frequency domain is more accurate.
在步骤S404中,基于环境频域信号和耳道频域信号以及预设的频率响应函数,获得交叉频率响应,交叉频率响应与频点相关。In step S404, based on the environmental frequency domain signal, the ear canal frequency domain signal and the preset frequency response function, a crossover frequency response is obtained, and the crossover frequency response is related to a frequency point.
第k个频点的三种交叉频率响应分别记为H0(k)、H1(k)和H2(k),则:The three cross-frequency responses of the kth frequency point are denoted as H 0 (k), H 1 (k) and H 2 (k) respectively, then:
其中,表示求复数实部,表示求复数虚部;in, means to find the real part of a complex number, means to find the imaginary part of a complex number;
sFB(m,n)—耳道时域信号;SFF(m,k)—环境频域信号;SFB(m,k)—耳道频域信号;s FB (m,n)—ear canal time domain signal; S FF (m,k)—environmental frequency domain signal; S FB (m,k)—ear canal frequency domain signal;
M—时域信号经过分帧加窗后,获得的帧信号的数量;M—the number of frame signals obtained after the time domain signal is framed and windowed;
m—M帧中的第m个帧;m—the mth frame in M frames;
k—第m个帧中的第k个频点;k—the kth frequency point in the mth frame;
n—N个时域采样点中的第n个采样点。n—the nth sampling point among the N time domain sampling points.
在步骤S405中,根据交叉频率响应,获得参考降噪量,第k个频点的参考降噪量记为H(k),则:In step S405, the reference noise reduction amount is obtained according to the cross frequency response, and the reference noise reduction amount of the kth frequency point is denoted as H(k), then:
其中H(k)的单位为dB。where H(k) is in dB.
在步骤S406中,根据参考降噪量,获得目标频段的平均降噪量,将平均降噪量确定为目标降噪量。平均降噪量指的是目标频段中每个频点的能量的平均值,目标频段为音频设备的最大降噪深度频段,例如为50~300Hz之间。该频段中的目标降噪量记为ε,则:In step S406, the average noise reduction amount of the target frequency band is obtained according to the reference noise reduction amount, and the average noise reduction amount is determined as the target noise reduction amount. The average noise reduction amount refers to the average value of the energy of each frequency point in the target frequency band, and the target frequency band is the maximum noise reduction depth frequency band of the audio device, for example, between 50 and 300 Hz. The target noise reduction amount in this frequency band is recorded as ε, then:
其中,ε的单位为dB,k0、k1为k个频点的频谱中最接近50Hz和300Hz的频点,可以根据实际需求进行微调,目标频段中所有频点的降噪量的平均值即为目标降噪量。比如,当经过傅里叶变换后获得的频谱中包括50Hz和300Hz的谱线时,则k0为50Hz,k1为100Hz。再比如,当经过傅里叶变换后获得的频谱中没有包括50Hz和300Hz的谱线时,包含了49Hz、49Hz、52Hz、280Hz、298Hz、306Hz的谱线时,则k0为49Hz,k1为298Hz。由于在对时域信号进行离散傅里叶变换,将时域信号转换为频域信号时,使用的变换尺度不同,将导致频谱中的频点的总数不同,每个频点对应的物理频率也不同,实际实施过程中k0、k1和降噪量评价频段(也即目标频段)可以根据耳机情况微调Among them, the unit of ε is dB, k 0 and k 1 are the frequency points closest to 50Hz and 300Hz in the spectrum of k frequency points, which can be fine-tuned according to actual needs. The average value of noise reduction of all frequency points in the target frequency band is the target noise reduction amount. For example, when the spectrum obtained after Fourier transform includes spectral lines of 50 Hz and 300 Hz, then k 0 is 50 Hz, and k 1 is 100 Hz. For another example, when the spectrum obtained after Fourier transform does not include the spectral lines of 50Hz and 300Hz, but includes the spectral lines of 49Hz, 49Hz, 52Hz, 280Hz, 298Hz, and 306Hz, then k 0 is 49 Hz, and k 1 is 298Hz. Since the discrete Fourier transform is performed on the time-domain signal and the time-domain signal is converted into a frequency-domain signal, the transform scales used are different, which will lead to different total number of frequency points in the spectrum, and the physical frequency corresponding to each frequency point is also different. Different, in the actual implementation process k 0 , k 1 and the noise reduction evaluation frequency band (that is, the target frequency band) can be fine-tuned according to the earphone situation
本公开示例性的实施例中,提供一种降噪控制方法,应用于耳机,耳机包括入耳式耳机、半入耳式耳机、头戴式耳机等多种耳机结构。图5是根据一示例性的实施例示出的一种降噪控制方法的流程图,如图5所示,降噪控制方法包括以下步骤:In an exemplary embodiment of the present disclosure, a noise reduction control method is provided, which is applied to an earphone, and the earphone includes various earphone structures such as an in-ear earphone, a semi-in-ear earphone, and a headphone. Fig. 5 is a flowchart showing a noise reduction control method according to an exemplary embodiment. As shown in Fig. 5, the noise reduction control method includes the following steps:
步骤S501,获取环境时域信号,其中,环境时域信号指的是采用时域表示方式所表示的耳机周围环境中的声波信号;Step S501, acquiring an environmental time domain signal, wherein the environmental time domain signal refers to a sound wave signal in the environment around the earphone represented by a time domain representation method;
步骤S502,获取耳道时域信号,其中,耳道时域信号指的是采用时域表示方式所表示的耳道内的声波信号;Step S502, acquiring an ear canal time domain signal, wherein the ear canal time domain signal refers to an acoustic wave signal in the ear canal represented by a time domain representation method;
步骤S503,若环境时域信号和耳道时域信号满足预设的滤波器参数调整条件,则基于环境时域信号和耳道时域信号以及预设的频率响应函数,确定目标降噪量;Step S503, if the environmental time domain signal and the ear canal time domain signal satisfy the preset filter parameter adjustment conditions, then determine the target noise reduction amount based on the environmental time domain signal and the ear canal time domain signal and the preset frequency response function;
步骤S504,获取预设的降噪阈值集合,预设降噪阈值集合包括多个由小至大排列的噪声参数值,多个噪声参数值构成多个降噪量阈值,降噪量阈值与所述声泄漏补偿档位对应;Step S504, obtain a preset noise reduction threshold set, the preset noise reduction threshold set includes a plurality of noise parameter values arranged from small to large, and the plurality of noise parameter values constitute a plurality of noise reduction amount thresholds, and the noise reduction amount threshold is related to all noise reduction thresholds. Corresponding to the sound leakage compensation gear;
步骤S505,根据目标降噪量和预设的降噪阈值集合,确定目标降噪量所属的降噪量阈值;Step S505, according to the target noise reduction amount and the preset noise reduction threshold set, determine the noise reduction amount threshold to which the target noise reduction amount belongs;
步骤S506,根据目标降噪量所属的降噪量阈值,将与目标降噪量所属的降噪量阈值对应的声泄漏补偿档位确定为目标声泄露补偿档位;Step S506, according to the noise reduction amount threshold to which the target noise reduction amount belongs, determine the sound leakage compensation gear position corresponding to the noise reduction amount threshold to which the target noise reduction amount belongs as the target sound leakage compensation gear;
步骤S507,基于目标声泄漏补偿档位,确定目标滤波器参数;Step S507, determining target filter parameters based on the target sound leakage compensation gear;
步骤S508,将预设的降噪滤波器中的滤波器参数调整为目标滤波器参数,其中,降噪滤波器用于对输入的声波信号进行降噪滤波处理。Step S508: Adjust the filter parameters in the preset noise reduction filter to target filter parameters, wherein the noise reduction filter is used to perform noise reduction filtering processing on the input sound wave signal.
步骤S501-步骤S503和步骤S201-步骤S203的内容相同,步骤S507-步骤S508与步骤S205-步骤S206的内容相同,在此不再赘述。The contents of steps S501-S503 are the same as those of step S201-step S203, and the contents of steps S507-step S508 are the same as those of steps S205-step S206, which will not be repeated here.
在步骤S504中,根据耳机的降噪效果,获取多个降噪阈值集合,不同的耳机设备,降噪阈值集合不同。将多个降噪阈值集合预设在耳机中,预设的降噪阈值集合包括多个由小至大排列的噪声参数值,多个噪声参数值构成多个降噪量阈值,降噪量阈值与声泄漏补偿档位对应。In step S504, according to the noise reduction effect of the earphone, a plurality of noise reduction threshold sets are obtained, and different earphone devices have different noise reduction threshold sets. A plurality of noise reduction threshold sets are preset in the earphone, the preset noise reduction threshold set includes a plurality of noise parameter values arranged from small to large, and the plurality of noise parameter values constitute a plurality of noise reduction thresholds, and the noise reduction thresholds Corresponds to the sound leakage compensation gear.
例如,降噪阈值集合记为{ε-X+1,…,ε-2,ε-1,ε0,ε1,ε2,…,εX},X表示声泄漏补偿档位的档位个数,ε1,ε2,…,εX表示需要降低对应的档位,ε-X+1,…,ε-2,ε-1表示需要提升档位,档位和档位个数根据耳机的佩戴状态确定,可以根据实际需求设定,从第0档到第X档适用的佩戴状况为由紧至松。该降噪阈值集合预存在耳机中,降噪阈值集合通过已经建立的声学模型获得,在实施过程中,根据耳机的应用场景不同,可以对降噪阈值集合进行调整。For example, the set of noise reduction thresholds is denoted as {ε -X+1 ,…,ε -2 ,ε -1 ,ε 0 ,ε 1 ,ε 2 ,…,ε X }, X represents the number of gears of the sound leakage compensation gear, ε 1 ,ε 2 ,…,ε X indicates that the corresponding gear needs to be lowered, ε -X+1 ,…,ε -2 ,ε -1 indicates that the gear needs to be increased The position, gear and number of gears are determined according to the wearing state of the headset, and can be set according to actual needs. The applicable wearing conditions from gear 0 to gear X are from tight to loose. The noise reduction threshold set is pre-stored in the earphone, and the noise reduction threshold set is obtained through the established acoustic model. During the implementation process, according to different application scenarios of the earphone, the noise reduction threshold set can be adjusted.
在步骤S505和步骤S506中,根据目标降噪量和预设的降噪阈值集合,确定目标降噪量所属的降噪量阈值,根据目标降噪量所属的降噪量阈值,获得目标降噪量对应的声泄漏补偿档位。In step S505 and step S506, according to the target noise reduction amount and the preset noise reduction threshold set, determine the noise reduction amount threshold to which the target noise reduction amount belongs, and obtain the target noise reduction amount according to the noise reduction amount threshold to which the target noise reduction amount belongs The corresponding sound leakage compensation gear.
例如,目标降噪量记为ε,当ε<ε0时,表示佩戴状态松弛,降噪量较低,需要提升档位;当ε-1≤ε<ε0时,则提升一档;当ε-2≤ε<ε-1时,则提升两档;以此类推,当ε<ε-X+1时,则提升X档。如果需要提升的档数与当前档数之和大于最大档数X,则直接提升至第X档。比如,最大档数为8,当前的档数为4,需要提升的档数为5,超过了最大档数8,也直接提升至最大档数8。当ε>ε1时,表示降噪量过高,为降低耳压保持听觉舒适度,需要降低档位;当ε1≤ε<ε2时,则降低一档;当ε2≤ε<ε3时,则降低两档;以此类推,当ε>εX时,则降低X档。如果当前档数与需要降低的档数之差小于零,则直接降低至第0档。For example, the target noise reduction amount is recorded as ε, when ε<ε 0 , it means that the wearing state is loose, the noise reduction amount is low, and the gear needs to be increased; when ε -1 ≤ε<ε 0 , it is increased by one gear; When ε -2 ≤ε<ε -1 , increase by two gears; and so on, when ε<ε -X+1 , increase X gear. If the sum of the number of gears to be raised and the current number of gears is greater than the maximum number of gears X, directly upgrade to the Xth gear. For example, the maximum number of gears is 8, the current number of gears is 4, and the number of gears to be upgraded is 5. If the number of gears exceeds the maximum number of gears of 8, it is also directly upgraded to the maximum number of gears of 8. When ε>ε 1 , it indicates that the amount of noise reduction is too high. In order to reduce ear pressure and maintain auditory comfort, it is necessary to lower the gear; when ε 1 ≤ε<ε 2 , lower the gear by one ; When it is 3 , reduce it by two gears; and so on, when ε>ε X , reduce the X gear. If the difference between the current number of gears and the number of gears to be lowered is less than zero, it is directly lowered to the 0th gear.
本公开示例性的实施例中,提供了一种降噪控制方法,应用于耳机,耳机包括入耳式耳机、半入耳式耳机、头戴式耳机等多种耳机结构。图6是根据一示例性的实施例示出的一种降噪控制方法的流程图,如图6所示,降噪控制方法包括以下步骤:In an exemplary embodiment of the present disclosure, a noise reduction control method is provided, which is applied to an earphone, and the earphone includes various earphone structures such as an in-ear earphone, a semi-in-ear earphone, and a headphone. FIG. 6 is a flowchart of a noise reduction control method according to an exemplary embodiment. As shown in FIG. 6 , the noise reduction control method includes the following steps:
步骤S601,获取环境时域信号,其中,环境时域信号指的是采用时域表示方式所表示的耳机周围环境中的声波信号;Step S601, acquiring an environmental time-domain signal, wherein the environmental time-domain signal refers to a sound wave signal in the surrounding environment of the earphone represented by a time-domain representation;
步骤S602,获取耳道时域信号,其中,耳道时域信号指的是采用时域表示方式所表示的耳道内的声波信号;Step S602, acquiring an ear canal time domain signal, wherein the ear canal time domain signal refers to an acoustic wave signal in the ear canal represented by a time domain representation method;
步骤S603,若环境时域信号和耳道时域信号满足预设的滤波器参数调整条件,则基于环境时域信号和耳道时域信号以及预设的频率响应函数,确定目标降噪量;Step S603, if the environmental time domain signal and the ear canal time domain signal satisfy the preset filter parameter adjustment conditions, then determine the target noise reduction amount based on the environmental time domain signal and the ear canal time domain signal and the preset frequency response function;
步骤S604,根据预设的降噪配置信息和目标降噪量,将与目标降噪量对应的声泄漏补偿档位确定为目标声泄露补偿档位,其中,降噪配置信息用于表征降噪量阈值与声泄漏补偿档位之间的对应关系,降噪配置信息包括多个降噪量阈值和与每个降噪量阈值对应的声泄露补偿档位;Step S604, according to the preset noise reduction configuration information and the target noise reduction amount, determine the sound leakage compensation gear corresponding to the target noise reduction amount as the target sound leakage compensation gear, wherein the noise reduction configuration information is used to represent the noise reduction The corresponding relationship between the amount threshold and the sound leakage compensation gear, the noise reduction configuration information includes a plurality of noise reduction amount thresholds and the sound leakage compensation gear corresponding to each noise reduction amount threshold;
步骤S605,获取芯片配置信息,芯片配置信息用于表征芯片中存储的滤波器系数是否支持更新;Step S605, acquiring chip configuration information, where the chip configuration information is used to represent whether the filter coefficients stored in the chip support updating;
若芯片中存储的滤波器系数支持更新,执行步骤S606;若芯片中存储的滤波器系统不支持更新,执行步骤S607。If the filter coefficient stored in the chip supports updating, step S606 is performed; if the filter system stored in the chip does not support updating, step S607 is performed.
步骤S606,基于目标声泄漏补偿档位,确定目标滤波器系数,将预设的降噪滤波器中的滤波器系数调整为目标滤波器系数;Step S606, determining the target filter coefficient based on the target sound leakage compensation gear, and adjusting the filter coefficient in the preset noise reduction filter to the target filter coefficient;
步骤S607,基于目标声泄漏补偿档位,确定目标滤波器增益,将预设的降噪滤波器中的滤波器增益调整为目标滤波器增益。步骤S601-步骤S604与步骤S201-步骤S204的内容相同,在此不再赘述。Step S607: Determine the target filter gain based on the target sound leakage compensation gear, and adjust the filter gain in the preset noise reduction filter to the target filter gain. The contents of steps S601 to S604 are the same as those of steps S201 to S204, and are not repeated here.
在步骤S605中,在确定声泄漏补偿档位后,获取芯片配置信息,芯片配置信息用于表征芯片中存储的滤波器系数是否支持更新。不同的耳机使用的主动降噪的芯片不同,不同芯片对滤波器系数更新的支持状态不同,通过获取芯片配置信息,确定耳机使用的芯片是否支持滤波器系数更新。In step S605, after the sound leakage compensation gear is determined, the chip configuration information is obtained, and the chip configuration information is used to indicate whether the filter coefficients stored in the chip support updating. Different headsets use different active noise reduction chips, and different chips support different filter coefficient updates. By obtaining the chip configuration information, it is determined whether the chip used in the headset supports filter coefficient update.
在步骤S606和步骤S607中,当芯片支持滤波器系数更新时,基于目标声泄漏补偿档位,确定目标滤波器系数,将预设的降噪滤波器中的滤波器系数调整为目标滤波器系数;当芯片中存储的滤波器系统不支持更新时,基于目标声泄漏补偿档位,确定目标滤波器增益,将预设的降噪滤波器中的滤波器增益调整为目标滤波器增益。由于更新滤波器系数也能起到改变滤波器增益的作用,同时还能改变滤波器相位,因此根据芯片是否支持更新滤波器系数来确定是更新滤波器系数还是更新滤波器增益。In steps S606 and S607, when the chip supports the update of filter coefficients, the target filter coefficients are determined based on the target sound leakage compensation gear, and the filter coefficients in the preset noise reduction filter are adjusted to the target filter coefficients ; When the filter system stored in the chip does not support updating, determine the target filter gain based on the target sound leakage compensation gear, and adjust the filter gain in the preset noise reduction filter to the target filter gain. Since updating the filter coefficients can also change the filter gain and filter phase, it is determined whether to update the filter coefficients or the filter gain according to whether the chip supports updating the filter coefficients.
在调整滤波器参数时,可以只更新前馈滤波器中的滤波器参数,;也可以同时更新前馈滤波器中的滤波器参数和反馈滤波器中的滤波器参数。When adjusting the filter parameters, only the filter parameters in the feedforward filter can be updated, or the filter parameters in the feedforward filter and the filter parameters in the feedback filter can be updated at the same time.
当芯片支持更新滤波器系数,且只更新前馈滤波器中的滤波器参数时,记为 当芯片支持更新滤波器系数,且同时更新前馈滤波器中的滤波器参数和反馈滤波器中的滤波器参数时,记为当芯片不支持更新滤波器系数,且只更新前馈滤波器中的滤波器参数时,记为当芯片不支持更新滤波器系数,且同时更新前馈滤波器中的滤波器参数和反馈滤波器中的滤波器参数时,记为其中,c表示滤波器系数,g表示滤波器增益,x代表当前档位,X代表最大档位。When the chip supports updating filter coefficients and only updates the filter parameters in the feedforward filter, it is recorded as When the chip supports updating the filter coefficients, and at the same time updating the filter parameters in the feedforward filter and the filter parameters in the feedback filter, it is recorded as When the chip does not support updating the filter coefficients and only updates the filter parameters in the feedforward filter, it is recorded as When the chip does not support updating the filter coefficients, and the filter parameters in the feedforward filter and the filter parameters in the feedback filter are updated at the same time, it is recorded as Among them, c represents the filter coefficient, g represents the filter gain, x represents the current gear, and X represents the maximum gear.
本公开示例性的实施例中,提供一种降噪控制方法,应用于耳机,耳机包括入耳式耳机、半入耳式耳机、头戴式耳机等多种耳机结构。图7是根据一示例性的实施例示出的一种降噪控制方法的流程图,如图7所示,降噪控制方法包括以下步骤:In an exemplary embodiment of the present disclosure, a noise reduction control method is provided, which is applied to an earphone, and the earphone includes various earphone structures such as an in-ear earphone, a semi-in-ear earphone, and a headphone. FIG. 7 is a flowchart of a noise reduction control method according to an exemplary embodiment. As shown in FIG. 7 , the noise reduction control method includes the following steps:
步骤S701,获取环境时域信号,其中,环境时域信号指的是采用时域表示方式所表示的耳机周围环境中的声波信号;Step S701, acquiring an environmental time-domain signal, wherein the environmental time-domain signal refers to a sound wave signal in the environment around the earphone represented by a time-domain representation;
步骤S702,获取耳道时域信号,其中,耳道时域信号指的是采用时域表示方式所表示的耳道内的声波信号;Step S702, acquiring an ear canal time domain signal, wherein the ear canal time domain signal refers to an acoustic wave signal in the ear canal represented by a time domain representation method;
步骤S703,基于环境时域信号,确定环境时域信号总能量,其中,环境时域信号包括多个频点,环境时域信号总能量指的是环境时域信号中各个频点的能量之和;Step S703, based on the environmental time domain signal, determine the total energy of the environmental time domain signal, wherein the environmental time domain signal includes a plurality of frequency points, and the total energy of the environmental time domain signal refers to the sum of the energy of each frequency point in the environmental time domain signal ;
步骤S704,基于耳道时域信号,确定耳道时域信号总能量,其中,耳道时域信号包括多个频点,耳道时域信号总能量指的是耳道时域信号中各个频点的能量之和;Step S704, based on the ear canal time domain signal, determine the total energy of the ear canal time domain signal, wherein the ear canal time domain signal includes a plurality of frequency points, and the total energy of the ear canal time domain signal refers to each frequency in the ear canal time domain signal. the sum of the energies of the points;
步骤S705,判定是否满足预设的滤波器参数调整条件;Step S705, determining whether the preset filter parameter adjustment conditions are met;
若环境时域信号总能量与耳道时域信号总能量的比值大于或等于预设的能量阈值,则判定满足预设的滤波器参数调整条件,执行步骤S706;当判定不满足预设的滤波器参数调整条件时,结束该流程。If the ratio of the total energy of the environmental time-domain signal to the total energy of the ear canal time-domain signal is greater than or equal to the preset energy threshold, it is determined that the preset filter parameter adjustment conditions are met, and step S706 is executed; when it is determined that the preset filter parameter adjustment conditions are not met When the controller parameter adjustment conditions are met, the process ends.
步骤S706,对环境时域信号和耳道时域信号分别进行傅里叶变换,获得环境频域信号和耳道频域信号,其中,所述环境频域信号指的是采用频域表示方式所表示的耳机周围环境中的声波信号,所述耳道频域信号指的是采用频域表示方式所表示的耳道内的声波信号;In step S706, Fourier transform is performed on the environmental time domain signal and the ear canal time domain signal respectively, to obtain the environmental frequency domain signal and the ear canal frequency domain signal, wherein the environmental frequency domain signal refers to the signal in the frequency domain representation. represents the sound wave signal in the surrounding environment of the earphone, and the ear canal frequency domain signal refers to the sound wave signal in the ear canal represented by the frequency domain representation;
步骤S707,基于环境频域信号和耳道频域信号以及预设的频率响应函数,获得交叉频率响应,交叉频率响应与频点相关;Step S707, based on the environmental frequency domain signal, the ear canal frequency domain signal and the preset frequency response function, obtain a crossover frequency response, and the crossover frequency response is related to the frequency point;
步骤S708,根据交叉频率响应,获得参考降噪量;Step S708, obtaining a reference noise reduction amount according to the cross frequency response;
步骤S709,根据参考降噪量,获得目标频段的平均降噪量,将平均降噪量确定为目标降噪量,其中,所述平均降噪量指的是所述目标频段中每个频点的能量的平均值;Step S709, obtain the average noise reduction amount of the target frequency band according to the reference noise reduction amount, and determine the average noise reduction amount as the target noise reduction amount, wherein the average noise reduction amount refers to each frequency point in the target frequency band The average value of the energy;
步骤S710,获取预设的降噪阈值集合,预设降噪阈值集合包括多个由小至大排列的噪声参数值,多个噪声参数值构成多个降噪量阈值,降噪量阈值与所述声泄漏补偿档位对应;Step S710, obtain a preset noise reduction threshold set, the preset noise reduction threshold set includes a plurality of noise parameter values arranged from small to large, and the plurality of noise parameter values constitute a plurality of noise reduction thresholds, and the noise reduction threshold is related to all noise reduction thresholds. Corresponding to the sound leakage compensation gear;
步骤S711,根据目标降噪量和预设的降噪阈值集合,确定目标降噪量所属的降噪量阈值;Step S711, according to the target noise reduction amount and the preset noise reduction threshold set, determine the noise reduction amount threshold to which the target noise reduction amount belongs;
步骤S5712,根据目标降噪量所属的降噪量阈值,将与目标降噪量所属的降噪量阈值对应的声泄漏补偿档位确定为目标声泄露补偿档位;Step S5712, according to the noise reduction amount threshold to which the target noise reduction amount belongs, determine the sound leakage compensation gear position corresponding to the noise reduction amount threshold to which the target noise reduction amount belongs as the target sound leakage compensation gear;
步骤S6713,获取芯片配置信息,芯片配置信息用于表征芯片中存储的滤波器系数是否支持更新;Step S6713, acquiring chip configuration information, where the chip configuration information is used to represent whether the filter coefficients stored in the chip support updating;
若芯片中存储的滤波器系数支持更新,执行步骤S714;若芯片中存储的滤波器系统不支持更新,执行步骤S715。If the filter coefficient stored in the chip supports updating, step S714 is performed; if the filter system stored in the chip does not support updating, step S715 is performed.
步骤S714,基于目标声泄漏补偿档位,确定目标滤波器系数,将预设的降噪滤波器中的滤波器系数调整为目标滤波器系数;Step S714, determining the target filter coefficient based on the target sound leakage compensation gear, and adjusting the filter coefficient in the preset noise reduction filter to the target filter coefficient;
步骤S715,基于目标声泄漏补偿档位,确定目标滤波器增益,将预设的降噪滤波器中的滤波器增益调整为目标滤波器增益。其中,预设的降噪滤波器中的滤波器参数包括:前馈滤波器中的滤波器参数;或者,前馈滤波器中的滤波器参数和反馈滤波器中的滤波器参数。Step S715: Determine the target filter gain based on the target sound leakage compensation gear, and adjust the filter gain in the preset noise reduction filter to the target filter gain. Wherein, the filter parameters in the preset noise reduction filter include: filter parameters in the feedforward filter; or, filter parameters in the feedforward filter and filter parameters in the feedback filter.
需要说明的是,为了使耳机时刻适应用户佩戴状态,以预设时间间隔反复执行上述降噪控制方法,例如以30s~120s的时间间隔。It should be noted that, in order to adapt the earphone to the wearing state of the user at all times, the above-mentioned noise reduction control method is repeatedly performed at preset time intervals, for example, at time intervals of 30s˜120s.
在本公开示例性的实施例中,获取环境时域信号和耳道时域信号,根据环境时域信号的环境时域信号总能量和耳道时域信号总能量的耳道时域信号比值,确定当前是否处于稳定的使用状态,以确定满足预设的滤波器参数调整条件,基于环境时域信号和耳道时域信号,确定目标降噪量,根据降噪量阈值与声泄漏补偿档位之间的对应关系和目标降噪量,获得目标降噪量对应的声泄漏补偿档位,即目标声泄漏补偿档位,基于目标声泄漏补偿档位,确定目标滤波器参数,将预设的降噪滤波器中的滤波器参数调整为目标滤波器参数,能够在耳机佩戴松弛时,及时调整预设的滤波器中的滤波器参数进行声泄漏补偿,以提高降噪量,保证良好的降噪效果,提升用户体验。In an exemplary embodiment of the present disclosure, the environmental time domain signal and the ear canal time domain signal are obtained, and according to the ratio of the total energy of the environmental time domain signal of the environmental time domain signal to the ear canal time domain signal ratio of the total energy of the ear canal time domain signal, Determine whether it is currently in a stable state of use to determine whether the preset filter parameter adjustment conditions are met, determine the target noise reduction amount based on the environmental time domain signal and the ear canal time domain signal, and compensate the gear according to the noise reduction threshold and sound leakage. The corresponding relationship between the target noise reduction amount and the target noise reduction amount, the sound leakage compensation gear corresponding to the target noise reduction amount is obtained, that is, the target sound leakage compensation gear. Based on the target sound leakage compensation gear, the target filter parameters are determined, and the preset The filter parameters in the noise reduction filter are adjusted to the target filter parameters. When the headphones are loosely worn, the filter parameters in the preset filter can be adjusted in time for sound leakage compensation, so as to improve the noise reduction and ensure good noise reduction. Noise effect, improve user experience.
本公开示例性的实施例中,提供一种降噪控制装置,应用于耳机。图8是根据一示例性的实施例示出的一种降噪控制装置的框图,如图8所示,降噪控制装置包括:In an exemplary embodiment of the present disclosure, a noise reduction control device is provided, which is applied to an earphone. FIG. 8 is a block diagram of a noise reduction control apparatus according to an exemplary embodiment. As shown in FIG. 8 , the noise reduction control apparatus includes:
第一获取模块801,被配置为获取环境时域信号,其中,所述环境时域信号指的是采用时域表示方式所表示的耳机周围环境中的声波信号;The first obtaining
第二获取模块802,被配置获取耳道时域信号,其中,所述耳道时域信号指的是采用时域表示方式所表示的耳道内的声波信号;The second acquiring
第一确定模块803,被配置为若所述环境时域信号和所述耳道时域信号满足预设的滤波器参数调整条件,则基于所述环境时域信号和所述耳道时域信号以及预设的频率响应函数,确定目标降噪量;The
第二确定模块804,被配置为根据预设的降噪配置信息和所述目标降噪量,将与所述目标降噪量对应的声泄漏补偿档位确定为目标声泄露补偿档位,其中,所述降噪配置信息用于表征降噪量阈值与声泄漏补偿档位之间的对应关系,所述降噪配置信息包括多个降噪量阈值和与每个所述降噪量阈值对应的声泄露补偿档位;The
第三确定模块805,被配置为基于所述目标声泄漏补偿档位,确定目标滤波器参数;The
调整模块806,被配置为将预设的降噪滤波器中的滤波器参数调整为所述目标滤波器参数,其中,所述降噪滤波器用于对输入的声波信号进行降噪滤波处理。The
在一示例性的实施例中,所述第一确定模块803还被配置为:In an exemplary embodiment, the first determining
基于所述环境时域信号,确定环境时域信号总能量,其中,所述环境时域信号包括多个频点,所述环境时域信号总能量指的是所述环境时域信号中各个频点的能量之和;Determine the total energy of the environmental time domain signal based on the environmental time domain signal, wherein the environmental time domain signal includes a plurality of frequency points, and the total energy of the environmental time domain signal refers to each frequency in the environmental time domain signal the sum of the energies of the points;
基于所述耳道时域信号,确定耳道时域信号总能量,其中,所述耳道时域信号包括多个频点,所述耳道时域信号总能量指的是所述耳道时域信号中各个频点的能量之和;Based on the ear canal time domain signal, the total energy of the ear canal time domain signal is determined, wherein the ear canal time domain signal includes a plurality of frequency points, and the total energy of the ear canal time domain signal refers to the time of the ear canal The sum of the energy of each frequency point in the domain signal;
若所述环境时域信号总能量与所述耳道时域信号总能量的比值大于或等于预设的能量阈值,则判定满足预设的滤波器参数调整条件。If the ratio of the total energy of the environmental time domain signal to the total energy of the ear canal time domain signal is greater than or equal to a preset energy threshold, it is determined that the preset filter parameter adjustment conditions are met.
在一示例性的实施例中,所述第一确定模块803还被配置为:In an exemplary embodiment, the first determining
对所述环境时域信号和所述耳道时域信号分别进行傅里叶变换,获得环境频域信号和耳道频域信号,其中,所述环境频域信号指的是采用频域表示方式所表示的耳机周围环境中的声波信号,所述耳道频域信号指的是采用频域表示方式所表示的耳道内的声波信号;Fourier transform is performed on the environmental time domain signal and the ear canal time domain signal respectively to obtain the environmental frequency domain signal and the ear canal frequency domain signal, wherein the environmental frequency domain signal refers to the frequency domain representation The represented sound wave signal in the surrounding environment of the earphone, the ear canal frequency domain signal refers to the sound wave signal in the ear canal represented by the frequency domain representation;
基于所述环境频域信号和所述耳道频域信号以及预设的频率响应函数,获得交叉频率响应,所述交叉频率响应与频点相关;obtaining a cross frequency response based on the ambient frequency domain signal and the ear canal frequency domain signal and a preset frequency response function, where the cross frequency response is related to a frequency point;
根据所述交叉频率响应,获得参考降噪量;obtaining a reference noise reduction amount according to the cross frequency response;
根据所述参考降噪量,获得目标频段的平均降噪量,将所述平均降噪量确定为所述目标降噪量,其中,所述平均降噪量指的是所述目标频段中每个频点的能量的平均值。According to the reference noise reduction amount, the average noise reduction amount of the target frequency band is obtained, and the average noise reduction amount is determined as the target noise reduction amount, wherein the average noise reduction amount refers to the average noise reduction amount in the target frequency band. The average value of the energy of each frequency point.
在一示例性的实施例中,所述第二确定模块804还被配置为:In an exemplary embodiment, the second determining
获取预设的降噪阈值集合,所述预设降噪阈值集合包括多个由小至大排列的噪声参数值,多个所述噪声参数值构成多个降噪量阈值,所述降噪量阈值与所述声泄漏补偿档位对应;Obtain a preset noise reduction threshold set, where the preset noise reduction threshold set includes a plurality of noise parameter values arranged from small to large, and a plurality of the noise parameter values constitute a plurality of noise reduction amount thresholds, and the noise reduction amount The threshold value corresponds to the sound leakage compensation gear;
根据所述目标降噪量和所述预设的降噪阈值集合,确定所述目标降噪量所属的降噪量阈值;determining the noise reduction threshold to which the target noise reduction belongs according to the target noise reduction and the preset noise reduction threshold set;
根据所述目标降噪量所属的降噪量阈值,将与所述目标降噪量所属的降噪量阈值对应的声泄漏补偿档位确定为目标声泄露补偿档位。According to the noise reduction amount threshold to which the target noise reduction amount belongs, the sound leakage compensation gear position corresponding to the noise reduction amount threshold to which the target noise reduction amount belongs is determined as the target sound leakage compensation gear position.
在一示例性的实施例中,所述第三确定模块805还被配置为:In an exemplary embodiment, the third determining
获取芯片配置信息,所述芯片配置信息用于表征芯片中存储的滤波器系数是否支持更新;acquiring chip configuration information, where the chip configuration information is used to represent whether the filter coefficients stored in the chip support updating;
若所述芯片中存储的滤波器系数支持更新,基于所述目标声泄漏补偿档位,确定目标滤波器系数,将预设的降噪滤波器中的滤波器系数调整为所述目标滤波器系数;If the filter coefficients stored in the chip support updating, determine the target filter coefficients based on the target sound leakage compensation gear, and adjust the filter coefficients in the preset noise reduction filter to the target filter coefficients ;
若所述芯片中存储的滤波器系统不支持更新,基于所述目标声泄漏补偿档位,确定目标滤波器增益,将预设的降噪滤波器中的滤波器增益调整为所述目标滤波器增益。If the filter system stored in the chip does not support updating, determine the target filter gain based on the target sound leakage compensation gear, and adjust the filter gain in the preset noise reduction filter to the target filter gain.
在一示例性的实施例中,所述预设的降噪滤波器中的滤波器参数包括:In an exemplary embodiment, the filter parameters in the preset noise reduction filter include:
前馈滤波器中的滤波器参数;或者,the filter parameters in the feedforward filter; or,
前馈滤波器中的滤波器参数和反馈滤波器中的滤波器参数。Filter parameters in feedforward filters and filter parameters in feedback filters.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
本公开还提供了一种降噪耳机,该降噪耳机上设置上述降噪控制装置,以实现上述实施例中的降噪控制方法。图9是根据一示例性的实施例示出的一种降噪耳机900的框图。The present disclosure also provides a noise reduction earphone, on which the above-mentioned noise reduction control device is arranged to realize the noise reduction control method in the above embodiment. FIG. 9 is a block diagram of a noise-cancelling
参照图9,降噪耳机900可以包括以下一个或多个组件:处理组件902,存储器904,电源组件906,多媒体组件908,音频组件910,输入/输出(I/O)的接口912,传感器组件914,以及通信组件916。9, noise-cancelling
处理组件902通常控制降噪耳机900的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件902可以包括一个或多个处理器920来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件902可以包括一个或多个模块,便于处理组件902和其他组件之间的交互。例如,处理组件902可以包括多媒体模块,以方便多媒体组件908和处理组件902之间的交互。The
存储器904被配置为存储各种类型的数据以支持在降噪耳机900的操作。这些数据的示例包括用于在降噪耳机900上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器904可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件906为降噪耳机900的各种组件提供电源。电源组件906可以包括电源管理系统,一个或多个电源,及其他与为降噪耳机900生成、管理和分配电力相关联的组件。
多媒体组件908包括在所述降噪耳机900和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件908包括一个前置摄像头和/或后置摄像头。当降噪耳机900处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件910被配置为输出和/或输入音频信号。例如,音频组件910包括一个麦克风(MIC),当降噪耳机900处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器904或经由通信组件916发送。在一些实施例中,音频组件910还包括一个扬声器,用于输出音频信号。
I/O接口912为处理组件902和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/
传感器组件914包括一个或多个传感器,用于为降噪耳机900提供各个方面的状态评估。例如,传感器组件914可以检测到降噪耳机900的打开/关闭状态,组件的相对定位,例如所述组件为降噪耳机900的显示器和小键盘,传感器组件914还可以检测降噪耳机900或降噪耳机900一个组件的位置改变,用户与降噪耳机900接触的存在或不存在,降噪耳机900方位或加速/减速和降噪耳机900的温度变化。传感器组件914可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件914还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件914还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件916被配置为便于降噪耳机900和其他设备之间有线或无线方式的通信。降噪耳机900可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件916经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件916还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,降噪耳机900可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, noise-cancelling
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器904,上述指令可由降噪耳机900的处理器920执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as
一种非临时性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器调用时,执行上述实施例中任一项所述的方法。A non-transitory computer-readable storage medium on which computer program instructions are stored, characterized in that, when the computer program instructions are invoked by a processor, the method described in any one of the foregoing embodiments is executed.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or conventional techniques in the art not disclosed by this disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the invention being indicated by the following claims.
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。It should be understood that the present invention is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from its scope. The scope of the present invention is limited only by the appended claims.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210509398.6A CN114786085A (en) | 2022-05-11 | 2022-05-11 | Noise reduction control method and device, noise reduction earphone and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210509398.6A CN114786085A (en) | 2022-05-11 | 2022-05-11 | Noise reduction control method and device, noise reduction earphone and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114786085A true CN114786085A (en) | 2022-07-22 |
Family
ID=82437295
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210509398.6A Pending CN114786085A (en) | 2022-05-11 | 2022-05-11 | Noise reduction control method and device, noise reduction earphone and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114786085A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116347286A (en) * | 2023-03-13 | 2023-06-27 | 小米科技(武汉)有限公司 | Earphone sound leakage detection method, device, equipment and storage medium |
WO2024104212A1 (en) * | 2022-11-18 | 2024-05-23 | 歌尔科技有限公司 | Noise reduction method, apparatus and device, and computer readable storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170150246A1 (en) * | 2015-11-24 | 2017-05-25 | Bose Corporation | Controlling Ambient Sound Volume |
CN108882092A (en) * | 2018-07-03 | 2018-11-23 | 歌尔智能科技有限公司 | Earphone noise reduction method and feedback noise reduction system |
CN110933554A (en) * | 2019-12-13 | 2020-03-27 | 恒玄科技(上海)股份有限公司 | Active noise reduction method and system and earphone |
US20200219477A1 (en) * | 2019-01-04 | 2020-07-09 | Bose Corporation | Compensation for microphone roll-off variation in acoustic devices |
CN111836147A (en) * | 2019-04-16 | 2020-10-27 | 华为技术有限公司 | A device and method for noise reduction |
CN112367587A (en) * | 2020-11-26 | 2021-02-12 | 东莞市沁之音电声科技有限公司 | Active noise reduction wireless Bluetooth headset and hearing device |
CN112788466A (en) * | 2021-02-07 | 2021-05-11 | 恒玄科技(上海)股份有限公司 | Filter parameter configuration method of active noise reduction earphone and active noise reduction earphone |
CN112911441A (en) * | 2021-01-18 | 2021-06-04 | 上海闻泰信息技术有限公司 | Noise reduction method, apparatus, audio device, and computer-readable storage medium |
CN113676804A (en) * | 2020-05-14 | 2021-11-19 | 华为技术有限公司 | Active noise reduction method and device |
CN113891205A (en) * | 2021-09-18 | 2022-01-04 | 恒玄科技(上海)股份有限公司 | Active noise reduction method and device for compensating earphone leakage and earphone |
CN114040300A (en) * | 2021-11-29 | 2022-02-11 | 歌尔科技有限公司 | Earphone active noise reduction method and device, earphone and computer readable storage medium |
CN114157957A (en) * | 2021-12-15 | 2022-03-08 | 歌尔科技有限公司 | Earphone active noise reduction method and device, electronic equipment and readable storage medium |
-
2022
- 2022-05-11 CN CN202210509398.6A patent/CN114786085A/en active Pending
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170150246A1 (en) * | 2015-11-24 | 2017-05-25 | Bose Corporation | Controlling Ambient Sound Volume |
CN108882092A (en) * | 2018-07-03 | 2018-11-23 | 歌尔智能科技有限公司 | Earphone noise reduction method and feedback noise reduction system |
US20200219477A1 (en) * | 2019-01-04 | 2020-07-09 | Bose Corporation | Compensation for microphone roll-off variation in acoustic devices |
CN111836147A (en) * | 2019-04-16 | 2020-10-27 | 华为技术有限公司 | A device and method for noise reduction |
CN110933554A (en) * | 2019-12-13 | 2020-03-27 | 恒玄科技(上海)股份有限公司 | Active noise reduction method and system and earphone |
CN113676804A (en) * | 2020-05-14 | 2021-11-19 | 华为技术有限公司 | Active noise reduction method and device |
CN112367587A (en) * | 2020-11-26 | 2021-02-12 | 东莞市沁之音电声科技有限公司 | Active noise reduction wireless Bluetooth headset and hearing device |
CN112911441A (en) * | 2021-01-18 | 2021-06-04 | 上海闻泰信息技术有限公司 | Noise reduction method, apparatus, audio device, and computer-readable storage medium |
CN112788466A (en) * | 2021-02-07 | 2021-05-11 | 恒玄科技(上海)股份有限公司 | Filter parameter configuration method of active noise reduction earphone and active noise reduction earphone |
CN113891205A (en) * | 2021-09-18 | 2022-01-04 | 恒玄科技(上海)股份有限公司 | Active noise reduction method and device for compensating earphone leakage and earphone |
CN114040300A (en) * | 2021-11-29 | 2022-02-11 | 歌尔科技有限公司 | Earphone active noise reduction method and device, earphone and computer readable storage medium |
CN114157957A (en) * | 2021-12-15 | 2022-03-08 | 歌尔科技有限公司 | Earphone active noise reduction method and device, electronic equipment and readable storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024104212A1 (en) * | 2022-11-18 | 2024-05-23 | 歌尔科技有限公司 | Noise reduction method, apparatus and device, and computer readable storage medium |
CN116347286A (en) * | 2023-03-13 | 2023-06-27 | 小米科技(武汉)有限公司 | Earphone sound leakage detection method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102512311B1 (en) | Earbud speech estimation | |
KR101981879B1 (en) | Method and apparatus for processing voice signals | |
KR20220158282A (en) | Characteristic management of active noise reduction | |
CN114974199B (en) | Noise reduction method, device, noise reduction earphones and medium | |
CN114630239B (en) | Method, device and storage medium for reducing earphone blocking effect | |
CN114666702A (en) | Earphone control method and device, noise reduction earphone and storage medium | |
CN114071308B (en) | Headset self-adaptive tuning method and device, headset and readable storage medium | |
CN113596665B (en) | Howling sound suppression method, device, earphone and storage medium | |
CN114786085A (en) | Noise reduction control method and device, noise reduction earphone and storage medium | |
CN114040285B (en) | Method and device for generating feedforward filter parameters of earphone, earphone and storage medium | |
CN115884030A (en) | Noise reduction method and device, earphone equipment, storage medium and chip | |
CN114040309B (en) | Wind noise detection method and device, electronic equipment and storage medium | |
US12096184B2 (en) | Hearing aid comprising a feedback control system | |
CN109155802A (en) | For generating the device of audio output | |
CN115298735A (en) | Method, device, earphone and computer program for active interference noise suppression | |
CN115550791A (en) | Audio processing method, device, earphone and storage medium | |
CN114598970A (en) | Audio processing method, device, electronic device and storage medium | |
EP3991452B1 (en) | Personalized headphone equalization | |
CN114040284B (en) | Noise processing method, noise processing device, terminal and storage medium | |
CN115410547B (en) | Audio processing method, device, electronic equipment and storage medium | |
CN115714948A (en) | Audio signal processing method and device and storage medium | |
CN115278441A (en) | Voice detection method, device, earphone and storage medium | |
US20240078994A1 (en) | Active damping of resonant canal modes | |
KR20250010495A (en) | Electronic apparatus and controlling method thereof | |
CN114979889A (en) | Method and device for reducing occlusion effect of earphone, earphone and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |