[go: up one dir, main page]

CN114666702A - Earphone control method and device, noise reduction earphone and storage medium - Google Patents

Earphone control method and device, noise reduction earphone and storage medium Download PDF

Info

Publication number
CN114666702A
CN114666702A CN202210508588.6A CN202210508588A CN114666702A CN 114666702 A CN114666702 A CN 114666702A CN 202210508588 A CN202210508588 A CN 202210508588A CN 114666702 A CN114666702 A CN 114666702A
Authority
CN
China
Prior art keywords
frequency
signal
domain signal
parameters
speaker
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
Application number
CN202210508588.6A
Other languages
Chinese (zh)
Inventor
李罡
张锐
段爽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Beijing Xiaomi Pinecone Electronic Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Beijing Xiaomi Pinecone Electronic Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd, Beijing Xiaomi Pinecone Electronic Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202210508588.6A priority Critical patent/CN114666702A/en
Publication of CN114666702A publication Critical patent/CN114666702A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1083Reduction of ambient noise
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • G10K11/1781Methods 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/17813Methods 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 acoustic paths, e.g. estimating, calibrating or testing of transfer functions or cross-terms
    • G10K11/17817Methods 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 acoustic paths, e.g. estimating, calibrating or testing of transfer functions or cross-terms between the output signals and the error signals, i.e. secondary path
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • G10K11/1785Methods, e.g. algorithms; Devices
    • G10K11/17853Methods, e.g. algorithms; Devices of the filter
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K2210/00Details of active noise control [ANC] covered by G10K11/178 but not provided for in any of its subgroups
    • G10K2210/10Applications
    • G10K2210/108Communication systems, e.g. where useful sound is kept and noise is cancelled
    • G10K2210/1081Earphones, e.g. for telephones, ear protectors or headsets
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K2210/00Details of active noise control [ANC] covered by G10K11/178 but not provided for in any of its subgroups
    • G10K2210/30Means
    • G10K2210/301Computational
    • G10K2210/3016Control 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)
  • Headphones And Earphones (AREA)

Abstract

本公开是关于一种耳机控制方法、装置、降噪耳机及存储介质。耳机控制方法包括:获取测试音频信号并控制所述扬声器播放测试音频信号;通过反馈麦克风获取基于测试音频信号生成的反馈麦克风时域信号;通过电信号采集模块获取基于测试音频信号生成的扬声器时域信号;根据反馈麦克风时域信号和扬声器时域信号的相关性,确定与次级路径对应的第一频率响应;根据预设的频率响应集合和滤波器参数对应关系,确定与第一频率响应对应的滤波器参数作为目标滤波器参数。使用本公开中的方法,能够提供多种滤波器参数设置方式,并准确选择适配的目标滤波器参数,以提升降噪耳机对不同用户的耳道情况的降噪适应性,为用户提供降噪耳机的个性化适配体验。

Figure 202210508588

The present disclosure relates to an earphone control method, device, noise reduction earphone and storage medium. The headset control method includes: acquiring a test audio signal and controlling the speaker to play the test audio signal; acquiring a feedback microphone time-domain signal generated based on the test audio signal through a feedback microphone; acquiring a speaker time-domain signal generated based on the test audio signal through an electrical signal acquisition module signal; according to the correlation between the feedback microphone time domain signal and the speaker time domain signal, determine the first frequency response corresponding to the secondary path; according to the preset frequency response set and the corresponding relationship of filter parameters, determine the corresponding first frequency response The filter parameters are used as the target filter parameters. Using the method in the present disclosure, it is possible to provide a variety of filter parameter setting methods, and accurately select the appropriate target filter parameters, so as to improve the noise reduction adaptability of the noise reduction headphones to the ear canal conditions of different users, and provide users with reduced noise reduction. Personalized adaptation experience of noise headphones.

Figure 202210508588

Description

一种耳机控制方法、装置、降噪耳机及存储介质A headphone control method, device, noise reduction headphone and storage medium

技术领域technical field

本公开涉及信号处理领域,尤其涉及一种耳机控制方法、装置、降噪耳机及存储介质。The present disclosure relates to the field of signal processing, and in particular, to a headphone control method, a device, a noise reduction headphone, and a storage medium.

背景技术Background technique

主动降噪(Active Noise Cancellation,ANC)技术是一种通过产生与噪声源相位相反,能量相同或相近的声信号,与噪声源干涉实现声波抵消的技术。主动降噪技术广泛应用于耳机、车载系统、智能家居等领域。Active Noise Cancellation (ANC) technology is a technology that achieves sound wave cancellation by interfering with the noise source by generating an acoustic signal whose phase is opposite to that of the noise source and has the same or similar energy. Active noise reduction technology is widely used in headphones, vehicle systems, smart homes and other fields.

随着主动降噪技术的不断发展,主动降噪耳机逐渐开始流行,主动降噪耳机同时也带动了主动降噪技术的快速发展。随着主动降噪耳机用户规模的迅速扩大,如何有效适配不同的用户群体是主动降噪耳机亟待解决的问题。With the continuous development of active noise reduction technology, active noise reduction headphones have gradually become popular, and active noise reduction headphones have also driven the rapid development of active noise reduction technology. With the rapid expansion of the user scale of active noise cancelling headphones, how to effectively adapt to different user groups is an urgent problem to be solved for active noise cancelling headphones.

发明内容SUMMARY OF THE INVENTION

为克服相关技术中存在的问题,本公开提供一种耳机控制方法、装置、降噪耳机及存储介质。In order to overcome the problems existing in the related art, the present disclosure provides a headphone control method, a device, a noise reduction headphone and a storage medium.

根据本公开实施例的第一方面,提供了一种耳机控制方法,应用于耳机,所述耳机包括扬声器、反馈麦克风和控制器,所述方法由所述控制器执行,所述控制器至少包括电信号采集模块,所述方法包括:According to a first aspect of the embodiments of the present disclosure, there is provided a headphone control method, which is applied to a headphone, the headphone includes a speaker, a feedback microphone, and a controller, the method is executed by the controller, and the controller at least includes An electrical signal acquisition module, the method includes:

获取测试音频信号并控制所述扬声器播放测试音频信号;Obtain the test audio signal and control the speaker to play the test audio signal;

通过所述反馈麦克风获取基于所述测试音频信号生成的反馈麦克风时域信号;其中,所述反馈麦克风时域信号指的是所述测试音频信号进入耳道内所形成的声波信号的时域表示;A feedback microphone time-domain signal generated based on the test audio signal is acquired through the feedback microphone; wherein, the feedback microphone time-domain signal refers to the time-domain representation of the sound wave signal formed by the test audio signal entering the ear canal;

通过所述电信号采集模块获取基于所述测试音频信号生成的扬声器时域信号;其中,所述扬声器时域信号指的是所述测试音频信号被所述扬声器播放时被所述电信号采集模块所回采的电信号的时域表示;The speaker time-domain signal generated based on the test audio signal is acquired by the electrical signal acquisition module; wherein, the speaker time-domain signal refers to the electrical signal acquisition module when the test audio signal is played by the speaker The time domain representation of the recovered electrical signal;

根据所述反馈麦克风时域信号和所述扬声器时域信号的相关性,确定与次级路径对应的第一频率响应,其中,所述次级路径指的是所述测试音频信号从所述扬声器到反馈麦克风的传播路径;According to the correlation between the feedback microphone time domain signal and the speaker time domain signal, a first frequency response corresponding to a secondary path is determined, wherein the secondary path refers to the test audio signal from the speaker the propagation path to the feedback microphone;

根据预设的频率响应集合和滤波器参数对应关系,确定与所述第一频率响应对应的滤波器参数作为目标滤波器参数;其中,所述滤波器参数包括主动降噪滤波器参数和/或音效均衡滤波器参数。According to the preset frequency response set and the corresponding relationship between the filter parameters, the filter parameters corresponding to the first frequency response are determined as the target filter parameters; wherein, the filter parameters include active noise reduction filter parameters and/or Sound equalization filter parameters.

在一示例性的实施例中,所述根据所述反馈麦克风时域信号和所述扬声器时域信号的相关性,确定与次级路径对应的第一频率响应,包括:In an exemplary embodiment, the determining the first frequency response corresponding to the secondary path according to the correlation between the feedback microphone time domain signal and the speaker time domain signal includes:

对所述反馈麦克风时域信号进行时频转换处理,得到反馈麦克风频域信号;performing time-frequency conversion processing on the feedback microphone time-domain signal to obtain a feedback microphone frequency-domain signal;

对所述扬声器时域信号进行时频转换处理,得到扬声器频域信号;performing time-frequency conversion processing on the loudspeaker time-domain signal to obtain a loudspeaker frequency-domain signal;

根据所述反馈麦克风频域信号和所述扬声器频域信号以及预设的传递函数,确定与所述次级路径对应的第一频率响应,其中,所述传递函数用于表示所述反馈麦克风频域信号和所述扬声器频域信号的相关性。Determine a first frequency response corresponding to the secondary path according to the feedback microphone frequency domain signal and the speaker frequency domain signal and a preset transfer function, wherein the transfer function is used to represent the feedback microphone frequency domain signal and the speaker frequency domain signal correlation.

在一示例性的实施例中,所述根据预设的频率响应集合和滤波器参数对应关系,确定与所述第一频率响应对应的滤波器参数作为目标滤波器参数,包括:In an exemplary embodiment, the determining the filter parameter corresponding to the first frequency response as the target filter parameter according to the preset frequency response set and the corresponding relationship between the filter parameters includes:

所述频率响应集合中包含多个预设响应参数,选择所述多个预设响应参数中与所述第一频率响应最接近的预设响应参数作为目标频率响应;The frequency response set includes a plurality of preset response parameters, and a preset response parameter closest to the first frequency response among the plurality of preset response parameters is selected as the target frequency response;

确定与所述目标频率响应对应的滤波器参数,作为目标滤波器参数。A filter parameter corresponding to the target frequency response is determined as a target filter parameter.

在一示例性的实施例中,所述选择所述多个预设响应参数中与所述第一频率响应最接近的预设响应参数作为目标频率响应,包括:In an exemplary embodiment, the selecting the preset response parameter closest to the first frequency response among the plurality of preset response parameters as the target frequency response includes:

分别计算所述第一频率响应与每个所述预设响应参数之间的感知相似度,获得多个所述感知相似度;respectively calculating the perceptual similarity between the first frequency response and each of the preset response parameters to obtain a plurality of the perceptual similarity;

选择多个所述感知相似度中数值最小的感知相似度对应的预设响应参数,作为目标频率响应。A preset response parameter corresponding to the perceptual similarity with the smallest value among the plurality of perceptual similarities is selected as the target frequency response.

在一示例性的实施例中,所述分别计算所述第一频率响应与每个所述预设响应参数之间的感知相似度,获得多个所述感知相似度,包括:In an exemplary embodiment, the calculating, respectively, the perceptual similarity between the first frequency response and each of the preset response parameters to obtain a plurality of the perceptual similarity, including:

选取所述反馈麦克风频域信号和所述扬声器频域信号的频谱中多个谱线对应的频率值作为频率参数;Select frequency values corresponding to multiple spectral lines in the frequency spectrum of the feedback microphone frequency domain signal and the speaker frequency domain signal as frequency parameters;

所述多个频率参数由小至大排列,相邻的两个频率参数之间形成频率区间;The plurality of frequency parameters are arranged from small to large, and a frequency interval is formed between two adjacent frequency parameters;

对每个所述频率区间中的每个频点,计算每个频点对应的所述预设响应参数与所述第一频率响应的差值的绝对值作为第一参数;For each frequency point in each of the frequency intervals, calculate the absolute value of the difference between the preset response parameter corresponding to each frequency point and the first frequency response as the first parameter;

