回声消除方法、延时估计方法、装置、存储介质及设备Echo cancellation method, delay estimation method, device, storage medium and equipment
技术领域Technical field
本申请属于音频处理技术领域,尤其涉及一种回声消除方法、延时估计方法、装置、存储介质及设备。The present application belongs to the technical field of audio processing, and particularly relates to an echo cancellation method, a delay estimation method, a device, a storage medium, and equipment.
背景技术Background technique
回声的产生是由于扬声器和麦克风之间存在声学回路。在通话时,远端设备的音频信号经过通信连接传输到近端设备,被近端设备的扬声器放出,经过扬声器与麦克风之间的声学回路后被麦克风采集到,再经过通信连接传回远端设备,这样,远端设备的用户便会听到自己的回声。The echo is due to the acoustic loop between the speaker and the microphone. During a call, the audio signal of the far-end device is transmitted to the near-end device through the communication connection, released by the speaker of the near-end device, collected by the microphone after passing through the acoustic circuit between the speaker and the microphone, and then transmitted back to the far end through the communication connection Device, so that the user of the remote device will hear his own echo.
发明内容Summary of the invention
本申请实施例提供一种回声消除方法、延时估计方法、装置、存储介质及设备,可以提高通话质量。Embodiments of the present application provide an echo cancellation method, delay estimation method, device, storage medium, and equipment, which can improve call quality.
第一方面,本申请实施例提供一种回声消除方法,应用于电子设备,包括:In a first aspect, an embodiment of the present application provides an echo cancellation method, which is applied to an electronic device and includes:
从远端设备处获取远端音频信号;Obtain the far-end audio signal from the remote device;
通过麦克风获取对应所述远端音频信号的近端音频信号;Acquiring a near-end audio signal corresponding to the far-end audio signal through a microphone;
根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号;Performing echo estimation according to the echo path delay of the electronic device and the far-end audio signal to obtain a first echo signal;
从所述近端音频信号中减去所述第一回声信号,得到第一残余音频信号;Subtracting the first echo signal from the near-end audio signal to obtain a first residual audio signal;
其中,所述回声路径时延根据预设扫频信号、所述麦克风采集到的对应所述预设扫频信号的延时扫频信号,进行延时估计得到。Wherein, the delay of the echo path is estimated according to a preset frequency sweep signal and a delayed frequency sweep signal collected by the microphone corresponding to the preset frequency sweep signal.
第二方面,本申请实施例提供一种延时估计方法,应用于电子设备,包括:In a second aspect, an embodiment of the present application provides a delay estimation method, which is applied to an electronic device and includes:
向扬声器提供预设扫频信号,以通过所述扬声器播放声音;Providing a preset frequency sweep signal to the speaker to play sound through the speaker;
通过麦克风进行声音采集,得到对应所述预设扫频信号的延时扫频信号;Collecting sound through a microphone to obtain a delayed frequency sweep signal corresponding to the preset frequency sweep signal;
估计所述预设扫频信号和所述延时扫频信号的重叠部分,并对所述预设扫频信号和所述延时扫频信号的重叠部分做乘法运算,得到运算结果;Estimating the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, and multiplying the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal to obtain an operation result;
将所述运算结果从时域变换到频域,确定所述运算结果的最大幅值处的频率;Transforming the operation result from the time domain to the frequency domain, and determining the frequency at the maximum amplitude of the operation result;
根据所述频率以及所述预设扫频信号的时长、终止频率、起始频率,估计所述电子设备的回声路径时延。The echo path delay of the electronic device is estimated according to the frequency and the duration, end frequency, and start frequency of the preset frequency sweep signal.
第三方面,本申请实施例提供一种回声消除装置,应用于电子设备,包括:In a third aspect, an embodiment of the present application provides an echo cancellation device, which is applied to an electronic device and includes:
第一获取模块,用于从远端设备处获取远端音频信号;The first obtaining module is used to obtain remote audio signals from the remote device;
第二获取模块,用于通过麦克风获取对应所述远端音频信号的近端音频信号;A second obtaining module, configured to obtain a near-end audio signal corresponding to the far-end audio signal through a microphone;
回声估计模块,用于根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号;An echo estimation module, configured to perform echo estimation based on the echo path delay of the electronic device and the far-end audio signal to obtain a first echo signal;
回声消除模块,用于从所述近端音频信号中减去所述第一回声信号,得到第一残余音频信号;An echo cancellation module, configured to subtract the first echo signal from the near-end audio signal to obtain a first residual audio signal;
其中,所述回声路径时延根据预设扫频信号、所述麦克风采集到的对应所述预设扫频信号的延时扫频信号,进行延时估计得到。Wherein, the delay of the echo path is estimated according to a preset frequency sweep signal and a delayed frequency sweep signal collected by the microphone corresponding to the preset frequency sweep signal.
第四方面,本申请实施例提供一种延时估计装置,应用于电子设备,包括:According to a fourth aspect, an embodiment of the present application provides a delay estimation device, which is applied to an electronic device and includes:
信号播放模块,用于向扬声器提供预设扫频信号,以通过所述扬声器播放声音;The signal playing module is used to provide a preset frequency sweep signal to the speaker to play sound through the speaker;
信号采集模块,用于通过麦克风进行声音采集,得到对应所述预设扫频信号的延时扫频信号;A signal collection module for collecting sound through a microphone to obtain a delayed frequency sweep signal corresponding to the preset frequency sweep signal;
乘法运算模块,用于估计所述预设扫频信号和所述延时扫频信号的重叠部分,并对所述预设扫频信号和所述延时扫频信号的重叠部分做乘法运算,得到运算结果;A multiplication module, used to estimate the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, and multiply the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, Get the operation result;
频率确定模块,用于将所述运算结果从时域变换到频域,确定所述运算结果的最大幅值处的频率;A frequency determination module, configured to transform the operation result from the time domain to the frequency domain, and determine the frequency at the maximum amplitude of the operation result;
延时估计模块,用于根据所述频率以及所述预设扫频信号的时长、终止频率、起始频率,估计所述电子设备的回声路径时延。The delay estimation module is used to estimate the echo path delay of the electronic device according to the frequency and the duration, end frequency, and start frequency of the preset frequency sweep signal.
第五方面,本申请实施例提供一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上执行时,使得所述计算机执行本实施例第一方面提供的回声消除方法,或者使得所述计算机执行本实施例第二方面提供的延时估计方法。According to a fifth aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, wherein, when the computer program is executed on a computer, the computer is caused to execute the echo cancellation method provided in the first aspect of the embodiment , Or cause the computer to execute the delay estimation method provided in the second aspect of this embodiment.
第六方面,本申请实施例提供一种电子设备,包括存储器,处理器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行本:According to a sixth aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, and the processor is used to execute a computer program by calling a computer program stored in the memory:
从远端设备处获取远端音频信号;Obtain the far-end audio signal from the remote device;
通过麦克风获取对应所述远端音频信号的近端音频信号;Acquiring a near-end audio signal corresponding to the far-end audio signal through a microphone;
根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号;Performing echo estimation according to the echo path delay of the electronic device and the far-end audio signal to obtain a first echo signal;
从所述近端音频信号中减去所述第一回声信号,得到第一残余音频信号;Subtracting the first echo signal from the near-end audio signal to obtain a first residual audio signal;
其中,所述回声路径时延根据预设扫频信号、所述麦克风采集到的对应所述预设扫频信号的延时扫频信号,进行延时估计得到。Wherein, the delay of the echo path is estimated according to a preset frequency sweep signal and a delayed frequency sweep signal collected by the microphone corresponding to the preset frequency sweep signal.
第七方面,本申请实施例提供一种电子设备,包括存储器,处理器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行:According to a seventh aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where the processor invokes a computer program stored in the memory to execute:
向扬声器提供预设扫频信号,以通过所述扬声器播放声音;Providing a preset frequency sweep signal to the speaker to play sound through the speaker;
通过麦克风进行声音采集,得到对应所述预设扫频信号的延时扫频信号;Collecting sound through a microphone to obtain a delayed frequency sweep signal corresponding to the preset frequency sweep signal;
估计所述预设扫频信号和所述延时扫频信号的重叠部分,并对所述预设扫频信号和所述延时扫频信号的重叠部分做乘法运算,得到运算结果;Estimating the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, and multiplying the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal to obtain an operation result;
将所述运算结果从时域变换到频域,确定所述运算结果的最大幅值处的频率;Transforming the operation result from the time domain to the frequency domain, and determining the frequency at the maximum amplitude of the operation result;
根据所述频率以及所述预设扫频信号的时长、终止频率、起始频率,估计所述电子设备的回声路径时延。The echo path delay of the electronic device is estimated according to the frequency and the duration, end frequency, and start frequency of the preset frequency sweep signal.
通过采用本实施例提供的延时估计方法来估计电子设备的回声路径时延,在通话过程中即可采用本实施例提供的回声消除方法利用该回声路径时延进行回声估计,从而消除回声,达到提升通话质量的目的。By using the delay estimation method provided by this embodiment to estimate the echo path delay of the electronic device, the echo cancellation method provided by this embodiment can be used to estimate the echo during the call, thereby eliminating the echo, To achieve the purpose of improving call quality.
附图说明BRIEF DESCRIPTION
下面结合附图,通过对本发明的具体实施方式详细描述,将使本发明的技术方案及其有益效果显而易见。The technical solution of the present invention and its beneficial effects will be apparent through the detailed description of the specific embodiments of the present invention with reference to the accompanying drawings.
图1是本申请实施例提供的回声消除方法的一流程示意图。FIG. 1 is a schematic flowchart of an echo cancellation method provided by an embodiment of the present application.
图2是本申请实施例中作为近端设备的电子设备与作为远端设备的其它电子设备建立通信连接的示意图。2 is a schematic diagram of establishing a communication connection between an electronic device serving as a near-end device and other electronic devices serving as a remote device in an embodiment of the present application.
图3是本申请实施例中通过麦克风采集近端音频信号的示意图。FIG. 3 is a schematic diagram of collecting near-end audio signals through a microphone in an embodiment of the present application.
图4是本申请实施例提供的回声消除方法的另一流程示意图。4 is another schematic flowchart of an echo cancellation method provided by an embodiment of the present application.
图5是本申请实施例中提供的回声消除模式配置界面的示意图。FIG. 5 is a schematic diagram of an echo cancellation mode configuration interface provided in an embodiment of the present application.
图6是本申请实施例提供的延时估计方法的一流程示意图。FIG. 6 is a schematic flowchart of a delay estimation method provided by an embodiment of the present application.
图7是本申请实施例提供的回声消除装置的一结构示意图。7 is a schematic structural diagram of an echo cancellation device provided by an embodiment of the present application.
图8是本申请实施例提供的延时估计装置的一结构示意图。FIG. 8 is a schematic structural diagram of a delay estimation device provided by an embodiment of the present application.
图9是本申请实施例提供的电子设备的一结构示意图。9 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图10是本申请实施例提供的电子设备的另一结构示意图。10 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
请参照图示,其中相同的组件符号代表相同的组件,本发明的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本发明具体实施例,其不应被视为限制本发明未在此详述的其它具体实施例。Please refer to the drawings, where the same component symbols represent the same components. The principle of the present invention is illustrated by implementation in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present invention, which should not be construed as limiting other specific embodiments of the present invention that are not detailed herein.
请参照图1,图1是本申请实施例提供的回声消除方法的一流程示意图。该回声消除方法可以应用于电子设备。该回声消除方法的流程可以包括:Please refer to FIG. 1, which is a schematic flowchart of an echo cancellation method provided by an embodiment of the present application. The echo cancellation method can be applied to electronic equipment. The process of the echo cancellation method may include:
在101中,从远端设备处获取远端音频信号。In 101, a far-end audio signal is obtained from a far-end device.
请参照图2,电子设备与其它电子设备基于网络建立有通信连接,基于该通信连接,以及各自的麦克风和扬声器,电子设备和其它电子设备可以进行音频信号的交互,比如,可以进行语音通话。Referring to FIG. 2, the electronic device and other electronic devices establish a communication connection based on the network, and based on the communication connection, and the respective microphones and speakers, the electronic device and other electronic devices can interact with audio signals, for example, can make voice calls.
应当说明的是,麦克风和扬声器可以是外接至电子设备的独立设备,也可以是配置于电子设备之内的两个器件,比如智能手机、平板电脑等电子设备内置的麦克风和扬声器。It should be noted that the microphone and the speaker may be independent devices externally connected to the electronic device, or may be two devices disposed within the electronic device, such as a microphone and a speaker built in the electronic device such as a smartphone and a tablet computer.
本实施例中,将电子设备记为近端设备,将其它电子设备记为远端设备。首先,电子设备可以从远端设备处获取远端音频信号。比如,远端设备通过麦克风采集远端用户的说话音,得到远端用户说话音的音频信号,并将该远端用户说话音的音频信号传输至电子设备,电子设备将接收到的、远端用户说话音的音频信号记为远端音频信号。In this embodiment, the electronic device is recorded as a near-end device, and other electronic devices are recorded as a far-end device. First, the electronic device can obtain the remote audio signal from the remote device. For example, the remote device collects the speech sound of the remote user through the microphone to obtain the audio signal of the speech sound of the remote user, and transmits the audio signal of the speech sound of the remote user to the electronic device, and the electronic device The audio signal of the user's voice is recorded as the far-end audio signal.
此外,电子设备还将获取到的远端音频信号提供给扬声器,通过扬声器播放远端音频信号的声音,使得近端用户能够听到远端用户的说话音。In addition, the electronic device also provides the acquired far-end audio signal to the speaker, and plays the sound of the far-end audio signal through the speaker, so that the near-end user can hear the far-end user's voice.
在102中,通过麦克风获取对应远端音频信号的近端音频信号。In 102, a near-end audio signal corresponding to a far-end audio signal is obtained through a microphone.
比如,请参照图3,电子设备通过麦克风进行声音采集,除了采集到近端用户的说话音之外,还会采集到扬声器播放远端音频信号的声音(即预案的用户的说话音),将采集到的这个既包括近端用户说话音、又包括扬声器播放远端音频信号的声音的音频信号记为近端音频信号。For example, referring to FIG. 3, the electronic device collects sound through a microphone. In addition to collecting the speech sound of the near-end user, the sound of the far-end audio signal played by the speaker (that is, the user's speech sound of the plan) The collected audio signal including both the near-end user's voice and the sound of the speaker playing the far-end audio signal is recorded as the near-end audio signal.
容易理解的是,由于近端音频信号包括了扬声器播放远端音频信号的声音,若直接将近端音频信号 传输至远端设备,将使得远端用户听到自己的“回声”。为此,本实施例为避免将“回声”传递给远端用户,需要对回声进行消除,转入103。It is easy to understand that since the near-end audio signal includes the sound of the speaker playing the far-end audio signal, if the near-end audio signal is directly transmitted to the far-end device, the far-end user will hear his own “echo”. For this reason, in this embodiment, in order to avoid passing the "echo" to the far-end user, the echo needs to be canceled and transferred to 103.
在103中,根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号。In 103, the echo estimation is performed according to the echo path delay of the electronic device and the far-end audio signal to obtain the first echo signal.
应当说明的是,本实施例中,将回声从扬声器到麦克风的传输时长记为回声路径时延。该回声路径时延在101之前根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,采用本申请实施例提供的延时估计方法进行延时估计得到。It should be noted that in this embodiment, the transmission duration of the echo from the speaker to the microphone is recorded as the echo path delay. The echo path delay is obtained before 101 according to the preset frequency sweep signal and the delay frequency sweep signal collected by the microphone corresponding to the preset frequency sweep signal, and the delay estimation method provided in the embodiment of the present application is used to estimate the delay.
本实施例中,电子设备在通过麦克风获取到对应远端音频信号的近端音频信号之后,进一步根据预先得到的回声路径时延以及远端音频信号进行回声估计,将此时估计得到的回声信号记为第一回声信号。In this embodiment, after acquiring the near-end audio signal corresponding to the far-end audio signal through the microphone, the electronic device further performs echo estimation according to the pre-obtained echo path delay and the far-end audio signal, and then estimates the estimated echo signal at this time Recorded as the first echo signal.
在104中,从近端音频信号中减去第一回声信号,得到第一残余音频信号。In 104, the first echo signal is subtracted from the near-end audio signal to obtain a first residual audio signal.
本实施例中,电子设备在估计得到第一回声信号之后,即可从近端音频信号减去该第一回声信号,以消除近端音频信号中的回声,并将此时近端音频信号减去第一回声信号所得到的残余音频信号记为第一残余音频信号。In this embodiment, after estimating the first echo signal, the electronic device can subtract the first echo signal from the near-end audio signal to eliminate the echo in the near-end audio signal and reduce the near-end audio signal at this time The residual audio signal obtained by removing the first echo signal is recorded as the first residual audio signal.
由上可知,本实施例中,电子设备作为近端设备,可以从远端设备处获取远端音频信号,并通过麦克风获取对应远端音频信号的近端音频信号;然后,根据回声路径时延以及远端音频信号进行回声估计,得到第一回声信号,再从近端音频信号中减去所述第一回声信号,消除近端音频信号中的回声,得到第一残余音频信号。其中,回声路径时延根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,预先进行延时估计得到,由此,当采用本方案时,只要得到回声路径时延,在通话过程中即可采用该回声路径时延进行回声估计,从而消除回声,达到提升通话质量的目的。As can be seen from the above, in this embodiment, the electronic device as the near-end device can obtain the far-end audio signal from the far-end device, and obtain the near-end audio signal corresponding to the far-end audio signal through the microphone; then, according to the echo path delay And the far-end audio signal performs echo estimation to obtain a first echo signal, and then subtracts the first echo signal from the near-end audio signal to eliminate the echo in the near-end audio signal to obtain a first residual audio signal. Wherein, the echo path delay is obtained in advance by delay estimation according to the preset frequency sweep signal and the delay sweep signal collected by the microphone corresponding to the preset frequency sweep signal. Therefore, when this solution is adopted, as long as the echo path is obtained Delay, the echo path delay can be used to estimate the echo during the call, so as to eliminate the echo and achieve the purpose of improving the quality of the call.
请参照图4,图4为本申请实施例提供的回声消除方法的另一种流程示意图。该回声消除方法可以应用于电子设备。该回声消除方法的流程可以包括:Please refer to FIG. 4, which is another schematic flowchart of an echo cancellation method according to an embodiment of the present application. The echo cancellation method can be applied to electronic equipment. The process of the echo cancellation method may include:
在201中、电子设备从远端设备处获取远端音频信号。In 201, the electronic device obtains a remote audio signal from the remote device.
请参照图2,电子设备与其它电子设备基于网络建立有通信连接,基于该通信连接,以及各自的麦克风和扬声器,电子设备和其它电子设备可以进行音频信号的交互,比如,可以进行语音通话。Referring to FIG. 2, the electronic device and other electronic devices establish a communication connection based on the network, and based on the communication connection, and the respective microphones and speakers, the electronic device and other electronic devices can interact with audio signals, for example, can make voice calls.
应当说明的是,麦克风和扬声器可以是外接至电子设备的独立设备,也可以是配置于电子设备之内的两个器件,比如智能手机、平板电脑等电子设备内置的麦克风和扬声器。It should be noted that the microphone and the speaker may be independent devices externally connected to the electronic device, or may be two devices disposed within the electronic device, such as a microphone and a speaker built in the electronic device such as a smartphone and a tablet computer.
本实施例中,将电子设备记为近端设备,将其它电子设备记为远端设备。首先,电子设备可以从远端设备处获取远端音频信号。比如,远端设备通过麦克风采集远端用户的说话音,得到远端用户说话音的音频信号,并将该远端用户说话音的音频信号传输至电子设备,电子设备将接收到的、远端用户说话音的音频信号记为远端音频信号。In this embodiment, the electronic device is recorded as a near-end device, and other electronic devices are recorded as a far-end device. First, the electronic device can obtain the remote audio signal from the remote device. For example, the remote device collects the speech sound of the remote user through the microphone to obtain the audio signal of the speech sound of the remote user, and transmits the audio signal of the speech sound of the remote user to the electronic device, and the electronic device The audio signal of the user's voice is recorded as the far-end audio signal.
此外,电子设备还将获取到的远端音频信号提供给扬声器,通过扬声器播放远端音频信号的声音,使得近端用户能够听到远端用户的说话音。In addition, the electronic device also provides the acquired far-end audio signal to the speaker, and plays the sound of the far-end audio signal through the speaker, so that the near-end user can hear the far-end user's voice.
在202中、电子设备通过麦克风获取对应远端音频信号的近端音频信号。In 202, the electronic device obtains the near-end audio signal corresponding to the far-end audio signal through the microphone.
比如,请参照图3,电子设备通过麦克风进行声音采集,除了采集到近端用户的说话音之外,还会 采集到扬声器播放远端音频信号的声音(即远端用户的说话音),将采集到的这个既包括近端用户说话音、又包括扬声器播放远端音频信号的声音的音频信号记为近端音频信号。For example, referring to FIG. 3, the electronic device collects sound through the microphone. In addition to collecting the speech sound of the near-end user, the sound of the speaker playing the far-end audio signal (that is, the speech sound of the far-end user) is also collected. The collected audio signal including both the near-end user's voice and the sound of the speaker playing the far-end audio signal is recorded as the near-end audio signal.
容易理解的是,由于近端音频信号包括了扬声器播放远端音频信号的声音,若直接将近端音频信号传输至远端设备,将使得远端用户听到自己的“回声”。为此,本实施例为避免将“回声”传递给远端用户,需要对回声进行消除,转入203。It is easy to understand that since the near-end audio signal includes the sound of the speaker playing the far-end audio signal, if the near-end audio signal is directly transmitted to the far-end device, the far-end user will hear his own “echo”. For this reason, in this embodiment, in order to avoid passing the "echo" to the far-end user, the echo needs to be canceled and transferred to 203.
在203中、电子设备确定当前的回声消除模式,其中,回声消除模式包括第一回声消除模式或第二回声消除模式,若当前的回声消除模式为第一回声消除模式,则转入204,若当前的回声消除模式为第二回声消除模式,则转入206。In 203, the electronic device determines the current echo cancellation mode, where the echo cancellation mode includes the first echo cancellation mode or the second echo cancellation mode, if the current echo cancellation mode is the first echo cancellation mode, then go to 204, if If the current echo cancellation mode is the second echo cancellation mode, go to 206.
应当说明的是,本实施例中提供了两种回声消除模式,分别记为第一回声消除模式和第二回声消除模式。其中,第一回声消除模式的处理速度快于第二回声消除模式的处理速度。电子设备当前采用的回声消除模式可由用户(即近端用户)指定,也可由电子设备缺省设定(如缺省采用第二回声消除模式)。It should be noted that two echo cancellation modes are provided in this embodiment, which are respectively denoted as a first echo cancellation mode and a second echo cancellation mode. The processing speed of the first echo cancellation mode is faster than the processing speed of the second echo cancellation mode. The current echo cancellation mode used by the electronic device can be specified by the user (ie, the near-end user), and can also be set by the electronic device by default (for example, the second echo cancellation mode is used by default).
比如,请参照图5,电子设备提供有回声消除模式配置界面,该回声消除模式配置界面包括提示信息“请拨动滑块选择采用的回声消除模式”以及提示信息“滑块置中将不进行回声消除”,此外,该回声消除模式配置界面还包括可操作控件,该可操作控件包括供用户选择回声消除模式的圆形滑块,其中,该圆形滑块包括三个状态,分别为指示不进行回声消除的置中状态、指示采用第一回声消除模式的置左状态以及指示采用第二回声消除模式的置右状态。For example, referring to FIG. 5, the electronic device provides an echo cancellation mode configuration interface. The echo cancellation mode configuration interface includes a prompt message “please move the slider to select the echo cancellation mode to be adopted” and a prompt message “the slider will not be centered. "Echo cancellation", in addition, the echo cancellation mode configuration interface also includes an operable control, the operable control includes a circular slider for the user to select the echo cancellation mode, wherein the circular slider includes three states, which are instructions The centered state where echo cancellation is not performed, the left state indicating the adoption of the first echo cancellation mode, and the right state indicating the adoption of the second echo cancellation mode.
在204中、电子设备根据其回声路径时延以及远端音频信号进行回声估计,得到第一回声信号。In 204, the electronic device performs echo estimation according to its echo path delay and the far-end audio signal to obtain a first echo signal.
应当说明的是,本实施例中,将回声从扬声器到麦克风的传输时长记为回声路径时延。该回声路径时延在201之前根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,采用本申请实施例提供的延时估计方法进行延时估计得到。It should be noted that in this embodiment, the transmission duration of the echo from the speaker to the microphone is recorded as the echo path delay. The echo path delay is obtained before 201 according to the preset frequency sweep signal and the delayed frequency sweep signal collected by the microphone corresponding to the preset frequency sweep signal, and the delay estimation method provided by the embodiment of the present application is used to estimate the delay.
其中,当确定采用第一回声消除模式进行回声消除时,电子设备将首先根据其回声路径时延以及远端音频信号进行回声估计,将此时估计得到的回声信号记为第一回声信号。When it is determined that the first echo cancellation mode is used for echo cancellation, the electronic device will first perform echo estimation based on the echo path delay and the far-end audio signal, and record the estimated echo signal at this time as the first echo signal.
可选的,在一实施方式中,电子设备在根据其回声路径时延以及远端音频信号进行回声估计,得到第一回声信号时,可以执行:Optionally, in an embodiment, when the electronic device performs echo estimation based on the echo path delay and the far-end audio signal to obtain the first echo signal, it may perform:
电子设备按照其回声路径时延延迟远端音频信号,将延迟后的远端音频信号作为第一回声信号。The electronic device delays the far-end audio signal according to the delay of its echo path, and uses the delayed far-end audio signal as the first echo signal.
比如,假设回声路径时延为50毫秒,则在时域将远端音频信号延迟50毫秒,将延迟50毫秒后的远端音频信号作为第一回声信号。For example, if the delay of the echo path is 50 milliseconds, the far-end audio signal is delayed by 50 milliseconds in the time domain, and the far-end audio signal delayed by 50 milliseconds is used as the first echo signal.
可选的,在一实施方式中,在将延迟后的远端音频信号作为第一回声信号之前,电子设备可以执行:Optionally, in an embodiment, before using the delayed far-end audio signal as the first echo signal, the electronic device may perform:
电子设备按照预设增益系数对延迟后的远端音频信号进行增益控制。The electronic device performs gain control on the delayed far-end audio signal according to the preset gain coefficient.
其中,该预设增益系数可以取经验值,用于对延迟后的远端音频信号进行增益控制,从而降低远端音频信号的幅值,使得估计得到第一回声信号能够更逼近真实的回声。Wherein, the preset gain coefficient may be an empirical value, which is used to perform gain control on the delayed far-end audio signal, thereby reducing the amplitude of the far-end audio signal, so that the estimated first echo signal can more closely approximate the real echo.
在205中、电子设备从近端音频信号中减去第一回声信号,得到第一残余音频信号。In 205, the electronic device subtracts the first echo signal from the near-end audio signal to obtain a first residual audio signal.
本实施例中,电子设备在估计得到第一回声信号之后,即可从近端音频信号减去该第一回声信号,以消除第一音频信号中的回声,并将此时近端音频信号减去第一回声信号所得到的残余音频信号记为第 一残余音频信号。In this embodiment, after estimating the first echo signal, the electronic device may subtract the first echo signal from the near-end audio signal to eliminate the echo in the first audio signal, and reduce the near-end audio signal at this time The residual audio signal obtained by removing the first echo signal is recorded as the first residual audio signal.
在206中、电子设备根据其回声路径时延更新自适应滤波器。In 206, the electronic device updates the adaptive filter according to its echo path delay.
在207中、电子设备根据更新后的自适应滤波器以及远端音频信号进行回声估计,得到第二回声信号;In 207, the electronic device performs echo estimation according to the updated adaptive filter and the far-end audio signal to obtain a second echo signal;
在208中、电子设备从近端音频信号中减去第二回声信号,得到第二残余音频信号。In 208, the electronic device subtracts the second echo signal from the near-end audio signal to obtain a second residual audio signal.
本实施例中,可以采用自适应滤波器技术来模拟回声路径,从而基于远端音频信号估计出回声信号。其中,回声路径也即是回声从扬声器到麦克风的传播路径。In this embodiment, an adaptive filter technique may be used to simulate the echo path, so that the echo signal is estimated based on the far-end audio signal. Among them, the echo path is also the propagation path of the echo from the speaker to the microphone.
其中,当确定采用第二回声消除模式进行回声消除时,电子设备将首先根据其回声路径时延更新自适应滤波器,也即是更新自适应滤波器的滤波器系数。When it is determined to use the second echo cancellation mode for echo cancellation, the electronic device will first update the adaptive filter according to its echo path delay, that is, update the filter coefficient of the adaptive filter.
可选的,在一实施方式中,电子设备在根据其回声路径时延更新自适应滤波器时,可以执行:Optionally, in an embodiment, when the electronic device updates the adaptive filter according to its echo path delay, it may perform:
电子设备按照其回声路径时延延迟远端音频信号,根据近端音频信号以及延迟后的远端音频信号更新自适应滤波器。The electronic device delays the far-end audio signal according to the delay of its echo path, and updates the adaptive filter according to the near-end audio signal and the delayed far-end audio signal.
以上对自适应滤波器的更新操作可以表示为:The above update operation of the adaptive filter can be expressed as:
h(n)=h(n-1)+alpha*e(n-1)*x(n)/(x(n)
2+beta);
h (n) = h (n-1) + alpha * e (n-1) * x (n) / (x (n) 2 + beta);
e(n-1)=y(n)-x(n)*h(n-1);e (n-1) = y (n) -x (n) * h (n-1);
其中,h(n)表示更新后的滤波器系数,h(n-1)表示更新前的滤波器系数,alpha表示更新步长(取经验值),x(n)表示延迟后的远端音频信号,beta表示规整因子(取经验值),e(n-1)表示更新前的更新前的滤波器系数进行回声消除所得到残余音频信号,y(n)表示近端音频信号。Among them, h (n) represents the updated filter coefficient, h (n-1) represents the filter coefficient before updating, alpha represents the update step size (takes the empirical value), and x (n) represents the delayed far-end audio Signal, beta represents the regularization factor (takes empirical value), e (n-1) represents the residual audio signal obtained by performing echo cancellation before the update of the filter coefficients, and y (n) represents the near-end audio signal.
电子设备在完成对自适应滤波器的更新之后,根据更新后的自适应滤波器以及远端音频信号进行回声估计,并将此时估计得到的回声信号记为第二回声信号。After completing the update of the adaptive filter, the electronic device performs echo estimation according to the updated adaptive filter and the far-end audio signal, and records the estimated echo signal at this time as the second echo signal.
以上根据更新后的自适应滤波器以及远端音频信号进行回声估计可以表示为:The above echo estimation based on the updated adaptive filter and the far-end audio signal can be expressed as:
z(n)=x(n)*h(n);z (n) = x (n) * h (n);
其中,z(n)表示估计得到的第二回声信号。Where z (n) represents the estimated second echo signal.
电子设备在根据更新后的自适应滤波器以及远端音频信号进行回声估计,得到第二回声信号之后,即可从近端音频信号中减去该第二回声信号,以消除近端音频信号中的回声,并将此时近端音频信号减去第二回声信号所得到的残余音频信号记为第二残余音频信号。After the electronic device performs echo estimation according to the updated adaptive filter and the far-end audio signal, and obtains the second echo signal, the second echo signal can be subtracted from the near-end audio signal to eliminate the near-end audio signal Echo, and the residual audio signal obtained by subtracting the second echo signal from the near-end audio signal at this time is recorded as the second residual audio signal.
以上从近端音频信号中减去该第二回声信号可以表示为:The above subtracting the second echo signal from the near-end audio signal can be expressed as:
e(n)=y(n)-z(n);e (n) = y (n) -z (n);
其中,e(n)表示第二残余音频信号。Where e (n) represents the second residual audio signal.
可选的,在一实施方式中,电子设备在确定当前的回声消除模式之前,还可以执行:Optionally, in an embodiment, before determining the current echo cancellation mode, the electronic device may also execute:
电子设备识别远端音频信号是否为语音信号;The electronic device recognizes whether the far-end audio signal is a voice signal;
若是,则电子设备确定当前的回声消除模式。If yes, the electronic device determines the current echo cancellation mode.
本实施例中,首先识别远端音频信号是否为语音信号,若识别到远端音频信号为语音信号,则电子设备进一步确定当前的回声消除模式,从而根据当前的回声消除模式对近端音频信号进行回声消除,具 体请参照以上实施例中的相关描述,此处不再赘述;若识别到远端音频信号不为语音信号,则电子设备确定无需对近端音频信号进行回声消除,直接将近端音频信号传输至远端设备。In this embodiment, first recognize whether the far-end audio signal is a voice signal, and if the far-end audio signal is recognized as a voice signal, the electronic device further determines the current echo cancellation mode, so as to determine the near-end audio signal according to the current echo cancellation mode For echo cancellation, please refer to the relevant description in the above embodiment for details, and will not repeat them here; if it is recognized that the far-end audio signal is not a voice signal, the electronic device determines that there is no need to perform echo cancellation on the near-end audio signal, and directly The audio signal at the end is transmitted to the remote device.
作为一种可选的实施方式,在识别远端音频信号是否为语音信号时,电子设备可以执行:As an optional implementation, when identifying whether the far-end audio signal is a voice signal, the electronic device may perform:
电子设备获取远端音频信号的能量值;The electronic device obtains the energy value of the remote audio signal;
电子设备判断远端音频信号的能量值是否达到预设能量值,是则确定远端音频信号为语音信号,否则不为语音信号。The electronic device determines whether the energy value of the far-end audio signal reaches the preset energy value, and then determines that the far-end audio signal is a voice signal, otherwise it is not a voice signal.
其中,预设能量值可由本领域普通技术人员根据实际需要取经验值。Wherein, the preset energy value can be obtained by a person of ordinary skill in the art according to actual needs.
作为另一种可选的实施方式,在识别远端音频信号是否为语音信号时,电子设备可以执行:As another optional implementation manner, when identifying whether the far-end audio signal is a voice signal, the electronic device may perform:
电子设备获取远端音频信号的自相关值;The electronic device obtains the autocorrelation value of the far-end audio signal;
电子设备判断远端音频信号的自相关值是否达到预设阈值,是则确定远端音频信号为语音信号,否则不为语音信号。The electronic device determines whether the auto-correlation value of the far-end audio signal reaches a preset threshold, and then determines that the far-end audio signal is a voice signal, otherwise it is not a voice signal.
其中,预设阈值可由本领域普通技术人员根据实际需要取经验值。Wherein, the preset threshold can be obtained by a person of ordinary skill in the art according to actual needs.
作为又一种可选的实施方式,在识别远端音频信号是否为语音信号时,电子设备可以执行:As yet another optional implementation manner, when identifying whether the far-end audio signal is a voice signal, the electronic device may perform:
电子设备获取远端音频信号的能量值;The electronic device obtains the energy value of the remote audio signal;
电子设备判断远端音频信号的能量值是否达到预设能量值;The electronic device determines whether the energy value of the remote audio signal reaches the preset energy value;
若是,则电子设备获取远端音频信号的自相关值;If yes, the electronic device obtains the autocorrelation value of the remote audio signal;
电子设备判断远端音频信号的自相关值是否达到预设阈值,是则确定远端音频信号为语音信号,否则不为语音信号。The electronic device determines whether the auto-correlation value of the far-end audio signal reaches a preset threshold, and then determines that the far-end audio signal is a voice signal, otherwise it is not a voice signal.
可选的,在一实施方式中,在从近端音频信号中减去第一回声信号,得到第一残余音频信号之后,电子设备还可以执行:Optionally, in an embodiment, after subtracting the first echo signal from the near-end audio signal to obtain the first residual audio signal, the electronic device may further execute:
电子设备将第一残余音频信号传输至远端设备。The electronic device transmits the first residual audio signal to the remote device.
其中,第一残余信号即按照第一回声消除模式消除回声后的近端音频信号,远端设备在通过自己的扬声器播放该第一残余信号时,远端用户将听到近端用户的说话音,并不会听到自己的回声。The first residual signal is the near-end audio signal after echo cancellation according to the first echo cancellation mode. When the far-end device plays the first residual signal through its own speaker, the far-end user will hear the near-end user's speech And will not hear your own echo.
可选的,在实施方式中,在从近端音频信号中减去第二回声信号,得到第二残余音频信号之后,电子设备还可以执行:Optionally, in an embodiment, after subtracting the second echo signal from the near-end audio signal to obtain the second residual audio signal, the electronic device may further execute:
电子设备将第二残余音频信号传输至远端设备。The electronic device transmits the second residual audio signal to the remote device.
其中,第二残余信号即按照第二回声消除模式消除回声后的近端音频信号,远端设备在通过自己的扬声器播放该第二残余信号时,远端用户将听到近端用户的说话音,并不会听到自己的回声。The second residual signal is the near-end audio signal after echo cancellation according to the second echo cancellation mode. When the far-end device plays the second residual signal through its own speaker, the far-end user will hear the near-end user's speech And will not hear your own echo.
请参照图6,图6为本申请实施例提供的延时估计方法的一流程示意图。该延时估计方法可以应用于电子设备。该延时估计方法的流程可以包括:Please refer to FIG. 6, which is a schematic flowchart of a delay estimation method according to an embodiment of the present application. The delay estimation method can be applied to electronic devices. The flow of the delay estimation method may include:
在301中,电子设备向扬声器提供预设扫频信号,以通过扬声器播放声音。In 301, an electronic device provides a preset frequency sweep signal to a speaker to play sound through the speaker.
应当说明的是,扬声器可以是外接至电子设备的独立扬声器,可以是电子设备的内置扬声器。It should be noted that the speaker may be an independent speaker externally connected to the electronic device, or may be a built-in speaker of the electronic device.
其中,预设扫频信号可以实时生成,也可以预先存储在电子设备本地。Among them, the preset frequency sweep signal may be generated in real time, or may be stored locally in the electronic device in advance.
若使用s(t)表示预设扫频信号,则该预设扫频信号可以表示为:If s (t) is used to represent the preset frequency sweep signal, the preset frequency sweep signal can be expressed as:
其中,A
1表示预设扫频信号的幅值,T表示预设扫频信号的时长,f
2表示预设扫频信号的终止频率,f
1表示预设扫频信号的起始频率,t表示变量“时间”。
Where A 1 represents the amplitude of the preset frequency sweep signal, T represents the duration of the preset frequency sweep signal, f 2 represents the end frequency of the preset frequency sweep signal, f 1 represents the start frequency of the preset frequency sweep signal, t Represents the variable "time".
应当说明的是,对于预设扫频信号的具体参数配置,可由本领域普通技术人员根据经验进行配置。It should be noted that the specific parameter configuration of the preset frequency sweep signal can be configured by a person of ordinary skill in the art according to experience.
本实施例中,电子设备首先向扬声器提供预设扫频信号,通过扬声器播放预设扫频信号的声音。In this embodiment, the electronic device first provides a preset frequency sweep signal to the speaker, and plays the sound of the preset frequency sweep signal through the speaker.
在302中,电子设备通过麦克风进行声音采集,得到对应预设扫频信号的延时扫频信号。In 302, the electronic device collects sound through a microphone to obtain a delayed frequency sweep signal corresponding to the preset frequency sweep signal.
本实施例中,在向扬声器提供预设扫频信号的过程中,电子设备通过麦克风进行声音采集,得到对应预设扫频信号的延时扫频信号。其中,延时扫频信号也即是延迟回声路径时延后的预设扫频信号。In this embodiment, during the process of providing the preset frequency sweep signal to the speaker, the electronic device collects sound through the microphone to obtain a delayed frequency sweep signal corresponding to the preset frequency sweep signal. Wherein, the delayed frequency sweep signal is also the preset frequency sweep signal after the delay of the delayed echo path.
若使用r(t)表示延时扫频信号,使用Δt表示回声路径时延,则延时扫频信号可以表示为:If r (t) is used to represent the delayed sweep signal and Δt is used to represent the echo path delay, then the delayed sweep signal can be expressed as:
其中,A
2表示延时扫频信号的幅值。
Among them, A 2 represents the amplitude of the delayed sweep signal.
在303中,电子设备估计预设扫频信号和延时扫频信号的重叠部分,并对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果。In 303, the electronic device estimates the overlapping portion of the preset frequency sweep signal and the delayed frequency sweep signal, and multiplies the overlapping portion of the preset frequency sweep signal and the delayed frequency sweep signal to obtain an operation result.
本实施例中,在采集得到预设扫频信号对应的延时扫频信号之后,电子设备进一步估计预设扫频信号和延时扫频信号的重叠部分,其中,可以根据经验进行估计,也可以计算预设扫频信号和延时扫频信号的相关性,从而根据的计算的相关性来估计预设扫频信号和延时扫频信号的重叠部分。In this embodiment, after acquiring the delayed sweep signal corresponding to the preset sweep signal, the electronic device further estimates the overlapping portion of the preset sweep signal and the delayed sweep signal, which can be estimated based on experience, and The correlation between the preset frequency sweep signal and the delayed frequency sweep signal can be calculated, so that the overlapping portion of the preset frequency sweep signal and the delayed frequency sweep signal can be estimated according to the calculated correlation.
在估计出预设扫频信号和延时扫频信号的重叠部分之后,电子设备对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果,可以表示为:After estimating the overlapping part of the preset frequency sweep signal and the delayed sweep frequency signal, the electronic device multiplies the overlapping part of the preset frequency sweep signal and the delayed sweep frequency signal to obtain the operation result, which can be expressed as:
从得到的运算结果可以看出,其中存在着一个以回声路径时延Δt为变量的固定频率分量。It can be seen from the calculation results obtained that there is a fixed frequency component with the echo path delay Δt as a variable.
在304中,电子设备将得到的运算结果从时域变换到频域,确定运算结果的最大幅值处的频率。In 304, the electronic device transforms the obtained operation result from the time domain to the frequency domain, and determines the frequency at the maximum amplitude of the operation result.
在305中,电子设备根据前述频率以及预设扫频信号的时长、终止频率、起始频率,估计电子设备的回声路径时延。In 305, the electronic device estimates the echo path delay of the electronic device according to the foregoing frequency and the duration, end frequency, and start frequency of the preset frequency sweep signal.
电子设备在对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果之后,进一步将得到的运算结果从时域变换到频域,确定出运算结果中的最大幅值处的频率。The electronic device multiplies the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal to obtain the operation result, and then further transforms the obtained operation result from the time domain to the frequency domain to determine the maximum amplitude in the operation result Frequency.
之后,电子设备即可按照如下公式,根据前述频率以及预设扫频信号的时长、终止频率、起始频率估计电子设备的回声路径时延:After that, the electronic device can estimate the echo path delay of the electronic device according to the foregoing frequency and the duration, end frequency, and start frequency of the preset frequency sweep signal according to the following formula:
△T=f
d*T/(f
2-f
1);
△ T = f d * T / (f 2 -f 1 );
其中,f
d表示运算结果中的最大幅值处的频率。
Where f d represents the frequency at the maximum amplitude in the calculation result.
在一实施方式中,将得到的运算结果从时域变换到频域,电子设备可以执行:In an embodiment, the obtained operation result is transformed from the time domain to the frequency domain, and the electronic device may perform:
电子设备采用快速傅里叶变换将得到的运算结果从时域变换到频域。Electronic equipment uses fast Fourier transform to transform the obtained operation results from time domain to frequency domain.
在一实施方式中,在向扬声器提供预设扫频信号,以通过扬声器播放声音之前,电子设备还可以执行:In an embodiment, before providing a preset frequency sweep signal to the speaker to play a sound through the speaker, the electronic device may also perform:
电子设备通过麦克风进行声音采集,得到环境音频信号;The electronic device collects sound through the microphone to obtain the environmental audio signal;
电子设备根据环境音频信号判断其当前所处的环境是否处于安静状态;The electronic device determines whether the current environment is in a quiet state according to the environmental audio signal;
若是,则向扬声器提供预设扫频信号,以通过扬声器播放声音。If yes, the preset frequency sweep signal is provided to the speaker to play sound through the speaker.
其中,对于电子设备采集环境音频信号的时长,本实施例中不做具体限制,可由本领域普通技术人员根据实际需要进行设置,比如,可以设置电子设备采集时长为5秒的环境音频信号。There is no specific limitation on the duration of the environmental audio signal collected by the electronic device, which can be set by a person of ordinary skill in the art according to actual needs. For example, the electronic device can be set to collect the environmental audio signal for 5 seconds.
在采集得到环境音频信号之后,电子设备基于环境音频信号判断其当前所处的环境是否处于安静状态,其中,电子设备可以判断环境音频信号的能量值是否持续预设时长小于预设能量值(可以配置为以上实施例中用于判断远端音频信号是否为语音信号的相同预设能量值),若是,则确定其当前所处的环境处于安静状态,否则不处于安静在通过。应当说明的是,对于预设时长的取值,可由本领域普通技术人员取经验值,比如,可以配置为5秒。After collecting the environmental audio signal, the electronic device determines whether the current environment is in a quiet state based on the environmental audio signal, wherein the electronic device can determine whether the energy value of the environmental audio signal continues for a preset duration less than the preset energy value (can It is configured as the same preset energy value used to determine whether the far-end audio signal is a voice signal in the above embodiment), if it is, it is determined that the environment it is currently in is in a quiet state, otherwise it is not in a quiet pass. It should be noted that, for the value of the preset duration, a person of ordinary skill in the art can take an experience value, for example, it can be configured to 5 seconds.
当判定当前所处的环境处于安静状态时,电子设备即可向扬声器提供预设扫频信号,以通过扬声器播放声音。When it is determined that the current environment is in a quiet state, the electronic device can provide a preset frequency sweep signal to the speaker to play sound through the speaker.
可选的,在一实施方式中,在根据环境音频信号判断其当前所处的环境是否处于安静状态之后,电子设备还可以执行:Optionally, in an embodiment, after determining whether the environment in which it is currently located is in a quiet state according to the ambient audio signal, the electronic device may also execute:
若否,则继续判断其当前所处的环境是否处于安静状态,直至其当前所处的环境处于安静状态时,转入执行“向扬声器提供预设扫频信号,以通过扬声器播放声音”。If not, continue to judge whether the current environment is in a quiet state, until the current environment is in a quiet state, go to execute "provide a preset sweep signal to the speaker to play sound through the speaker".
在一实施方式中,在对预设扫频信号和延时扫频信号的重叠部分做乘法运算时,电子设备可以执行:In an embodiment, when multiplying the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, the electronic device may perform:
电子设备从预设扫频信号和延时扫频信号的重叠部分中选取预设长度的部分做乘法运算。The electronic device selects a part of a preset length from the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal for multiplication.
其中,为降低进行乘法运算所需的时长,可以从预设扫频信号和延时扫频信号的重叠部分中选取预设长度的部分做乘法运算,其中,对于该预设长度的取值,可由本领域普通技术人员取经验值,比如,可以取一个音频帧或多个音频帧。Among them, in order to reduce the time required for the multiplication operation, a part of a preset length can be selected from the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal for multiplication operation, wherein, for the value of the preset length, An empirical value can be taken by a person of ordinary skill in the art, for example, one audio frame or multiple audio frames can be taken.
此时,电子设备对预设扫频信号和延时扫频信号的重叠部分中选取预设长度的部分做乘法运算,可以表示为:At this time, the electronic device multiplies a part of the predetermined length from the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, which can be expressed as:
其中,n=[1,N],N表示预设长度。Among them, n = [1, N], N represents the preset length.
请参照图7,图7为本申请实施例提供的回声消除装置的结构示意图。该回声消除装置可以应用于电子设备。回声消除装置可以包括:第一获取模块401,第二获取模块402,回声估计模块403,回声消除模块404。Please refer to FIG. 7, which is a schematic structural diagram of an echo cancellation device according to an embodiment of the present application. The echo cancellation device can be applied to electronic equipment. The echo cancellation apparatus may include: a first acquisition module 401, a second acquisition module 402, an echo estimation module 403, and an echo cancellation module 404.
第一获取模块401,用于从远端设备处获取远端音频信号;The first obtaining module 401 is used to obtain remote audio signals from the remote device;
第二获取模块402,用于通过麦克风获取对应远端音频信号的近端音频信号;The second obtaining module 402 is configured to obtain a near-end audio signal corresponding to the far-end audio signal through a microphone;
回声估计模块403,用于根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号;The echo estimation module 403 is configured to perform echo estimation according to the echo path delay of the electronic device and the far-end audio signal to obtain the first echo signal;
回声消除模块404,用于从近端音频信号中减去第一回声信号,得到第一残余音频信号;The echo cancellation module 404 is used to subtract the first echo signal from the near-end audio signal to obtain a first residual audio signal;
其中,回声路径时延根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,进行延时估计得到。The delay of the echo path is estimated according to the preset frequency sweep signal and the delayed frequency sweep signal collected by the microphone corresponding to the preset frequency sweep signal.
在一种实施方式中,在根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号之前,回声估计模块403可以用于:In an embodiment, before performing echo estimation based on the echo path delay of the electronic device and the far-end audio signal, the echo estimation module 403 may be used to:
确定当前的回声消除模式,其中,回声消除模式包括第一回声消除模式或第二回声消除模式;Determine the current echo cancellation mode, where the echo cancellation mode includes the first echo cancellation mode or the second echo cancellation mode;
若当前的回声消除模式为第一回声消除模式,则根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号。If the current echo cancellation mode is the first echo cancellation mode, the echo estimation is performed according to the echo path delay of the electronic device and the far-end audio signal to obtain the first echo signal.
在一实施方式中,在确定当前的回声消除模式之前,回声估计模块403还可以用于:In one embodiment, before determining the current echo cancellation mode, the echo estimation module 403 may also be used to:
识别远端音频信号是否为语音信号;Identify whether the far-end audio signal is a voice signal;
若是,则确定当前的回声消除模式。If so, determine the current echo cancellation mode.
在一实施方式中,在识别远端音频信号是否为语音信号时,回声估计模块403可以用于:In an embodiment, when identifying whether the far-end audio signal is a voice signal, the echo estimation module 403 may be used to:
获取远端音频信号的自相关值;Obtain the autocorrelation value of the far-end audio signal;
判断远端音频信号的自相关值是否达到预设阈值,是则确定远端音频信号为语音信号,否则不为语音信号。It is determined whether the auto-correlation value of the far-end audio signal reaches a preset threshold, and it is determined that the far-end audio signal is a voice signal, otherwise it is not a voice signal.
在一实施方式中,在识别远端音频信号是否为语音信号时,回声估计模块403可以用于:In an embodiment, when identifying whether the far-end audio signal is a voice signal, the echo estimation module 403 may be used to:
获取远端音频信号的能量值;Obtain the energy value of the far-end audio signal;
判断远端音频信号的能量值是否达到预设能量值,是则确定远端音频信号为语音信号,否则不为语音信号。To determine whether the energy value of the far-end audio signal reaches the preset energy value, it is determined that the far-end audio signal is a voice signal, otherwise it is not a voice signal.
在一实施方式中,在根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号时,回声估计模块403可以用于:In an embodiment, when performing echo estimation based on the echo path delay of the electronic device and the far-end audio signal to obtain the first echo signal, the echo estimation module 403 may be used to:
按照电子设备的回声路径时延延迟远端音频信号,将延迟后的远端音频信号作为第一回声信号。Delay the far-end audio signal according to the delay of the echo path of the electronic device, and use the delayed far-end audio signal as the first echo signal.
在一实施方式中,回声消除装置还包括传输模块,用于在回声消除模块404从近端音频信号中减去第一回声信号,得到第一残余音频信号之后,将第一残余音频信号传输至远端设备。In an embodiment, the echo cancellation device further includes a transmission module for transmitting the first residual audio signal to the first residual audio signal after the echo cancellation module 404 subtracts the first echo signal from the near-end audio signal to Remote device.
在一实施方式中,在确定当前的回声消除模式之后,回声估计模块403还可以用于:In one embodiment, after determining the current echo cancellation mode, the echo estimation module 403 may also be used to:
若当前的回声消除模式为第二回声消除模式,则根据电子设备的回声路径时延更新自适应滤波器;If the current echo cancellation mode is the second echo cancellation mode, the adaptive filter is updated according to the echo path delay of the electronic device;
根据更新后的自适应滤波器以及远端音频信号进行回声估计,得到第二回声信号;Echo estimation based on the updated adaptive filter and the far-end audio signal to obtain a second echo signal;
回声消除模块404还可以用于从近端音频信号中减去第二回声信号,得到第二残余音频信号。The echo cancellation module 404 can also be used to subtract the second echo signal from the near-end audio signal to obtain a second residual audio signal.
在一实施方式中,在回声消除模块404从近端音频信号中减去第二回声信号,得到第二残余音频信号之后,传输模块还可以用于:In an embodiment, after the echo cancellation module 404 subtracts the second echo signal from the near-end audio signal to obtain the second residual audio signal, the transmission module may also be used to:
将第二残余音频信号传输至远端设备。Transmit the second residual audio signal to the remote device.
请参照图8,图8为本申请实施例提供的延时估计装置的结构示意图。该延时估计装置可以应用于电子设备延时估计装置500可以包括:信号播放模块501、信号采集模块502、乘法运算模块503、频率确定模块504以及延时估计模块505。Please refer to FIG. 8, which is a schematic structural diagram of a delay estimation apparatus according to an embodiment of the present application. The delay estimation device can be applied to an electronic device delay estimation device 500 and can include a signal playback module 501, a signal acquisition module 502, a multiplication module 503, a frequency determination module 504, and a delay estimation module 505.
信号播放模块501,用于向扬声器提供预设扫频信号,以通过扬声器播放声音;The signal playing module 501 is used to provide a preset frequency sweep signal to the speaker to play sound through the speaker;
信号采集模块502,用于通过麦克风进行声音采集,得到对应预设扫频信号的延时扫频信号;The signal collection module 502 is used to collect sound through a microphone to obtain a delayed sweep signal corresponding to a preset sweep signal;
乘法运算模块503,用于估计预设扫频信号和延时扫频信号的重叠部分,并对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果;The multiplication operation module 503 is used to estimate the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, and multiply the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal to obtain an operation result;
频率确定模块504,用于将得到的运算结果从时域变换到频域,确定运算结果的最大幅值处的频率;The frequency determination module 504 is used to transform the obtained operation result from the time domain to the frequency domain, and determine the frequency at the maximum amplitude of the operation result;
延时估计模块505,用于根据前述频率以及预设扫频信号的时长、终止频率、起始频率,估计电子设备的回声路径时延。The delay estimation module 505 is used to estimate the echo path delay of the electronic device according to the aforementioned frequency and the duration, end frequency, and start frequency of the preset frequency sweep signal.
在一实施方式中,在将得到的运算结果从时域变换到频域时,频率确定模块504可以用于:In an embodiment, when transforming the obtained operation result from the time domain to the frequency domain, the frequency determination module 504 may be used to:
采用快速傅里叶变换将得到的运算结果从时域变换到频域。The fast Fourier transform is used to transform the obtained operation result from time domain to frequency domain.
在一实施方式中,在向扬声器提供预设扫频信号,以通过扬声器播放声音之前,信号采集模块502还用于通过麦克风进行声音采集,得到环境音频信号;In an embodiment, before providing a preset frequency sweep signal to the speaker to play a sound through the speaker, the signal collection module 502 is further used to collect sound through a microphone to obtain an ambient audio signal;
根据得到的环境音频信号判断电子设备当前所处的环境是否处于安静状态;Determine whether the current environment of the electronic device is in a quiet state according to the obtained environmental audio signal;
若是,则信号播放模块501向扬声器提供预设扫频信号,以通过扬声器播放声音。If yes, the signal playback module 501 provides a preset frequency sweep signal to the speaker to play sound through the speaker.
在一实施方式中,在对预设扫频信号和延时扫频信号的重叠部分做乘法运算时,乘法运算模块503可以用于:In an embodiment, when multiplying the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, the multiplication operation module 503 may be used to:
从预设扫频信号和延时扫频信号的重叠部分中选取预设长度的部分做乘法运算。Select the part of the preset length from the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal for multiplication.
本申请实施例提供一种计算机可读的存储介质,其上存储有计算机程序,当其存储的计算机程序在计算机上执行时,使得计算机执行如本实施例提供的回声消除方法中的步骤,或者使得所述计算机执行如本实施例提供的延时估计方法中的步骤。An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the stored computer program is executed on a computer, causes the computer to perform the steps in the echo cancellation method provided in this embodiment, or The computer is caused to perform the steps in the delay estimation method as provided in this embodiment.
本申请实施例还提供一种电子设备,包括存储器,处理器,处理器通过调用存储器中存储的计算机程序,执行本实施例提供的回声消除方法中的步骤,或者执行如本实施例提供的延时估计方法中的步骤。An embodiment of the present application also provides an electronic device, including a memory, a processor, and the processor executes the steps in the echo cancellation method provided in this embodiment by calling a computer program stored in the memory, or executes the extension as provided in this embodiment Steps in the estimation method.
请参照图9,图9为本申请实施例提供的电子设备的结构示意图。该电子设备可以包括扬声器601、存储器602、处理器603以及麦克风604等部件。本领域普通技术人员可以理解,图9中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Please refer to FIG. 9, which is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device may include a speaker 601, a memory 602, a processor 603, a microphone 604, and other components. A person of ordinary skill in the art may understand that the structure of the electronic device shown in FIG. 9 does not constitute a limitation on the electronic device, and may include more or fewer components than those illustrated, or combine certain components, or arrange different components .
扬声器601可以输出音频信号,以播放声音。The speaker 601 may output an audio signal to play sound.
存储器602可用于存储应用程序和数据。存储器602存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器603通过运行存储在存储器602的应用程序,从而执行各种功能应用以及数据处理。The memory 602 may be used to store application programs and data. The application program stored in the memory 602 contains executable code. The application program can form various functional modules. The processor 603 executes application programs stored in the memory 602 to execute various functional applications and data processing.
处理器603是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器602内的应用程序,以及调用存储在存储器602内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The processor 603 is the control center of the electronic device, and uses various interfaces and lines to connect the various parts of the entire electronic device. Various functions and processing data, so as to carry out overall monitoring of electronic equipment.
麦克风604可以采集声音,生成音频信号。The microphone 604 can collect sounds and generate audio signals.
在一实施例中,电子设备中的处理器603会按照如下的指令,将一个或一个以上的回声消除程序的进程对应的可执行代码加载到存储器602中,并由处理器603来运行存储在存储器602中的应用程序,从而执行:In an embodiment, the processor 603 in the electronic device loads the executable code corresponding to the process of one or more echo cancellation programs into the memory 602 according to the following instructions, and the processor 603 executes and stores the The application program in the memory 602, thereby executing:
从远端设备处获取远端音频信号;Obtain the far-end audio signal from the remote device;
通过麦克风获取对应远端音频信号的近端音频信号;Obtain the near-end audio signal corresponding to the far-end audio signal through the microphone;
根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号;Echo estimation based on the echo path delay of the electronic device and the far-end audio signal to obtain the first echo signal;
从近端音频信号中减去第一回声信号,得到第一残余音频信号;Subtracting the first echo signal from the near-end audio signal to obtain a first residual audio signal;
其中,回声路径时延根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,进行延时估计得到。The delay of the echo path is estimated according to the preset frequency sweep signal and the delayed frequency sweep signal collected by the microphone corresponding to the preset frequency sweep signal.
或者,电子设备中的处理器603会按照如下的指令,将一个或一个以上的延时估计程序的进程对应的可执行代码加载到存储器602中,并由处理器603来运行存储在存储器602中的应用程序,从而执行:Alternatively, the processor 603 in the electronic device will load the executable code corresponding to the process of one or more delay estimation programs into the memory 602 according to the following instructions, and the processor 603 runs and stores the memory in the memory 602 Application to execute:
向扬声器提供预设扫频信号,以通过扬声器播放声音;Provide a preset frequency sweep signal to the speaker to play sound through the speaker;
通过麦克风进行声音采集,得到对应预设扫频信号的延时扫频信号;Collect sound through the microphone to obtain the delayed sweep signal corresponding to the preset sweep signal;
估计预设扫频信号和延时扫频信号的重叠部分,并对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果;Estimate the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, and multiply the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal to obtain the operation result;
将得到的运算结果从时域变换到频域,确定运算结果的最大幅值处的频率;Transform the obtained operation result from the time domain to the frequency domain to determine the frequency at the maximum amplitude of the operation result;
根据前述频率以及预设扫频信号的时长、终止频率、起始频率,估计电子设备的回声路径时延。The echo path delay of the electronic device is estimated according to the aforementioned frequency and the duration, end frequency, and start frequency of the preset frequency sweep signal.
请参照图10,图10为本申请实施例提供的电子设备的另一结构示意图,与图6所示电子设备的区别在于,电子设备还包括输入单元605和输出单元606等组件。Please refer to FIG. 10, which is another schematic structural diagram of an electronic device provided by an embodiment of the present application. The difference from the electronic device shown in FIG. 6 is that the electronic device further includes components such as an input unit 605 and an output unit 606.
其中,输入单元605可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入等。The input unit 605 can be used to receive input numbers, character information, or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
输出单元606可用于显示由用户输入的信息或提供给用户的信息,如屏幕。The output unit 606 may be used to display information input by the user or information provided to the user, such as a screen.
在本申请实施例中,电子设备中的处理器603会按照如下的指令,将一个或一个以上的回声消除程序的进程对应的可执行代码加载到存储器602中,并由处理器603来运行存储在存储器602中的应用程序,从而执行:In the embodiment of the present application, the processor 603 in the electronic device loads the executable code corresponding to the process of one or more echo cancellation programs into the memory 602 according to the following instructions, and the processor 603 executes and stores The application program in the memory 602, thereby executing:
从远端设备处获取远端音频信号;Obtain the far-end audio signal from the remote device;
通过麦克风获取对应远端音频信号的近端音频信号;Obtain the near-end audio signal corresponding to the far-end audio signal through the microphone;
根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号;Echo estimation based on the echo path delay of the electronic device and the far-end audio signal to obtain the first echo signal;
从近端音频信号中减去第一回声信号,得到第一残余音频信号;Subtracting the first echo signal from the near-end audio signal to obtain a first residual audio signal;
其中,回声路径时延根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,进行延时估计得到。The delay of the echo path is estimated according to the preset frequency sweep signal and the delayed frequency sweep signal collected by the microphone corresponding to the preset frequency sweep signal.
在一实施方式中,在根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号之前,处理器603可以执行:In an embodiment, before performing the echo estimation based on the echo path delay of the electronic device and the far-end audio signal, the processor 603 may execute:
确定当前的回声消除模式,其中,回声消除模式包括第一回声消除模式或第二回声消除模式;Determine the current echo cancellation mode, where the echo cancellation mode includes the first echo cancellation mode or the second echo cancellation mode;
若当前的回声消除模式为第一回声消除模式,则根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号。If the current echo cancellation mode is the first echo cancellation mode, the echo estimation is performed according to the echo path delay of the electronic device and the far-end audio signal to obtain the first echo signal.
在一实施方式中,在确定当前的回声消除模式之前,处理器603可以执行:In one embodiment, before determining the current echo cancellation mode, the processor 603 may execute:
识别远端音频信号是否为语音信号;Identify whether the far-end audio signal is a voice signal;
若是,则确定当前的回声消除模式。If so, determine the current echo cancellation mode.
在一实施方式中,在识别远端音频信号是否为语音信号时,处理器603可以执行:In an embodiment, when identifying whether the far-end audio signal is a voice signal, the processor 603 may execute:
获取远端音频信号的自相关值;Obtain the autocorrelation value of the far-end audio signal;
判断远端音频信号的自相关值是否达到预设阈值,是则确定远端音频信号为语音信号,否则不为语音信号。It is determined whether the auto-correlation value of the far-end audio signal reaches a preset threshold, and it is determined that the far-end audio signal is a voice signal, otherwise it is not a voice signal.
在一实施方式中,在识别远端音频信号是否为语音信号时,处理器603可以执行:In an embodiment, when identifying whether the far-end audio signal is a voice signal, the processor 603 may execute:
获取远端音频信号的能量值;Obtain the energy value of the far-end audio signal;
判断远端音频信号的能量值是否达到预设能量值,是则确定远端音频信号为语音信号,否则不为语音信号。To determine whether the energy value of the far-end audio signal reaches the preset energy value, it is determined that the far-end audio signal is a voice signal, otherwise it is not a voice signal.
在一实施方式中,在根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号时,处理器603可以执行:In an embodiment, when performing echo estimation based on the echo path delay of the electronic device and the far-end audio signal to obtain the first echo signal, the processor 603 may execute:
按照电子设备的回声路径时延延迟远端音频信号,将延迟后的远端音频信号作为第一回声信号。Delay the far-end audio signal according to the delay of the echo path of the electronic device, and use the delayed far-end audio signal as the first echo signal.
在一实施方式中,在从近端音频信号中减去第一回声信号,得到第一残余音频信号之后,处理器603可以执行:In an embodiment, after subtracting the first echo signal from the near-end audio signal to obtain the first residual audio signal, the processor 603 may execute:
将第一残余音频信号传输至远端设备。Transmit the first residual audio signal to the remote device.
在一实施方式中,在确定当前的回声消除模式之后,处理器603可以执行:In one embodiment, after determining the current echo cancellation mode, the processor 603 may execute:
若当前的回声消除模式为第二回声消除模式,则根据电子设备的回声路径时延更新自适应滤波器;If the current echo cancellation mode is the second echo cancellation mode, the adaptive filter is updated according to the echo path delay of the electronic device;
根据更新后的自适应滤波器以及远端音频信号进行回声估计,得到第二回声信号;Echo estimation based on the updated adaptive filter and the far-end audio signal to obtain a second echo signal;
从近端音频信号中减去第二回声信号,得到第二残余音频信号。The second echo signal is subtracted from the near-end audio signal to obtain a second residual audio signal.
在一实施方式中,从近端音频信号中减去第二回声信号,得到第二残余音频信号之后,处理器603可以执行:In an embodiment, after subtracting the second echo signal from the near-end audio signal to obtain the second residual audio signal, the processor 603 may execute:
将第二残余音频信号传输至远端设备。Transmit the second residual audio signal to the remote device.
或者,电子设备中的处理器603会按照如下的指令,将一个或一个以上的延时估计程序的进程对应的可执行代码加载到存储器602中,并由处理器603来运行存储在存储器602中的应用程序,从而执行:Alternatively, the processor 603 in the electronic device will load the executable code corresponding to the process of one or more delay estimation programs into the memory 602 according to the following instructions, and the processor 603 runs and stores the memory in the memory 602 Application to execute:
向扬声器提供预设扫频信号,以通过扬声器播放声音;Provide a preset frequency sweep signal to the speaker to play sound through the speaker;
通过麦克风进行声音采集,得到对应预设扫频信号的延时扫频信号;Collect sound through the microphone to obtain the delayed sweep signal corresponding to the preset sweep signal;
估计预设扫频信号和延时扫频信号的重叠部分,并对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果;Estimate the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, and multiply the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal to obtain the operation result;
将得到的运算结果从时域变换到频域,确定运算结果的最大幅值处的频率;Transform the obtained operation result from the time domain to the frequency domain to determine the frequency at the maximum amplitude of the operation result;
根据前述频率以及预设扫频信号的时长、终止频率、起始频率,估计电子设备的回声路径时延。The echo path delay of the electronic device is estimated according to the aforementioned frequency and the duration, end frequency, and start frequency of the preset frequency sweep signal.
在一实施方式中,在将得到的运算结果从时域变换到频域时,处理器603可以执行:In an embodiment, when transforming the obtained operation result from the time domain to the frequency domain, the processor 603 may execute:
采用快速傅里叶变换将得到的运算结果从时域变换到频域。The fast Fourier transform is used to transform the obtained operation result from time domain to frequency domain.
在一实施方式中,在向扬声器提供预设扫频信号,以通过扬声器播放声音之前,处理器603可以执行:In one embodiment, before providing a preset frequency sweep signal to the speaker to play sound through the speaker, the processor 603 may execute:
通过麦克风进行声音采集,得到环境音频信号;Collect sound through microphone to get environmental audio signal;
根据得到的环境音频信号判断电子设备当前所处的环境是否处于安静状态;Determine whether the current environment of the electronic device is in a quiet state according to the obtained environmental audio signal;
若是,则向扬声器提供预设扫频信号,以通过扬声器播放声音。If yes, the preset frequency sweep signal is provided to the speaker to play sound through the speaker.
在一实施方式中,在对预设扫频信号和延时扫频信号的重叠部分做乘法运算时,处理器603可以执行:In an embodiment, when multiplying the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, the processor 603 may execute:
从预设扫频信号和延时扫频信号的重叠部分中选取预设长度的部分做乘法运算。Select the part of the preset length from the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal for multiplication.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对回声消除方法/延时估计方法的详细描述,此处不再赘述。In the above embodiments, the description of each embodiment has its own emphasis. For a part that is not detailed in an embodiment, you can refer to the above detailed description for the echo cancellation method / delay estimation method, which will not be repeated here. .
本申请实施例提供的回声消除装置与上文实施例中的回声消除方法属于同一构思,在回声消除装置上可以运行回声消除方法实施例中提供的任一方法,其具体实现过程详见回声消除方法实施例,此处不再赘述。The echo cancellation device provided by the embodiment of the present application and the echo cancellation method in the above embodiments belong to the same concept. Any method provided in the echo cancellation method embodiment can be run on the echo cancellation device, and the specific implementation process is described in echo cancellation The method embodiments are not repeated here.
本申请实施例提供的延时估计装置与上文实施例中的延时估计方法属于同一构思,在延时估计装置上可以运行延时估计方法实施例中提供的任一方法,其具体实现过程详见延时估计方法实施例,此处不再赘述。The delay estimation device provided by the embodiment of the present application and the delay estimation method in the above embodiment belong to the same concept. Any method provided in the delay estimation method embodiment can be run on the delay estimation device, and the specific implementation process For details, refer to the embodiment of the delay estimation method, and details are not described herein again.
需要说明的是,对本申请实施例回声消除方法/延时估计方法而言,本领域普通技术人员可以理解实现本申请实施例回声消除方法/延时估计方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,计算机程序可存储于一计算机可读取存储介质中,如存储在存储器中,并被至少一个处理器执行,在执行过程中可包括如回声消除方法/延时估计方法的实施例的流程。其中,存储介质可为磁碟、光盘、只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)等。It should be noted that, for the echo cancellation method / delay estimation method in the embodiment of the present application, a person of ordinary skill in the art can understand that all or part of the process for implementing the echo cancellation method / delay estimation method in the embodiment of the present application can be obtained through Program to control the related hardware to complete, the computer program can be stored in a computer readable storage medium, such as stored in memory, and executed by at least one processor, during the implementation process can include, for example, echo cancellation method / delay The flow of the embodiment of the estimation method. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), etc.
对本申请实施例的回声消除装置/延时估计这种而言,其各功能模块可以集成在一个处理芯片中,也 可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,存储介质譬如为只读存储器,磁盘或光盘等。For the echo cancellation device / delay estimation in the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules may be integrated into one Module. The above integrated modules may be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, magnetic disk, or optical disk.
以上对本申请实施例所提供的一种回声消除方法、延时估计方法、装置、存储介质以及电子设备进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本发明的限制。The above describes an echo cancellation method, delay estimation method, device, storage medium, and electronic equipment provided by the embodiments of the present application in detail. Specific examples are used to explain the principles and implementations of the present invention. The description of the embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. The content of this specification should not be construed as a limitation of the present invention.