对所述频率区间中每个频点对应的所述第一参数求和,获得第二参数;summing the first parameters corresponding to each frequency point in the frequency interval to obtain a second parameter;

对多个所述频率区间的第二参数进行加权求和,获得单个预设响应参数与所述第一频率响应的感知相似度;Weighted summation is performed on the second parameters of a plurality of the frequency intervals to obtain the perceptual similarity between a single preset response parameter and the first frequency response;

分别计算每个所述预设响应参数与所述第一频率响应的感知相似度,获得多个所述感知相似度。The perceptual similarity between each of the preset response parameters and the first frequency response is calculated separately to obtain a plurality of the perceptual similarity.

在一示例性的实施例中,所述主动降噪滤波器参数包括前馈滤波器参数和反馈滤波器参数,所述目标滤波器参数包括以下方式之一:In an exemplary embodiment, the active noise reduction filter parameters include feedforward filter parameters and feedback filter parameters, and the target filter parameters include one of the following methods:

所述前馈滤波器参数、所述反馈滤波器参数和所述音效均衡滤波器参数;the feedforward filter parameters, the feedback filter parameters and the sound effect equalization filter parameters;

所述前馈滤波器参数和所述音效均衡滤波器参数;the feedforward filter parameters and the sound effect equalization filter parameters;

所述前馈滤波器参数和所述反馈滤波器参数;the feedforward filter parameters and the feedback filter parameters;

所述前馈滤波器参数;the feedforward filter parameters;

所述反馈滤波器参数。the feedback filter parameters.

在一示例性的实施例中,所述测试音频信号包括佩戴提示音信号或者播放源信号。In an exemplary embodiment, the test audio signal includes a wearing sound signal or a playback source signal.

根据本公开实施例的第二方面,提供了一种耳机控制装置,应用于耳机,所述耳机包括扬声器、反馈麦克风和控制器,所述方法由所述控制器执行,所述控制器至少包括电信号采集模块,所述装置包括:According to a second aspect of the embodiments of the present disclosure, there is provided an earphone control apparatus, which is applied to an earphone, the earphone includes a speaker, a feedback microphone and a controller, the method is executed by the controller, and the controller at least includes An electrical signal acquisition module, the device includes:

播放模块,被配置为获取测试音频信号并控制所述扬声器播放测试音频信号;a playback module, configured to obtain a test audio signal and control the speaker to play the test audio signal;

第一获取模块,被配置为通过所述反馈麦克风获取基于所述测试音频信号生成的反馈麦克风时域信号;其中,所述反馈麦克风时域信号指的是所述测试音频信号进入耳道内所形成的声波信号的时域表示;The first acquisition module is configured to acquire, through the feedback microphone, a feedback microphone time-domain signal generated based on the test audio signal; wherein, the feedback microphone time-domain signal refers to a signal formed by the test audio signal entering the ear canal. The time domain representation of the acoustic signal;

第二获取模块,被配置为通过所述电信号采集模块获取基于所述测试音频信号生成的扬声器时域信号;其中,所述扬声器时域信号指的是所述测试音频信号被所述扬声器播放时被所述电信号采集模块所回采的电信号的时域表示;The second acquisition module is configured to acquire the speaker time domain signal generated based on the test audio signal through the electrical signal acquisition module; wherein the speaker time domain signal refers to the test audio signal being played by the speaker time domain representation of the electrical signal recovered by the electrical signal acquisition module;

第一确定模块,被配置为根据所述反馈麦克风时域信号和所述扬声器时域信号的相关性,确定与次级路径对应的第一频率响应,其中,所述次级路径指的是所述测试音频信号从所述扬声器到反馈麦克风的传播路径;The first determination module is configured to determine a first frequency response corresponding to the secondary path according to the correlation between the feedback microphone time-domain signal and the speaker time-domain signal, wherein the secondary path refers to the the propagation path of the test audio signal from the speaker to the feedback microphone;

第二确定模块,被配置为根据预设的频率响应集合和滤波器参数对应关系,确定与所述第一频率响应对应的滤波器参数作为目标滤波器参数;其中,所述滤波器参数包括主动降噪滤波器参数和/或音效均衡滤波器参数。The second determination module is configured to determine the filter parameter corresponding to the first frequency response as the target filter parameter according to the preset frequency response set and the corresponding relationship of the filter parameter; wherein, the filter parameter includes an active filter parameter. Noise reduction filter parameters and/or sound equalization filter parameters.

在一示例性的实施例中,所述第一确定模块还被配置为:In an exemplary embodiment, the first determining module is further configured to:

对所述反馈麦克风时域信号进行时频转换处理,得到反馈麦克风频域信号;performing time-frequency conversion processing on the feedback microphone time-domain signal to obtain a feedback microphone frequency-domain signal;

对所述扬声器时域信号进行时频转换处理,得到扬声器频域信号;performing time-frequency conversion processing on the loudspeaker time-domain signal to obtain a loudspeaker frequency-domain signal;

根据所述反馈麦克风频域信号和所述扬声器频域信号以及预设的传递函数,确定与所述次级路径对应的第一频率响应,其中,所述传递函数用于表示所述反馈麦克风频域信号和所述扬声器频域信号的相关性。Determine a first frequency response corresponding to the secondary path according to the feedback microphone frequency domain signal and the speaker frequency domain signal and a preset transfer function, wherein the transfer function is used to represent the feedback microphone frequency domain signal and the speaker frequency domain signal correlation.

在一示例性的实施例中,所述第二确定模块还被配置为:In an exemplary embodiment, the second determining module is further configured to:

所述频率响应集合中包含多个预设响应参数,选择所述多个预设响应参数中与所述第一频率响应最接近的预设响应参数作为目标频率响应;The frequency response set includes a plurality of preset response parameters, and a preset response parameter closest to the first frequency response among the plurality of preset response parameters is selected as the target frequency response;

确定与所述目标频率响应对应的滤波器参数,作为目标滤波器参数。A filter parameter corresponding to the target frequency response is determined as a target filter parameter.

在一示例性的实施例中,所述述第二确定模块还被配置为:In an exemplary embodiment, the second determining module is further configured to:

分别计算所述第一频率响应与每个所述预设响应参数之间的感知相似度,获得多个所述感知相似度;respectively calculating the perceptual similarity between the first frequency response and each of the preset response parameters to obtain a plurality of the perceptual similarity;

选择多个所述感知相似度中数值最小的感知相似度对应的预设响应参数,作为目标频率响应。A preset response parameter corresponding to the perceptual similarity with the smallest value among the plurality of perceptual similarities is selected as the target frequency response.

在一示例性的实施例中,所述述第二确定模块还被配置为:In an exemplary embodiment, the second determining module is further configured to:

选取所述反馈麦克风频域信号和所述扬声器频域信号的频谱中多个谱线对应的频率值作为频率参数;Select frequency values corresponding to multiple spectral lines in the frequency spectrum of the feedback microphone frequency domain signal and the speaker frequency domain signal as frequency parameters;

所述多个频率参数由小至大排列,相邻的两个频率参数之间形成频率区间;The plurality of frequency parameters are arranged from small to large, and a frequency interval is formed between two adjacent frequency parameters;

对每个所述频率区间中的每个频点,计算每个频点对应的所述预设响应参数与所述第一频率响应的差值的绝对值作为第一参数;For each frequency point in each of the frequency intervals, calculate the absolute value of the difference between the preset response parameter corresponding to each frequency point and the first frequency response as the first parameter;

对所述频率区间中每个频点对应的所述第一参数求和,获得第二参数;summing the first parameters corresponding to each frequency point in the frequency interval to obtain a second parameter;

对多个所述频率区间的第二参数进行加权求和,获得单个预设响应参数与所述第一频率响应的感知相似度;Weighted summation is performed on the second parameters of a plurality of the frequency intervals to obtain the perceptual similarity between a single preset response parameter and the first frequency response;

分别计算每个所述预设响应参数与所述第一频率响应的感知相似度,获得多个所述感知相似度。The perceptual similarity between each of the preset response parameters and the first frequency response is calculated separately to obtain a plurality of the perceptual similarity.

在一示例性的实施例中,所述主动降噪滤波器参数包括前馈滤波器参数和反馈滤波器参数,所述目标滤波器参数包括以下方式之一:In an exemplary embodiment, the active noise reduction filter parameters include feedforward filter parameters and feedback filter parameters, and the target filter parameters include one of the following methods:

所述前馈滤波器参数、所述反馈滤波器参数和所述音效均衡滤波器参数;the feedforward filter parameters, the feedback filter parameters and the sound effect equalization filter parameters;

所述前馈滤波器参数和所述音效均衡滤波器参数;the feedforward filter parameters and the sound effect equalization filter parameters;

所述前馈滤波器参数和所述反馈滤波器参数;the feedforward filter parameters and the feedback filter parameters;

所述前馈滤波器参数;the feedforward filter parameters;

所述反馈滤波器参数。the feedback filter parameters.

在一示例性的实施例中,所述测试音频信号包括佩戴提示音信号或者播放源信号。In an exemplary embodiment, the test audio signal includes a wearing sound signal or a playback source signal.

根据本公开实施例的第三方面,提供了一种降噪耳机,所述耳机包括壳体和设置于所述壳体上的前馈麦克风、反馈麦克风、扬声器以及控制器: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 according to the first aspect 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, wherein when the computer program instructions are called by a processor, the first The method described in the aspect.

采用本公开的上述方法,具有以下有益效果:使用本公开中的耳机控制方法,能够提供多种滤波器参数设置方式,并准确选择适配的滤波器参数,以提升降噪耳机对不同用户的耳道情况的降噪适应性,为用户提供降噪耳机的个性化适配体验。The above method of the present disclosure has the following beneficial effects: using the earphone control method in the present disclosure, it is possible to provide a variety of filter parameter setting methods, and accurately select the appropriate filter parameters, so as to improve the noise reduction headphones for different users. The noise reduction adaptability of the ear canal situation provides users with a personalized adaptation experience of noise reduction headphones.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。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 reduction principle of a noise reduction earphone according to an exemplary embodiment;

图2是根据一示例性的实施例示出的一种耳机控制方法的流程图;FIG. 2 is a flowchart of a method for controlling an earphone according to an exemplary embodiment;

图3是根据一示例性的实施例示出的一种耳机控制方法的流程图;FIG. 3 is a flowchart of a method for controlling an earphone according to an exemplary embodiment;

图4是根据一示例性的实施例示出的一种耳机控制方法的流程图;FIG. 4 is a flowchart of a method for controlling an earphone according to an exemplary embodiment;

图5是根据一示例性的实施例示出的一种耳机控制装置的框图;FIG. 5 is a block diagram of an apparatus for controlling an earphone according to an exemplary embodiment;

图6是根据一示例性的实施例示出的一种降噪耳机的框图。Fig. 6 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.

图1是根据一示例性的实施例示出的一种降噪耳机的降噪原理示意图,如图1所示,声学元器件主要包括:前馈(Feed-Forward,FF)麦克风1、反馈(Feed-Back,FB)麦克风2、扬声器3。前馈麦克风1置于佩戴后的耳廓外部,监测环境噪声强度;反馈麦克风2置于佩戴后的耳道内侧,并处于扬声器附近,实时检测耳道附近残留噪声。前馈麦克风1和扬声器3组成前馈主动降噪通路5,前馈主动降噪通路5信号经过前馈滤波器6实现前馈主动降噪;反馈麦克风2和扬声器3组成反馈主动降噪通路4,反馈主动降噪通路4信号经过反馈滤波器7实现反馈主动降噪。耳机的播放源(即耳机播放的内容源)还可以经过音效均衡(Equalizer,EQ)实现低频能量补偿,EQ滤波器8为可选模块,有的降噪耳机有EQ滤波器8,有的降噪耳机没有EQ滤波器8。FIG. 1 is a schematic diagram of the noise reduction principle 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) microphone 1, a feedback (Feed-Forward) -Back, FB) Microphone 2, Speaker 3. The feedforward microphone 1 is placed outside the auricle after wearing to monitor the intensity of ambient noise; the feedback microphone 2 is placed inside the ear canal after wearing, near the speaker, to detect residual noise near the ear canal in real time. Feedforward microphone 1 and speaker 3 form feedforward active noise reduction path 5, and the signal of feedforward active noise reduction path 5 passes through feedforward filter 6 to achieve feedforward active noise reduction; feedback microphone 2 and speaker 3 form feedback active noise reduction path 4 , the feedback active noise reduction channel 4 signal passes through the feedback filter 7 to realize the feedback active noise reduction. The playback source of the headphones (that is, the content source played by the headphones) can also achieve low-frequency energy compensation through sound effect equalizer (EQ). EQ filter 8 is an optional module. Some noise-cancelling headphones have EQ filter 8, and some reduce Noisy headphones have no EQ filter8.

降噪耳机的每个降噪通路(可以包括前馈主动降噪通路5和反馈主动降噪通路4)基于主动降噪硬件滤波器(ANC芯片)设计,由于芯片成本、耳机功耗等一系列因素,商业级ANC芯片全部采用了固定滤波器配置方案,即基于某个耳道模型测量的声学传递路径,计算出相应的ANC滤波器系数,再将参数烧录至ANC芯片中固化,在后期使用过程中,该ANC滤波器系数不会发生改变。Each noise reduction channel (which can include feedforward active noise reduction channel 5 and feedback active noise reduction channel 4) is designed based on active noise reduction hardware filter (ANC chip), due to a series of chip costs, headphone power consumption, etc. Factors, commercial-grade ANC chips all use a fixed filter configuration scheme, that is, based on the acoustic transmission path measured by a certain ear canal model, calculate the corresponding ANC filter coefficients, and then burn the parameters into the ANC chip for curing, and in the later stage During use, the ANC filter coefficients will not change.

但是单一耳道模型无法适配所有用户,为了适配更多的用户,部分芯片具有支持对多组滤波器系数的功能,即芯片中预先烧录由多个耳道模型建模的多组ANC滤波器系数,根据用户需求切换至对应的系数。但如何有效的选择最优ANC滤波器系数,是当前降噪耳机应用中一个亟待解决的问题。另外,当降噪耳机还提供了以芯片构建的EQ滤波器时,EQ滤波器与ANC滤波器类似,EQ滤波器系数基于某个耳道模型建模获得,同样存在着用户适配性的问题。However, a single ear canal model cannot adapt to all users. In order to adapt to more users, some chips have the function of supporting multiple sets of filter coefficients, that is, multiple sets of ANCs modeled by multiple ear canal models are pre-programmed in the chip. Filter coefficients, switch to the corresponding coefficients according to user needs. However, how to effectively select the optimal ANC filter coefficient is an urgent problem to be solved in the current application of noise-cancelling headphones. In addition, when the noise-cancelling headphones also provide an EQ filter built on a chip, the EQ filter is similar to the ANC filter, and the EQ filter coefficients are modeled based on an ear canal model, which also has the problem of user adaptability. .

本公开示例性的实施例中,提供一种耳机控制方法,应用于包括扬声器、反馈麦克风和控制器的耳机,耳机控制方法由耳机中的控制器执行,控制器至少包括电信号采集模块,耳机包括入耳式耳机、半入耳式耳机、头戴式耳机等。控制器还包括播放模块,播放模块包括播放控制电路和运行在播放控制电路上的播放控制软件。图2是根据一示例性的实施例示出的一种耳机控制方法的流程图,如图2所示,耳机控制方法包括以下步骤:In an exemplary embodiment of the present disclosure, an earphone control method is provided, which is applied to an earphone including a speaker, a feedback microphone and a controller. The earphone control method is performed by a controller in the earphone, and the controller at least includes an electrical signal acquisition module, and the earphone Including in-ear headphones, semi-in-ear headphones, headphones, etc. The controller also includes a playback module, and the playback module includes a playback control circuit and playback control software running on the playback control circuit. Fig. 2 is a flowchart of a method for controlling an earphone according to an exemplary embodiment. As shown in Fig. 2, the method for controlling an earphone includes the following steps:

步骤S201,获取测试音频信号并控制扬声器播放测试音频信号;Step S201, acquiring the test audio signal and controlling the speaker to play the test audio signal;

步骤S202,通过反馈麦克风获取基于测试音频信号生成的反馈麦克风时域信号;其中,反馈麦克风时域信号指的是测试音频信号进入耳道内所形成的声波信号的时域表示;Step S202, obtaining the feedback microphone time-domain signal generated based on the test audio signal through the feedback microphone; wherein, the feedback microphone time-domain signal refers to the time-domain representation of the sound wave signal formed by the test audio signal entering the ear canal;

步骤S203,通过电信号采集模块获取基于测试音频信号生成的扬声器时域信号;其中,扬声器时域信号指的是测试音频信号被扬声器播放时被电信号采集模块所回采的电信号的时域表示;Step S203, obtaining the speaker time domain signal generated based on the test audio signal through the electrical signal acquisition module; wherein the speaker time domain signal refers to the time domain representation of the electrical signal retrieved by the electrical signal acquisition module when the test audio signal is played by the speaker ;

步骤S204,根据反馈麦克风时域信号和扬声器时域信号的相关性,确定与次级路径对应的第一频率响应,其中,次级路径指的是测试音频信号从扬声器到反馈麦克风的传播路径;Step S204, determining the first frequency response corresponding to the secondary path according to the correlation between the feedback microphone time domain signal and the speaker time domain signal, wherein the secondary path refers to the propagation path of the test audio signal from the speaker to the feedback microphone;

步骤S205,根据预设的频率响应集合和滤波器参数对应关系,确定与第一频率响应对应的滤波器参数作为目标滤波器参数;其中,滤波器参数包括主动降噪滤波器参数和/或音效均衡滤波器参数。Step S205, according to the preset frequency response set and the corresponding relationship of the filter parameters, determine the filter parameters corresponding to the first frequency response as the target filter parameters; wherein, the filter parameters include active noise reduction filter parameters and/or sound effects Equalization filter parameters.

在步骤S201中,本公开提供的耳机控制方法是根据耳道对滤波器参数进行设置,因此需要用户佩戴耳机时,获取测试音频信号并控制扬声器播放测试音频信号。耳机中的控制器还包括播放模块,播放模块包括播放控制电路和运行在播放控制电路上的播放控制软件。通过耳机中的播放模块获取测试音频信号并控制扬声器播放测试音频信号。测试音频信号可以使用佩戴提示音信号和播放源信号中的一种,也可以同时使用佩戴提示音信号和播放源信号,该步骤中获取和播放测试音频信号是在用户佩戴耳机后主动触发的,无需用户操作,保障了用户体验。当然,可以理解是,测试音频信号也可以是用户通过触摸、点击或者通过语音控制等方式,主动控制耳机对其进行播放。比如,家庭成员中多人共用一个耳机时,每个成员可以在使用耳机之前主动控制耳机播放测试音频信号,以根据测试结果调整至适合当前使用耳机的成员的滤波器参数。In step S201, the earphone control method provided by the present disclosure sets the filter parameters according to the ear canal, so when the user wears the earphone, the test audio signal is acquired and the speaker is controlled to play the test audio signal. The controller in the earphone also includes a playback module, and the playback module includes a playback control circuit and playback control software running on the playback control circuit. Obtain the test audio signal through the playback module in the headset and control the speaker to play the test audio signal. The test audio signal can use one of the wearing prompt tone signal and the playback source signal, or can use the wearing prompt tone signal and the playing source signal at the same time. In this step, the acquisition and playback of the test audio signal is actively triggered after the user wears the headset. No user operation is required, which ensures the user experience. Of course, it can be understood that the test audio signal may also be the user actively controlling the headset to play it through touch, click, or voice control. For example, when multiple members of a family share an earphone, each member can actively control the earphone to play a test audio signal before using the earphone, so as to adjust the filter parameters suitable for the member currently using the earphone according to the test result.

佩戴提示音为耳机的播放模块中预设的音频信号,在用户首次佩戴耳机时,或者,佩戴者主动控制耳机进行测试时,会播放佩戴提示音,以完成根据耳道对耳机的滤波器参数设置,而后再播放用户想用收听的音频信息。播放源信号为用户首次佩戴耳机时,或者,佩戴者主动控制耳机进行测试时,使用的播放源音频,由于降噪耳机主要针对1000Hz以下噪声源,日常播放源均能提供充分的1000Hz以下频率分量,因此播放源信号取决于用户选取的播放资源,具有随机性。需要说明的是,播放源信号只有在用户佩戴耳机后使用音频设备播放音频信号时才能完成根据耳道对耳机的滤波器参数设置。The wearing prompt sound is the preset audio signal in the playback module of the headset. When the user wears the headset for the first time, or when the wearer actively controls the headset to test, the wearing prompt sound will be played to complete the filter parameters of the headset according to the ear canal. settings, and then play the audio information that the user wants to listen to. The playback source signal is the playback source audio used when the user wears the headset for the first time, or when the wearer actively controls the headset for testing. Since the noise-cancelling headset is mainly aimed at noise sources below 1000Hz, the daily playback source can provide sufficient frequency components below 1000Hz , so the playback source signal depends on the playback resource selected by the user, which is random. It should be noted that, the setting of the filter parameters for the headphones according to the ear canal can be completed only when the user wears the headphones and uses the audio device to play the audio signals.

在步骤S202和步骤S203中,当测试音频信号为有效音频信号时,通过反馈麦克风获取基于测试音频信号生成的反馈麦克风时域信号,即获取测试音频信号进入耳道内所形成的声波信号的时域表示。通过耳机中的电信号采集模块获取基于测试音频信号生成的扬声器时域信号,即在耳机的扬声器播放测试音频信号时,电信号采集模块回采的电信号的时域表示。反馈麦克风时域信号和扬声器时域信号的采样时长可以根据实际需求设定,当测试音频信号为佩戴提示音时,采样时长为佩戴提示音时长,当测试音频信号为播放源信号时,采样时长可以根据播放源信号自行设定。时域信号的信号采样率不低于16000Hz。In step S202 and step S203, when the test audio signal is a valid audio signal, the feedback microphone time domain signal generated based on the test audio signal is obtained through the feedback microphone, that is, the time domain of the sound wave signal formed by the test audio signal entering the ear canal is obtained. express. The speaker time domain signal generated based on the test audio signal is acquired by the electrical signal acquisition module in the earphone, that is, the time domain representation of the electrical signal collected by the electrical signal acquisition module when the test audio signal is played by the speaker of the earphone. The sampling duration of the feedback microphone time-domain signal and speaker time-domain signal can be set according to actual needs. When the test audio signal is the wearing tone, the sampling duration is the wearing tone, and when the test audio signal is the playback source signal, the sampling duration You can set it according to the playback source signal. The signal sampling rate of the time domain signal is not lower than 16000Hz.

在步骤S204中,测试音频信号在耳机中的传播路径包括一级传播路径和次级传播路径,一级传播路径为测试音频信号从前馈麦克风到反馈麦克风的传播路径,次级路径为测试音频信号从扬声器到反馈麦克风的传播路径。根据反馈麦克风时域信号和扬声器时域信号,确定与次级路径对应的第一频率响应。第一频率响应可以反映反馈麦克风频域信号和扬声器频域信号之间的相关性,例如通过将时域信号转换为频域信号后,根据频域信号之间的相关性确定第一频率响应。In step S204, the propagation path of the test audio signal in the earphone includes a primary propagation path and a secondary propagation path, the primary propagation path is the propagation path of the test audio signal from the feedforward microphone to the feedback microphone, and the secondary path is the test audio signal The propagation path from the speaker to the feedback microphone. A first frequency response corresponding to the secondary path is determined from the feedback microphone time domain signal and the speaker time domain signal. The first frequency response may reflect the correlation between the feedback microphone frequency domain signal and the speaker frequency domain signal. For example, after converting the time domain signal into a frequency domain signal, the first frequency response is determined according to the correlation between the frequency domain signals.

在步骤S205中,预设的频率响应集合和滤波器参数对应关系预先存储在耳机中,当预设的频率响应集合和滤波器参数对应关系中包括第一频率响应时,根据预设的频率响应集合和滤波器参数对应关系,确定与第一频率响应对应的滤波器参数作为目标滤波器参数;当预设的频率响应集合和滤波器参数对应关系中不包括第一频率响应时,可以从预设频率响应集合中选取与第一响应频率最接近的频率响应,最接近的频率响应对应的滤波器参数作为目标滤波器参数。In step S205, the preset corresponding relationship between the set of frequency responses and the filter parameters is pre-stored in the earphone, and when the preset set of frequency responses and the corresponding relationship between the filter parameters include the first frequency response, the preset frequency response The corresponding relationship between the set and the filter parameter, determine the filter parameter corresponding to the first frequency response as the target filter parameter; when the preset frequency response set and the corresponding relationship between the filter parameter does not include the first frequency response, it can be obtained from the preset frequency response. It is assumed that the frequency response closest to the first response frequency is selected from the frequency response set, and the filter parameter corresponding to the closest frequency response is used as the target filter parameter.

滤波器参数包括主动降噪滤波器参数和/或音效均衡滤波器参数,即目标滤波器参数可以只包括主动降噪滤波器参数,也可以只包括音效均衡滤波器参数,也可以同时包括主动降噪滤波器参数和音效均衡滤波器参数。是否包括音效均衡滤波器参数取决于耳机中是否包括音效均衡滤波器。主动降噪滤波器参数可以只包括前馈滤波器参数,也可以只包括反馈滤波器参数,也可以同时包括前馈滤波器参数和反馈滤波器参数。因此,目标滤波器参数包括以下方式之一:The filter parameters include active noise reduction filter parameters and/or sound effect equalization filter parameters, that is, the target filter parameters may include only active noise reduction filter parameters, only sound effect equalization filter parameters, or both active noise reduction filter parameters. Noise filter parameters and sound equalization filter parameters. Whether or not the EQ filter parameter is included depends on whether the EQ filter is included in the headset. The active noise reduction filter parameters may include only the feedforward filter parameters, may only include the feedback filter parameters, or may include both the feedforward filter parameters and the feedback filter parameters. Therefore, the target filter parameters include one of the following:

前馈滤波器参数、反馈滤波器参数和音效均衡滤波器参数;Feedforward filter parameters, feedback filter parameters and sound effect equalization filter parameters;

前馈滤波器参数和音效均衡滤波器参数;Feedforward filter parameters and sound effect equalization filter parameters;

前馈滤波器参数和反馈滤波器参数;Feedforward filter parameters and feedback filter parameters;

前馈滤波器参数;Feedforward filter parameters;

反馈滤波器参数。Feedback filter parameters.

在本公开示例性的实施例中,控制扬声器播放测试音频信号,基于测试音频信号,分别获取反馈麦克风时域信号和扬声器时域信号,即进入耳道内所形成的声波信号的时域表示和被电信号采集模块所回采的电信号的时域表示,根据反馈麦克风时域信号和扬声器时域信号,确定与次级路径对应的第一频率响应,根据预设的频率响应集合和滤波器参数对应关系,确定与第一频率响应对应的滤波器参数作为目标滤波器参数。由于预设的频率响应集合和滤波器参数对应关系包括多组对应关系,滤波器参数包括多种组合的滤波器系数,因此使用本公开中的方法,能够提供多种滤波器参数设置方式,并准确选择适配的滤波器参数,以提升降噪耳机对不同用户的耳道情况的降噪适应性,为用户提供耳机的个性化适配体验。In an exemplary embodiment of the present disclosure, the speaker is controlled to play the test audio signal, and based on the test audio signal, the feedback microphone time-domain signal and the speaker time-domain signal are respectively obtained, that is, the time-domain representation of the sound wave signal formed in the ear canal and the The time domain representation of the electrical signal recovered by the electrical signal acquisition module, according to the feedback microphone time domain signal and speaker time domain signal, to determine the first frequency response corresponding to the secondary path, according to the preset frequency response set corresponding to the filter parameters relationship, the filter parameter corresponding to the first frequency response is determined as the target filter parameter. Since the preset frequency response set and the corresponding relationship of filter parameters include multiple sets of corresponding relationships, and the filter parameters include filter coefficients in multiple combinations, the method in the present disclosure can provide multiple filter parameter setting methods, and Accurately select the appropriate filter parameters to improve the noise reduction adaptability of noise-cancelling headphones to the ear canal conditions of different users, and provide users with a personalized earphone adaptation experience.

本公开示例性的实施例中,提供一种耳机控制方法,应用于包括扬声器、反馈麦克风和控制器的耳机,耳机控制方法由耳机中的控制器执行,控制器至少包括电信号采集模块,耳机包括入耳式耳机、半入耳式耳机、头戴式耳机等。控制器还包括播放模块,播放模块包括播放控制电路和运行在播放控制电路上的播放控制软件。图3是根据一示例性的实施例示出的一种耳机控制方法的流程图,如图3所示,耳机控制方法包括以下步骤:In an exemplary embodiment of the present disclosure, an earphone control method is provided, which is applied to an earphone including a speaker, a feedback microphone and a controller. The earphone control method is performed by a controller in the earphone, and the controller at least includes an electrical signal acquisition module, and the earphone Including in-ear headphones, semi-in-ear headphones, headphones, etc. The controller also includes a playback module, and the playback module includes a playback control circuit and playback control software running on the playback control circuit. FIG. 3 is a flowchart of a method for controlling an earphone according to an exemplary embodiment. As shown in FIG. 3 , the method for controlling an earphone includes the following steps:

步骤S301,获取测试音频信号并控制扬声器播放测试音频信号;Step S301, acquiring the test audio signal and controlling the speaker to play the test audio signal;

步骤S302,通过反馈麦克风获取基于测试音频信号生成的反馈麦克风时域信号;其中,反馈麦克风时域信号指的是测试音频信号进入耳道内所形成的声波信号的时域表示;Step S302, obtaining the feedback microphone time-domain signal generated based on the test audio signal through the feedback microphone; wherein, the feedback microphone time-domain signal refers to the time-domain representation of the sound wave signal formed by the test audio signal entering the ear canal;

步骤S303,通过电信号采集模块获取基于测试音频信号生成的扬声器时域信号;其中,扬声器时域信号指的是测试音频信号被扬声器播放时被电信号采集模块所回采的电信号的时域表示;Step S303, obtaining the speaker time domain signal generated based on the test audio signal through the electrical signal acquisition module; wherein the speaker time domain signal refers to the time domain representation of the electrical signal recovered by the electrical signal acquisition module when the test audio signal is played by the speaker ;

步骤S304,对反馈麦克风时域信号进行时频转换处理,得到反馈麦克风频域信号;Step S304, performing time-frequency conversion processing on the feedback microphone time-domain signal to obtain the feedback microphone frequency-domain signal;

步骤S305,对扬声器时域信号进行时频转换处理,得到扬声器频域信号;Step S305, performing time-frequency conversion processing on the speaker time domain signal to obtain the speaker frequency domain signal;

步骤S306,根据反馈麦克风频域信号和扬声器频域信号以及预设的传递函数,确定与次级路径对应的第一频率响应,其中,传递函数用于表示反馈麦克风频域信号和扬声器频域信号的相关性;Step S306: Determine a first frequency response corresponding to the secondary path according to the feedback microphone frequency domain signal and the speaker frequency domain signal and a preset transfer function, where the transfer function is used to represent the feedback microphone frequency domain signal and the speaker frequency domain signal relevance;

步骤S307,根据预设的频率响应集合和滤波器参数对应关系,确定与第一频率响应对应的滤波器参数作为目标滤波器参数;其中,滤波器参数包括主动降噪滤波器参数和/或音效均衡滤波器参数。Step S307, according to the preset frequency response set and the corresponding relationship of the filter parameters, determine the filter parameters corresponding to the first frequency response as the target filter parameters; wherein, the filter parameters include active noise reduction filter parameters and/or sound effects Equalization filter parameters.

步骤S301-步骤S303与步骤S201-步骤S203的内容相同,步骤S307与步骤S205的内容相同,在此不再赘述。步骤S302和步骤S303之间没有时间顺序,步骤S304和步骤S305之间没有时间顺序。步骤S304和步骤S305在步骤S302和步骤S303之后执行。The contents of steps S301 to S303 are the same as those of steps S201 to S203 , and the contents of step S307 are the same as those of step S205 , which will not be repeated here. There is no time sequence between steps S302 and S303, and there is no time sequence between steps S304 and S305. Steps S304 and S305 are performed after steps S302 and S303.

在步骤S304和步骤S305中,获取到反馈麦克风时域信号和扬声器时域信号后,通过对扬声器时域信号和反馈麦克风时域信号进行分帧加窗处理,可以分别将麦克风时域信号和扬声器时域信号分成多帧信号,在后续相关计算中,以每一帧为单位进行逐帧计算。In step S304 and step S305, after acquiring the feedback microphone time domain signal and the speaker time domain signal, by performing frame-by-frame windowing processing on the speaker time domain signal and the feedback microphone time domain signal, the microphone time domain signal and the speaker time domain signal can be respectively The time domain signal is divided into multi-frame signals, and in the subsequent correlation calculation, the frame-by-frame calculation is performed in units of each frame.

例如,分帧加窗处理后,分为N个窗,时域信号(可以是扬声器时域信号,也可以是反馈麦克风时域信号)共有N帧。为了防止块效应,便于频域计算,帧与帧之间采用Δ重叠,即前一帧的尾部数据与下一帧头部数据相同,Δ为重叠比例,Δ∈(0,1)。Δ会根据信号采样率等其他平台因素不同而改变,通常为0.5。反馈麦克风时域信号记为fy(n,t),扬声器时域信号记为fx(n,t),其中,n表示帧序号,即N帧时域信号的第n帧,t表示第n帧中的采样时刻t。For example, after frame-by-frame windowing processing, it is divided into N windows, and the time-domain signal (which may be a speaker time-domain signal or a feedback microphone time-domain signal) has a total of N frames. In order to prevent block effect and facilitate frequency domain calculation, Δ overlap is used between frames, that is, the tail data of the previous frame is the same as the header data of the next frame, Δ is the overlap ratio, Δ∈(0,1). Δ varies based on other platform factors such as the signal sample rate, and is typically 0.5. The feedback microphone time domain signal is denoted as f y (n, t), and the speaker time domain signal is denoted as f x (n, t), where n represents the frame number, that is, the nth frame of the N frame time domain signal, and t represents the th Sampling time t in n frames.

对扬声器时域信号和反馈麦克风时域信号进行短时傅里叶变换(Short-TimeFourier Transform,STFT)得到对应的频域信号,短时傅里叶变换长度可以根据实际需求选择,当变换长度越大时,经过傅里叶变换后频谱中的频点的数量越多,对声音信号在频域上的分析越精确,变换长度不小于512点。扬声器频域信号记为Fx(n,k),反馈麦克风频域信号记为Fy(n,k),其中,k表示第n帧谱的第k根谱线。Perform Short-Time Fourier Transform (STFT) on the speaker time domain signal and the feedback microphone time domain signal to obtain the corresponding frequency domain signal. The length of the short-time Fourier transform can be selected according to actual needs. When it is large, the more frequency points in the spectrum after Fourier transform, the more accurate the analysis of the sound signal in the frequency domain, and the transform length is not less than 512 points. The speaker frequency domain signal is denoted as F x (n, k), and the feedback microphone frequency domain signal is denoted as F y (n, k), where k represents the kth spectral line of the nth frame spectrum.

在步骤S306中,预设的传递函数为反馈麦克风频域信号和扬声器频域信号之间的相关性的计算规则,根据反馈麦克风频域信号fy(n,k)和扬声器频域信号Fx(n,k),获得三种传递函数,分别记为TFα(k)、TFβ(k)和TFγ(k),通过以下公式获得:In step S306, the preset transfer function is the calculation rule of the correlation between the feedback microphone frequency domain signal and the speaker frequency domain signal, according to the feedback microphone frequency domain signal f y (n, k) and the speaker frequency domain signal F x (n, k), three transfer functions are obtained, denoted as TF α (k), TF β (k) and TF γ (k), respectively, obtained by the following formulas:

Figure BDA0003638384390000101
Figure BDA0003638384390000101

Figure BDA0003638384390000102
Figure BDA0003638384390000102

Figure BDA0003638384390000103
Figure BDA0003638384390000103

其中,N表示总帧数,r(…)表示求复数实部的运算,j(…)表示求复数虚部的运算,k表示第n帧谱的第k根谱线。Among them, N represents the total number of frames, r(…) represents the operation to find the real part of the complex number, j(…) represents the operation to find the imaginary part of the complex number, and k represents the kth spectral line of the nth frame spectrum.

根据三种传递函数,确定与次级路径对应的第一频率响应,第一频率响应记为

Figure BDA0003638384390000106
则:According to the three transfer functions, the first frequency response corresponding to the secondary path is determined, and the first frequency response is recorded as
Figure BDA0003638384390000106
but:

Figure BDA0003638384390000105
Figure BDA0003638384390000105

本公开示例性的实施例中,提供一种耳机控制方法,应用于包括扬声器、反馈麦克风和控制器的耳机,耳机控制方法由耳机中的控制器执行,控制器至少包括电信号采集模映,耳机包括入耳式耳机、半入耳式耳机、头戴式耳机等。控制器还包括播放模块,播放模块包括播放控制电路和运行在播放控制电路上的播放控制软件。图4是根据一示例性的实施例示出的一种耳机控制方法的流程图,如图4所示,耳机控制方法包括以下步骤:In an exemplary embodiment of the present disclosure, a headphone control method is provided, which is applied to a headphone including a speaker, a feedback microphone and a controller, the headphone control method is performed by a controller in the headphone, and the controller at least includes an electrical signal acquisition analog image, The earphones include in-ear earphones, semi-in-ear earphones, headphone and the like. The controller also includes a playback module, and the playback module includes a playback control circuit and playback control software running on the playback control circuit. FIG. 4 is a flowchart of a method for controlling an earphone according to an exemplary embodiment. As shown in FIG. 4 , the method for controlling an earphone includes the following steps:

步骤S401,获取测试音频信号并控制扬声器播放测试音频信号;Step S401, acquiring the test audio signal and controlling the speaker to play the test audio signal;

步骤S402,通过反馈麦克风获取基于测试音频信号生成的反馈麦克风时域信号;其中,反馈麦克风时域信号指的是测试音频信号进入耳道内所形成的声波信号的时域表示;Step S402, obtaining a feedback microphone time-domain signal generated based on the test audio signal through the feedback microphone; wherein, the feedback microphone time-domain signal refers to the time-domain representation of the sound wave signal formed by the test audio signal entering the ear canal;

步骤S403,通过电信号采集模块获取基于测试音频信号生成的扬声器时域信号;其中,扬声器时域信号指的是测试音频信号被扬声器播放时被电信号采集模块所回采的电信号的时域表示;Step S403, acquiring the speaker time domain signal generated based on the test audio signal through the electrical signal acquisition module; wherein the speaker time domain signal refers to the time domain representation of the electrical signal recovered by the electrical signal acquisition module when the test audio signal is played by the speaker ;

步骤S404,对反馈麦克风时域信号进行时频转换处理,得到反馈麦克风频域信号;Step S404, performing time-frequency conversion processing on the feedback microphone time-domain signal to obtain the feedback microphone frequency-domain signal;

步骤S405,对扬声器时域信号进行时频转换处理,得到扬声器频域信号;Step S405, performing time-frequency conversion processing on the speaker time domain signal to obtain the speaker frequency domain signal;

步骤S406,根据反馈麦克风频域信号和扬声器频域信号以及预设的传递函数,确定与次级路径对应的第一频率响应,其中,传递函数用于表示反馈麦克风频域信号和扬声器频域信号的相关性;Step S406: Determine a first frequency response corresponding to the secondary path according to the feedback microphone frequency domain signal and the speaker frequency domain signal and a preset transfer function, wherein the transfer function is used to represent the feedback microphone frequency domain signal and the speaker frequency domain signal relevance;

步骤S407,频率响应集合中包含多个预设响应参数,分别计算第一频率响应与每个预设响应参数之间的感知相似度,获得多个感知相似度;Step S407, the frequency response set includes a plurality of preset response parameters, respectively calculates the perceptual similarity between the first frequency response and each preset response parameter, and obtains multiple perceptual similarities;

步骤S408,选择多个感知相似度中数值最小的感知相似度对应的预设响应参数,作为目标频率响应;Step S408, selecting the preset response parameter corresponding to the perceptual similarity with the smallest value among the multiple perceptual similarities as the target frequency response;

步骤S409,根据预设的频率响应集合和滤波器参数对应关系,确定与目标频率响应对应的滤波器参数作为目标滤波器参数;其中,所述滤波器参数包括主动降噪滤波器参数和/或音效均衡滤波器参数。Step S409, according to the preset frequency response set and the corresponding relationship of the filter parameters, determine the filter parameters corresponding to the target frequency response as the target filter parameters; wherein, the filter parameters include active noise reduction filter parameters and/or Sound equalization filter parameters.

步骤S401-步骤S406与步骤S301-步骤S306的内容相同,在此不再赘述。The contents of steps S401 to S406 are the same as those of steps S301 to S306, and are not repeated here.

在步骤S407中,频率响应集合为预先存储在耳机的主动降噪芯片中的多个预设频率响应,预设频率响应的个数用M表示,分别计算第一频率响应与每个预设响应参数之间的感知相似度,获得多个感知相似度。In step S407, the set of frequency responses is a plurality of preset frequency responses pre-stored in the active noise reduction chip of the earphone, the number of the preset frequency responses is represented by M, and the first frequency response and each preset response are calculated respectively. Perceptual similarity between parameters to obtain multiple perceptual similarities.

在一种实施方式中,感知相似度的计算方式包括以下过程:In one embodiment, the calculation method of the perceptual similarity includes the following process:

一、选取反馈麦克风频域信号和扬声器频域信号的频谱中多个谱线对应的频率值作为频率参数。1. Select frequency values corresponding to multiple spectral lines in the frequency spectrum of the feedback microphone frequency domain signal and the speaker frequency domain signal as frequency parameters.

通过对扬声器时域信号和反馈麦克风时域信号进行短时傅里叶变换得到对应的频域信号,扬声器频域信号记为Fx(n,k),反馈麦克风频域信号记为Fy(n,k),其中,k表示第n帧谱的第k根谱线。短时傅里叶变换的长度不同导致单帧谱线的总数不同,每根谱线与物理频率的对应关系也不同。根据主动降噪和能量补偿的主要生效频段,即50~2000Hz频段,从主要生效频段中选择多个谱线,谱线的选择可以根据实际需求设定,例如选择50Hz、500Hz、1000Hz、2000Hz的谱线,选取反馈麦克风频域信号和扬声器频域信号的频谱中多个谱线对应的频率值作为频率参数,分别记为k0、k1、k2、k3The corresponding frequency domain signal is obtained by performing short-time Fourier transform on the loudspeaker time domain signal and the feedback microphone time domain signal, the loudspeaker frequency domain signal is denoted as F x (n, k), and the feedback microphone frequency domain signal is denoted as F y ( n, k), where k represents the kth spectral line of the nth frame spectrum. The length of the short-time Fourier transform leads to a different total number of spectral lines in a single frame, and the corresponding relationship between each spectral line and the physical frequency is also different. According to the main effective frequency band of active noise reduction and energy compensation, that is, the 50-2000Hz frequency band, select multiple spectral lines from the main effective frequency band. The choice of spectral lines can be set according to actual needs, such as 50Hz, 500Hz, 1000Hz, 2000Hz. Spectral line, select the frequency values corresponding to multiple spectral lines in the frequency spectrum of the feedback microphone frequency domain signal and the speaker frequency domain signal as frequency parameters, which are respectively denoted as k 0 , k 1 , k 2 , and k 3 .

在一个示例中,如果经过傅里叶变换后获得的频谱中,恰好包含了50Hz、500Hz、1000Hz、2000Hz这四条谱线,那么就直接使k0=50Hz,k1=500Hz、k2=1000Hz、k3=2000Hz。In an example, if the spectrum obtained after Fourier transform contains exactly four spectral lines of 50Hz, 500Hz, 1000Hz, and 2000Hz, then k 0 =50Hz, k 1 =500Hz, k 2 =1000Hz directly , k 3 =2000Hz.

在另一个示例中,如果经过傅里叶变换后获得的频谱中没有包含50Hz、500Hz、1000Hz、2000Hz这四条谱线,那就选择频谱中距离这四个频率值最近的频点对应的频率值作为k0、k1、k2、k3的具体数值。比如,k0=49Hz,k1=450Hz、k2=1005Hz、k3=2100Hz。In another example, if the spectrum obtained after Fourier transform does not contain the four spectral lines of 50Hz, 500Hz, 1000Hz, and 2000Hz, select the frequency value corresponding to the frequency point closest to the four frequency values in the spectrum as specific numerical values of k 0 , k 1 , k 2 , and k 3 . For example, k 0 =49 Hz, k 1 =450 Hz, k 2 =1005 Hz, k 3 =2100 Hz.

二、多个频率参数由小至大排列,相邻的两个频率参数之间形成频率区间。2. Multiple frequency parameters are arranged from small to large, and a frequency interval is formed between two adjacent frequency parameters.

多个频率参数由小至大排列,即k0、k1、k2、k3,相邻的两个频率参数之间形成多个频率区间,即频率区间k0~k1、频率区间k1~k2、频率区间k2~k3Multiple frequency parameters are arranged from small to large, namely k 0 , k 1 , k 2 , k 3 , and multiple frequency intervals are formed between two adjacent frequency parameters, namely frequency interval k 0 ~ k 1 , frequency interval k 1 to k 2 , frequency interval k 2 to k 3 .

三、对每个频率区间中的每个频点,计算每个频点对应的预设响应参数与第一频率响应的差值的绝对值作为第一参数。3. For each frequency point in each frequency interval, calculate the absolute value of the difference between the preset response parameter corresponding to each frequency point and the first frequency response as the first parameter.

每个频率区间中的每个频点,即第k个频点,对应的预设响应参数记为Sm(k),其中,下标m∈(1,M),k代表频点,表示M个预设响应参数中的一个,对每个频率区间中的每个频点,计算每个频点对应的预设响应参数与第一频率响应的差值的绝对值作为第一参数,则第一参数为:

Figure BDA0003638384390000121
For each frequency point in each frequency interval, that is, the kth frequency point, the corresponding preset response parameter is denoted as S m (k), where the subscript m∈(1, M), k represents the frequency point, indicating One of the M preset response parameters, for each frequency point in each frequency interval, the absolute value of the difference between the preset response parameter corresponding to each frequency point and the first frequency response is calculated as the first parameter, then The first parameter is:
Figure BDA0003638384390000121

四、对频率区间中每个频点对应的第一参数求和,获得第二参数。4. Summing the first parameters corresponding to each frequency point in the frequency interval to obtain the second parameter.

对频率区间中每个频点对应的第一参数求和,获得第二参数,则三个频率区间对应的第二参数分别为:

Figure BDA0003638384390000122
The first parameter corresponding to each frequency point in the frequency interval is summed to obtain the second parameter, then the second parameters corresponding to the three frequency intervals are:
Figure BDA0003638384390000122

五、对多个频率区间的第二参数进行加权求和,获得单个预设响应参数与第一频率响应的感知相似度。5. Perform a weighted summation on the second parameters in multiple frequency intervals to obtain the perceptual similarity between the single preset response parameter and the first frequency response.

对多个频率区间的第二参数进行加权求和,将三个第二参数对应的加权系数记为λ、μ、ν,加权系数可以根据实需求自行设定,但均为不小于0的值,例如令λ=2、μ=1、ν=0.1。对多个频率区间的第二参数进行加权求和后,获得单个预设响应参数与第一频率响应的感知相似度,感知相似度记为corrm,则:Perform weighted summation on the second parameters of multiple frequency intervals, and record the weighting coefficients corresponding to the three second parameters as λ, μ, and ν. The weighting coefficients can be set according to actual needs, but they are all values not less than 0. , for example, let λ=2, μ=1, and ν=0.1. After the weighted summation of the second parameters of multiple frequency intervals, the perceptual similarity between a single preset response parameter and the first frequency response is obtained, and the perceptual similarity is denoted as corr m , then:

Figure BDA0003638384390000131
Figure BDA0003638384390000131

其中,

Figure BDA0003638384390000132
为第一频率响应,Sm(k)为预设响应参数,m表示M个预设响应参数中的一个,k0、k1、k2、k3为频率参数,分别为从反馈麦克风频域信号和扬声器频域信号的频谱中选取的多个谱线对应的频率值,λ、μ、ν为加权系数。in,
Figure BDA0003638384390000132
is the first frequency response, S m (k) is a preset response parameter, m represents one of the M preset response parameters, k 0 , k 1 , k 2 , and k 3 are frequency parameters, which are respectively the frequency from the feedback microphone. The frequency values corresponding to multiple spectral lines selected in the frequency spectrum of the domain signal and the speaker frequency domain signal, and λ, μ, and ν are weighting coefficients.

六、分别计算每个预设响应参数与第一频率响应的感知相似度,获得多个感知相似度。6. Calculate the perceptual similarity between each preset response parameter and the first frequency response separately to obtain multiple perceptual similarities.

分别计算预设频率响应集合中的每个预设响应参数与第一频率响应的感知相似度,获得多个感知相似度。The perceptual similarity between each preset response parameter in the preset frequency response set and the first frequency response is calculated separately to obtain multiple perceptual similarities.

在步骤S408中,选择多个感知相似度中数值最小的感知相似度对应的预设响应参数,作为目标频率响应,目标频率响应记为opt,则

Figure BDA0003638384390000133
In step S408, the preset response parameter corresponding to the perceptual similarity with the smallest value among the multiple perceptual similarities is selected as the target frequency response, and the target frequency response is recorded as opt, then
Figure BDA0003638384390000133

在步骤S409中,将目标频率响应对应的滤波器参数作为目标滤波器参数,滤波器参数包括主动降噪滤波器参数和/或音效均衡滤波器参数。目标频率响应记为Sm(k),其与滤波器系数的映射关系包括以下五种:Sm(k)→{FFm,FBm,EQm},Sm(k)→{FFm,EQm},Sm(k)→{FFm,FBm},Sm(k)→{FFm},Sm(k)→{EQm},其中,Sm(k)中的m表示M个预设频率响应中的第m个,→表示映射关系。例如,S1(k)对应{FF1,FB1,EQ1}。In step S409, filter parameters corresponding to the target frequency response are used as target filter parameters, and the filter parameters include active noise reduction filter parameters and/or sound effect equalization filter parameters. The target frequency response is denoted as S m (k), and its mapping relationship with the filter coefficients includes the following five types: S m (k)→{FF m , FB m , EQ m }, S m (k)→{FF m , EQ m }, S m (k)→{FF m , FB m }, S m (k)→{FF m }, S m (k)→{EQ m }, where in S m (k) m represents the mth of the M preset frequency responses, and → represents the mapping relationship. For example, S 1 (k) corresponds to {FF 1 , FB 1 , EQ 1 }.

FFm表示主动降噪前馈滤波器的第m组系数,FBm表示主动降噪反馈滤波器的第m组系数,EQm表示EQ滤波器的第m组系数。以上五种映射关系表示五种滤波器参数组合方案:{FFm,FBm,EQm}表示前馈主动降噪滤波器参数、反馈主动降噪滤波器参数、EQ滤波器参数;{FFm,EQm}表示前馈主动降噪滤波器参数、EQ滤波器参数。由于反馈主动降噪滤波器对耳道参数不敏感,因此可以不包括反馈主动降噪滤波器参数。{FFm,FBm}表示前馈主动降噪滤波器参数、反馈主动降噪滤波器参数,音频设备中没有提供EQ滤波器或者没有对其进行参数设置需求时,使用该方案。{FFm}表示仅包括前馈主动降噪滤波器参数;{EQm}仅包括EQ滤波器参数,是一种特殊情况,适用于没有主动降噪滤波器但有EQ滤波器的耳机。以上五种滤波器参数组合方案的选择取决于耳机中的芯片类型和耳机的产品定位。FF m represents the m-th group of coefficients of the active noise reduction feedforward filter, FB m represents the m-th group of coefficients of the active noise reduction feedback filter, and EQ m represents the m-th group of coefficients of the EQ filter. The above five mapping relationships represent five filter parameter combination schemes: {FF m , FB m , EQ m } represents feedforward active noise reduction filter parameters, feedback active noise reduction filter parameters, and EQ filter parameters; {FF m , EQ m } represents feedforward active noise reduction filter parameters, EQ filter parameters. Since the feedback active noise reduction filter is not sensitive to ear canal parameters, the feedback active noise reduction filter parameters may not be included. {FF m , FB m } represents the parameters of the feedforward active noise reduction filter and the feedback active noise reduction filter parameters. This scheme is used when the audio device does not provide an EQ filter or does not require parameter setting for it. {FF m } indicates that only feedforward ANC filter parameters are included; {EQ m } includes only EQ filter parameters, which is a special case and applies to headphones without ANC filters but with EQ filters. The choice of the above five filter parameter combination schemes depends on the type of chip in the headset and the product positioning of the headset.

在本公开示例性的实施例中,控制扬声器播放测试音频信号,基于测试音频信号,分别获取反馈麦克风时域信号和扬声器时域信号,即进入耳道内所形成的声波信号的时域表示和被电信号采集模块所回采的电信号的时域表示,通过测试音频信号生成的根据反馈麦克风时域信号和扬声器时域信号,确定与次级路径对应的第一频率响应,根据预设的频率响应集合与滤波器参数之间的对应关系,确定预设响应集合中与第一频率响应最接近的预设响应参数,作为目标响应参数,目标响应参数对应的滤波器参数为目标滤波器参数。因此使用本公开中的方法,能够提供多种滤波器参数设置方式,并准确选择适配的滤波器参数,以提升降噪耳机对不同用户的耳道情况的降噪适应性,为用户提供耳机的个性化适配体验。In an exemplary embodiment of the present disclosure, the speaker is controlled to play a test audio signal, and based on the test audio signal, the feedback microphone time-domain signal and speaker time-domain signal are obtained respectively, that is, the time-domain representation of the sound wave signal formed in the ear canal and the The time domain representation of the electrical signal retrieved by the electrical signal acquisition module, by testing the audio signal generated according to the feedback microphone time domain signal and speaker time domain signal, to determine the first frequency response corresponding to the secondary path, according to the preset frequency response The correspondence between the set and the filter parameters determines the preset response parameter closest to the first frequency response in the preset response set as the target response parameter, and the filter parameter corresponding to the target response parameter is the target filter parameter. Therefore, using the method in the present disclosure, it is possible to provide a variety of filter parameter setting methods, and accurately select the appropriate filter parameters, so as to improve the noise reduction adaptability of the noise reduction headphones to the ear canal conditions of different users, and provide users with headphones personalized adaptation experience.

本公开示例性的实施例中,提供了一种耳机控制装置,应用于耳机,耳机包括扬声器、反馈麦克风和控制器,耳机控制装置设置于控制器内,控制器至少包括电信号采集模块,电信号采集模块用于对反馈麦克风信号和扬声器信号进行采集。控制器还包括播放模块,播放模块包括播放控制电路和运行在播放控制电路上的播放控制软件。图5是根据一示例性的实施例示出的一种耳机控制装置的框图,如图5所示,耳机控制装置包括:In an exemplary embodiment of the present disclosure, an earphone control device is provided, which is applied to an earphone. The earphone includes a speaker, a feedback microphone and a controller. The earphone control device is arranged in the controller. The controller at least includes an electrical signal acquisition module. The signal acquisition module is used to collect feedback microphone signals and speaker signals. The controller also includes a playback module, and the playback module includes a playback control circuit and playback control software running on the playback control circuit. Fig. 5 is a block diagram of an earphone control device according to an exemplary embodiment. As shown in Fig. 5 , the earphone control device includes:

播放模块501,被配置为获取测试音频信号并控制所述扬声器播放测试音频信号;Playing module 501, is configured to obtain the test audio signal and control the speaker to play the test audio signal;

第一获取模块502,被配置为通过所述反馈麦克风获取基于所述测试音频信号生成的反馈麦克风时域信号;其中,所述反馈麦克风时域信号指的是所述测试音频信号进入耳道内所形成的声波信号的时域表示;The first obtaining module 502 is configured to obtain, through the feedback microphone, a feedback microphone time-domain signal generated based on the test audio signal; wherein, the feedback microphone time-domain signal refers to where the test audio signal enters the ear canal. the time domain representation of the formed acoustic signal;

第二获取模块503,被配置为通过所述电信号采集模块获取基于所述测试音频信号生成的扬声器时域信号;其中,所述扬声器时域信号指的是所述测试音频信号被所述扬声器播放时被所述电信号采集模块所回采的电信号的时域表示;The second acquisition module 503 is configured to acquire, through the electrical signal acquisition module, a speaker time domain signal generated based on the test audio signal; wherein the speaker time domain signal refers to the fact that the test audio signal is generated by the speaker by the speaker The time domain representation of the electrical signal acquired by the electrical signal acquisition module during playback;

第一确定模块504,被配置为根据所述反馈麦克风时域信号和所述扬声器时域信号的相关性,确定与次级路径对应的第一频率响应,其中,所述次级路径指的是所述测试音频信号从所述扬声器到反馈麦克风的传播路径;The first determining module 504 is configured to determine a first frequency response corresponding to the secondary path according to the correlation between the feedback microphone time-domain signal and the speaker time-domain signal, wherein the secondary path refers to the propagation path of the test audio signal from the speaker to the feedback microphone;

第二确定模块505,被配置为根据预设的频率响应集合和滤波器参数对应关系,确定与所述第一频率响应对应的滤波器参数作为目标滤波器参数;其中,所述滤波器参数包括主动降噪滤波器参数和/或音效均衡滤波器参数。The second determination module 505 is configured to determine the filter parameter corresponding to the first frequency response as the target filter parameter according to the preset frequency response set and the corresponding relationship between the filter parameters; wherein the filter parameters include Active Noise Cancellation filter parameters and/or EQ filter parameters.

在一示例性的实施例中,所述第一确定模块504还被配置为:In an exemplary embodiment, the first determining module 504 is further configured to:

对所述反馈麦克风时域信号进行时频转换处理,得到反馈麦克风频域信号;performing time-frequency conversion processing on the feedback microphone time-domain signal to obtain a feedback microphone frequency-domain signal;

对所述扬声器时域信号进行时频转换处理,得到扬声器频域信号;performing time-frequency conversion processing on the loudspeaker time-domain signal to obtain a loudspeaker frequency-domain signal;

根据所述反馈麦克风频域信号和所述扬声器频域信号以及预设的传递函数,确定与所述次级路径对应的第一频率响应,其中,所述传递函数用于表示所述反馈麦克风频域信号和所述扬声器频域信号的相关性。Determine a first frequency response corresponding to the secondary path according to the feedback microphone frequency domain signal and the speaker frequency domain signal and a preset transfer function, wherein the transfer function is used to represent the feedback microphone frequency domain signal and the speaker frequency domain signal correlation.

在一示例性的实施例中,所述第二确定模块505还被配置为:In an exemplary embodiment, the second determining module 505 is further configured to:

根据预设的频率响应集合和滤波器参数对应关系,确定与目标频率响应对应的滤波器参数作为目标滤波器参数,其中,所述频率响应集合中包含多个预设响应参数,选择所述多个预设响应参数中与所述第一频率响应最接近的预设响应参数作为目标频率响应。According to the preset frequency response set and the corresponding relationship between the filter parameters, the filter parameters corresponding to the target frequency response are determined as the target filter parameters, wherein the frequency response set includes a plurality of preset response parameters, and the selected The preset response parameter closest to the first frequency response among the preset response parameters is used as the target frequency response.

在一示例性的实施例中,所述述第二确定模块505还被配置为:In an exemplary embodiment, the second determining module 505 is further configured to:

分别计算所述第一频率响应与每个所述预设响应参数之间的感知相似度,获得多个所述感知相似度;respectively calculating the perceptual similarity between the first frequency response and each of the preset response parameters to obtain a plurality of the perceptual similarity;

选择多个所述感知相似度中数值最小的感知相似度对应的预设响应参数,作为目标频率响应。A preset response parameter corresponding to the perceptual similarity with the smallest value among the plurality of perceptual similarities is selected as the target frequency response.

在一示例性的实施例中,所述述第二确定模块505还被配置为:In an exemplary embodiment, the second determining module 505 is further configured to:

选取所述反馈麦克风频域信号和所述扬声器频域信号的频谱中多个谱线对应的频率值作为频率参数;Select frequency values corresponding to multiple spectral lines in the frequency spectrum of the feedback microphone frequency domain signal and the speaker frequency domain signal as frequency parameters;

所述多个频率参数由小至大排列,相邻的两个频率参数之间形成频率区间;The plurality of frequency parameters are arranged from small to large, and a frequency interval is formed between two adjacent frequency parameters;

对每个所述频率区间中的每个频点,计算每个频点对应的所述预设响应参数与所述第一频率响应的差值的绝对值作为第一参数;For each frequency point in each of the frequency intervals, calculate the absolute value of the difference between the preset response parameter corresponding to each frequency point and the first frequency response as the first parameter;

对所述频率区间中每个频点对应的所述第一参数求和,获得第二参数;summing the first parameters corresponding to each frequency point in the frequency interval to obtain a second parameter;

对多个所述频率区间的第二参数进行加权求和,获得单个预设响应参数与所述第一频率响应的感知相似度;Weighted summation is performed on the second parameters of a plurality of the frequency intervals to obtain the perceptual similarity between a single preset response parameter and the first frequency response;

分别计算每个所述预设响应参数与所述第一频率响应的感知相似度,获得多个所述感知相似度。The perceptual similarity between each of the preset response parameters and the first frequency response is calculated separately to obtain a plurality of the perceptual similarity.

在一示例性的实施例中,所述主动降噪滤波器参数包括前馈滤波器参数和反馈滤波器参数,所述目标滤波器参数包括以下方式之一:In an exemplary embodiment, the active noise reduction filter parameters include feedforward filter parameters and feedback filter parameters, and the target filter parameters include one of the following methods:

所述前馈滤波器参数、所述反馈滤波器参数和所述音效均衡滤波器参数;the feedforward filter parameters, the feedback filter parameters and the sound effect equalization filter parameters;

所述前馈滤波器参数和所述音效均衡滤波器参数;the feedforward filter parameters and the sound effect equalization filter parameters;

所述前馈滤波器参数和所述反馈滤波器参数;the feedforward filter parameters and the feedback filter parameters;

所述前馈滤波器参数;the feedforward filter parameters;

所述反馈滤波器参数。the feedback filter parameters.

在一示例性的实施例中,所述测试音频信号包括佩戴提示音信号或者播放源信号。In an exemplary embodiment, the test audio signal includes a wearing sound signal or a playback source signal.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。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.

本公开还提供了一种降噪耳机,该耳机上设置上述耳机控制装置,以实现上述实施例中的耳机控制方法。图6是根据一示例性的实施例示出的一种降噪耳机700的框图。The present disclosure also provides a noise-cancelling earphone, the earphone is provided with the above-mentioned earphone control device, so as to realize the earphone control method in the above-mentioned embodiment. FIG. 6 is a block diagram of a noise-cancelling earphone 700 according to an exemplary embodiment.

参照图6,降噪耳机700可以包括以下一个或多个组件:处理组件702,存储器704,电源组件706,多媒体组件708,音频组件710,输入/输出(I/O)的接口712,传感器组件714,以及通信组件716。6, noise-cancelling headphones 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714 , and a communication component 716 .

处理组件702通常控制降噪耳机700的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件702可以包括一个或多个处理器720来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件702可以包括一个或多个模块,便于处理组件702和其他组件之间的交互。例如,处理组件702可以包括多媒体模块,以方便多媒体组件708和处理组件702之间的交互。The processing component 702 generally controls the overall operation of the noise-cancelling headset 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 can include one or more processors 720 to execute instructions to perform all or some of the steps of the methods described above. Additionally, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.

存储器704被配置为存储各种类型的数据以支持在降噪耳机700的操作。这些数据的示例包括用于在降噪耳机700上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器704可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。Memory 704 is configured to store various types of data to support operation in noise-cancelling headphones 700 . Examples of such data include instructions for any application or method operating on the noise-cancelling headset 700, contact data, phonebook data, messages, pictures, videos, and the like. Memory 704 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

电源组件706为降噪耳机700的各种组件提供电源。电源组件706可以包括电源管理系统,一个或多个电源,及其他与为降噪耳机700生成、管理和分配电力相关联的组件。Power supply assembly 706 provides power to the various components of noise-cancelling earphone 700 . Power components 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to noise-cancelling headphones 700 .

多媒体组件708包括在所述降噪耳机700和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件708包括一个前置摄像头和/或后置摄像头。当降噪耳机700处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。Multimedia component 708 includes a screen that provides an output interface between the noise-cancelling headphones 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action. In some embodiments, multimedia component 708 includes a front-facing camera and/or a rear-facing camera. When the noise-cancelling earphone 700 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件710被配置为输出和/或输入音频信号。例如,音频组件710包括一个麦克风(MIC),当降噪耳机700处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器704或经由通信组件716发送。在一些实施例中,音频组件710还包括一个扬声器,用于输出音频信号。Audio component 710 is configured to output and/or input audio signals. For example, audio component 710 includes a microphone (MIC) that is configured to receive external audio signals when noise-cancelling headset 700 is in operating modes, such as calling mode, recording mode, and voice recognition mode. The received audio signal may be further stored in memory 704 or transmitted via communication component 716 . In some embodiments, audio component 710 also includes a speaker for outputting audio signals.

I/O接口712为处理组件702和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 712 provides an interface between the processing component 702 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.

传感器组件714包括一个或多个传感器,用于为降噪耳机700提供各个方面的状态评估。例如,传感器组件714可以检测到降噪耳机700的打开/关闭状态,组件的相对定位,例如所述组件为降噪耳机700的显示器和小键盘,传感器组件714还可以检测降噪耳机700或降噪耳机700一个组件的位置改变,用户与降噪耳机700接触的存在或不存在,降噪耳机700方位或加速/减速和降噪耳机700的温度变化。传感器组件714可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件714还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件714还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 714 includes one or more sensors for providing status assessments of various aspects of noise-cancelling headphones 700 . For example, the sensor assembly 714 can detect the on/off state of the noise-cancelling headphones 700, the relative positioning of components, such as the display and keypad of the noise-cancelling headphones 700, and the sensor assembly 714 can also detect the noise-cancelling headphones 700 or drop Changes in the position of a component of the noise-cancelling headset 700 , presence or absence of user contact with the noise-cancelling headset 700 , orientation or acceleration/deceleration of the noise-cancelling headset 700 , and temperature changes in the noise-cancelling headset 700 . Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

通信组件716被配置为便于降噪耳机700和其他设备之间有线或无线方式的通信。降噪耳机700可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件716经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件716还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。Communication component 716 is configured to facilitate wired or wireless communication between noise-cancelling headset 700 and other devices. Noise-cancelling headphones 700 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 716 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,降噪耳机700可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, noise-cancelling headphones 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field Programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for carrying out the above method.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器704,上述指令可由降噪耳机700的处理器720执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as memory 704 including instructions, executable by the processor 720 of the noise-cancelling headset 700 to perform the method described above. For example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

一种非临时性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器调用时,使得装置能够执行一种耳机控制方法。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, an apparatus can execute an earphone control method.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。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 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 (10)

1. A headset control method applied to a headset comprising a speaker, a feedback microphone and a controller, the method being performed by the controller, the controller comprising at least an electrical signal acquisition module, the method comprising:
acquiring a test audio signal and controlling the loudspeaker to play the test audio signal;
acquiring, by the feedback microphone, a feedback microphone time domain signal generated based on the test audio signal; wherein the feedback microphone time domain signal refers to a time domain representation of a sound wave signal formed by the test audio signal entering the ear canal;
acquiring a loudspeaker time domain signal generated based on the test audio signal through the electric signal acquisition module; wherein the speaker time domain signal refers to a time domain representation of an electrical signal retrieved by the electrical signal acquisition module when the test audio signal is played by the speaker;
determining a first frequency response corresponding to a secondary path according to a correlation of the feedback microphone time domain signal and the speaker time domain signal, wherein the secondary path refers to a propagation path of the test audio signal from the speaker to the feedback microphone;
determining a filter parameter corresponding to the first frequency response as a target filter parameter according to a preset frequency response set and a filter parameter corresponding relation; wherein the filter parameters comprise active noise reduction filter parameters and/or sound effect equalization filter parameters.
2. The headphone control method of claim 1 wherein determining a first frequency response corresponding to a secondary path based on a correlation of the feedback microphone time domain signal and the speaker time domain signal comprises:
performing time-frequency conversion processing on the feedback microphone time domain signal to obtain a feedback microphone frequency domain signal;
performing time-frequency conversion processing on the loudspeaker time domain signal to obtain a loudspeaker frequency domain signal;
and determining a first frequency response corresponding to the secondary path according to the feedback microphone frequency domain signal, the loudspeaker frequency domain signal and a preset transfer function, wherein the transfer function is used for representing the correlation of the feedback microphone frequency domain signal and the loudspeaker frequency domain signal.
3. The method of claim 2, wherein the determining a filter parameter corresponding to the first frequency response as a target filter parameter according to a preset frequency response set and filter parameter correspondence comprises:
the frequency response set comprises a plurality of preset response parameters, and a preset response parameter which is closest to the first frequency response in the plurality of preset response parameters is selected as a target frequency response; determining a filter parameter corresponding to the target frequency response as a target filter parameter.
4. The headphone control method according to claim 3, wherein the selecting, as the target frequency response, a preset response parameter that is closest to the first frequency response among the plurality of preset response parameters comprises:
respectively calculating the perception similarity between the first frequency response and each preset response parameter to obtain a plurality of perception similarities;
and selecting a preset response parameter corresponding to the perception similarity with the minimum value in the plurality of perception similarities as a target frequency response.
5. The headphone control method according to claim 4, wherein the separately calculating perceptual similarity between the first frequency response and each of the preset response parameters to obtain a plurality of the perceptual similarities comprises:
selecting frequency values corresponding to a plurality of spectral lines in the frequency spectrums of the feedback microphone frequency domain signal and the loudspeaker frequency domain signal as frequency parameters;
the multiple frequency parameters are arranged from small to large, and a frequency interval is formed between every two adjacent frequency parameters;
for each frequency point in each frequency interval, calculating an absolute value of a difference value between the preset response parameter corresponding to each frequency point and the first frequency response as a first parameter;
summing the first parameters corresponding to each frequency point in the frequency interval to obtain second parameters;
carrying out weighted summation on the second parameters of the frequency intervals to obtain the perceptual similarity between a single preset response parameter and the first frequency response;
and respectively calculating the perception similarity of each preset response parameter and the first frequency response to obtain a plurality of perception similarities.
6. The headphone control method according to any one of claims 1-5, wherein the active noise reduction filter parameters include feedforward filter parameters and feedback filter parameters, and the target filter parameters include one of:
the feedforward filter parameter, the feedback filter parameter and the sound effect equalization filter parameter;
the feedforward filter parameter and the sound effect equalization filter parameter;
the feedforward filter parameter and the feedback filter parameter;
the feedforward filter parameter;
the feedback filter parameter.
7. The headphone control method according to any one of claims 1-5, wherein the test audio signal comprises a wearing cue tone signal or a playback source signal.
8. The utility model provides an earphone controlling means, its characterized in that is applied to the earphone, the earphone includes speaker, feedback microphone and controller, install in the controller, the controller includes the signal of telecommunication collection module at least, earphone controlling means includes:
the playing module is configured to acquire a test audio signal and control the loudspeaker to play the test audio signal;
a first acquisition module configured to acquire, by the feedback microphone, a feedback microphone time domain signal generated based on the test audio signal; wherein the feedback microphone time domain signal refers to a time domain representation of a sound wave signal formed by the test audio signal entering the ear canal;
a second obtaining module configured to obtain, by the electrical signal acquisition module, a speaker time domain signal generated based on the test audio signal; wherein the speaker time domain signal refers to a time domain representation of an electrical signal retrieved by the electrical signal acquisition module when the test audio signal is played by the speaker;
a first determining module configured to determine a first frequency response corresponding to a secondary path according to a correlation of the feedback microphone time domain signal and the speaker time domain signal, wherein the secondary path refers to a propagation path of the test audio signal from the speaker to the feedback microphone;
a second determining module configured to determine a filter parameter corresponding to the first frequency response as a target filter parameter according to a preset frequency response set and a filter parameter correspondence; wherein the filter parameters comprise active noise reduction filter parameters and/or audio equalization filter parameters.
9. A noise reduction earphone is characterized by comprising a shell, a feedforward microphone, a feedback microphone, a loudspeaker and a controller, wherein the feedforward microphone, the feedback microphone, the loudspeaker and the controller are arranged on the shell;
the feedforward microphone is used for collecting sound wave signals in the surrounding environment of the earphone;
the feedback microphone is used for collecting sound wave signals in the auditory canal;
the loudspeaker is used for playing sound wave signals;
the controller is communicatively coupled to the feedforward microphone, the feedback microphone, and the speaker, respectively, the controller including a processor and a memory, the memory storing computer program instructions executable by the processor, the processor configured to invoke the computer program instructions to perform the method of any of claims 1-7.
10. A non-transitory computer-readable storage medium having stored thereon computer program instructions that, when invoked by a processor, perform the method of any one of claims 1-7.
CN202210508588.6A 2022-05-11 2022-05-11 Earphone control method and device, noise reduction earphone and storage medium Pending CN114666702A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210508588.6A CN114666702A (en) 2022-05-11 2022-05-11 Earphone control method and device, noise reduction earphone and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210508588.6A CN114666702A (en) 2022-05-11 2022-05-11 Earphone control method and device, noise reduction earphone and storage medium

Publications (1)

Publication Number Publication Date
CN114666702A true CN114666702A (en) 2022-06-24

Family

ID=82037767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210508588.6A Pending CN114666702A (en) 2022-05-11 2022-05-11 Earphone control method and device, noise reduction earphone and storage medium

Country Status (1)

Country Link
CN (1) CN114666702A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115410547A (en) * 2022-08-25 2022-11-29 北京小米移动软件有限公司 Audio processing method and device, electronic equipment and storage medium
CN116132900A (en) * 2022-12-02 2023-05-16 宁波方太厨具有限公司 Self-checking method, device and medium of active noise reduction system
CN116579284A (en) * 2023-07-12 2023-08-11 深圳飞骧科技股份有限公司 Method, system and related equipment for designing frequency band of surface acoustic wave filter
WO2024060458A1 (en) * 2022-09-21 2024-03-28 深圳市汇顶科技股份有限公司 Active noise cancelling method and active noise cancelling earpiece
US12354584B2 (en) 2022-09-21 2025-07-08 Shenzhen GOODIX Technology Co., Ltd. Active noise cancellation method and active noise cancellation earphones

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100061564A1 (en) * 2007-02-07 2010-03-11 Richard Clemow Ambient noise reduction system
CN102543060A (en) * 2011-12-27 2012-07-04 瑞声声学科技(深圳)有限公司 Active noise control system and design method thereof
US20150296296A1 (en) * 2014-04-14 2015-10-15 Cirrus Logic, Inc. Frequency-shaped noise-based adaptation of secondary path adaptive response in noise-canceling personal audio devices
US20180270565A1 (en) * 2017-03-20 2018-09-20 Bose Corporation Audio signal processing for noise reduction
CN110853665A (en) * 2019-11-28 2020-02-28 歌尔科技有限公司 Method, system and equipment for reducing noise of digital microphone and computer storage medium
CN110972014A (en) * 2019-12-11 2020-04-07 歌尔智能科技有限公司 Parameter adjustment method and device for active noise reduction earphone and wireless earphone
CN112929807A (en) * 2021-01-25 2021-06-08 深圳市卓翼科技股份有限公司 Method, system, test terminal and storage medium for automatically correcting filter coefficients
CN113409754A (en) * 2021-07-26 2021-09-17 北京安声浩朗科技有限公司 Active noise reduction method, active noise reduction device and semi-in-ear active noise reduction earphone
CN113421540A (en) * 2021-07-26 2021-09-21 北京安声浩朗科技有限公司 Active noise reduction method, active noise reduction device and semi-in-ear active noise reduction earphone
CN113766384A (en) * 2021-09-24 2021-12-07 北京小米移动软件有限公司 Method and device for generating target parameters of energy compensation filter and earphone
WO2022048334A1 (en) * 2020-09-03 2022-03-10 Oppo广东移动通信有限公司 Testing method and apparatus, earphones, and readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100061564A1 (en) * 2007-02-07 2010-03-11 Richard Clemow Ambient noise reduction system
CN102543060A (en) * 2011-12-27 2012-07-04 瑞声声学科技(深圳)有限公司 Active noise control system and design method thereof
US20150296296A1 (en) * 2014-04-14 2015-10-15 Cirrus Logic, Inc. Frequency-shaped noise-based adaptation of secondary path adaptive response in noise-canceling personal audio devices
US20180270565A1 (en) * 2017-03-20 2018-09-20 Bose Corporation Audio signal processing for noise reduction
CN110853665A (en) * 2019-11-28 2020-02-28 歌尔科技有限公司 Method, system and equipment for reducing noise of digital microphone and computer storage medium
CN110972014A (en) * 2019-12-11 2020-04-07 歌尔智能科技有限公司 Parameter adjustment method and device for active noise reduction earphone and wireless earphone
WO2022048334A1 (en) * 2020-09-03 2022-03-10 Oppo广东移动通信有限公司 Testing method and apparatus, earphones, and readable storage medium
CN112929807A (en) * 2021-01-25 2021-06-08 深圳市卓翼科技股份有限公司 Method, system, test terminal and storage medium for automatically correcting filter coefficients
CN113409754A (en) * 2021-07-26 2021-09-17 北京安声浩朗科技有限公司 Active noise reduction method, active noise reduction device and semi-in-ear active noise reduction earphone
CN113421540A (en) * 2021-07-26 2021-09-21 北京安声浩朗科技有限公司 Active noise reduction method, active noise reduction device and semi-in-ear active noise reduction earphone
CN113766384A (en) * 2021-09-24 2021-12-07 北京小米移动软件有限公司 Method and device for generating target parameters of energy compensation filter and earphone

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郭剑锋;曹寅;杨飞然;杨军;: "一种实用的数字有源降噪耳机设计方法", 网络新媒体技术, no. 02, 15 March 2020 (2020-03-15) *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115410547A (en) * 2022-08-25 2022-11-29 北京小米移动软件有限公司 Audio processing method and device, electronic equipment and storage medium
WO2024060458A1 (en) * 2022-09-21 2024-03-28 深圳市汇顶科技股份有限公司 Active noise cancelling method and active noise cancelling earpiece
US12354584B2 (en) 2022-09-21 2025-07-08 Shenzhen GOODIX Technology Co., Ltd. Active noise cancellation method and active noise cancellation earphones
CN116132900A (en) * 2022-12-02 2023-05-16 宁波方太厨具有限公司 Self-checking method, device and medium of active noise reduction system
CN116579284A (en) * 2023-07-12 2023-08-11 深圳飞骧科技股份有限公司 Method, system and related equipment for designing frequency band of surface acoustic wave filter
CN116579284B (en) * 2023-07-12 2024-04-12 深圳飞骧科技股份有限公司 Method, system and related equipment for designing frequency band of surface acoustic wave filter
WO2025011200A1 (en) * 2023-07-12 2025-01-16 深圳飞骧科技股份有限公司 Design method and system for frequency band of surface acoustic wave filter and related device

Similar Documents

Publication Publication Date Title
CN114666702A (en) Earphone control method and device, noise reduction earphone and storage medium
CN108430003B (en) Sound effect compensation method and device, readable storage medium and terminal
JP6505252B2 (en) Method and apparatus for processing audio signals
CN106664473A (en) Information-processing device, information processing method, and program
CN114040285B (en) Method and device for generating feedforward filter parameters of earphone, earphone and storage medium
CN114974199B (en) Noise reduction method, device, noise reduction earphones and medium
CN114630239B (en) Method, device and storage medium for reducing earphone blocking effect
CN113810828B (en) Audio signal processing method, device, readable storage medium and earphone
CN113596665B (en) Howling sound suppression method, device, earphone and storage medium
EP4203447A1 (en) Sound processing method and apparatus thereof
CN111294704A (en) Audio processing method, device and storage medium
CN113473304A (en) Howling suppression method, howling suppression device, earphone and storage medium
CN115884030A (en) Noise reduction method and device, earphone equipment, storage medium and chip
CN112037825B (en) Audio signal processing method and device and storage medium
CN114786085A (en) Noise reduction control method and device, noise reduction earphone and storage medium
CN114040309B (en) Wind noise detection method and device, electronic equipment and storage medium
CN115714944A (en) Audio processing method and device, earphone and storage medium
CN114513723A (en) Howling suppression method, device, earphone and storage medium
CN114501224A (en) Sound playback method, device, wearable device and storage medium
CN115410547B (en) Audio processing method, device, electronic equipment and storage medium
WO2024051638A1 (en) Sound-field calibration method, and electronic device and system
CN114040284B (en) Noise processing method, noise processing device, terminal and storage medium
CN115278441A (en) Voice detection method, device, earphone and storage medium
CN113194387A (en) Audio signal processing method, audio signal processing device, electronic equipment and storage medium
CN113936676A (en) Sound adjusting method and device and electronic equipment

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