WO2020097828A1 - 回声消除方法、延时估计方法、装置、存储介质及设备 - Google Patents

回声消除方法、延时估计方法、装置、存储介质及设备 Download PDF

Info

Publication number
WO2020097828A1
WO2020097828A1 PCT/CN2018/115443 CN2018115443W WO2020097828A1 WO 2020097828 A1 WO2020097828 A1 WO 2020097828A1 CN 2018115443 W CN2018115443 W CN 2018115443W WO 2020097828 A1 WO2020097828 A1 WO 2020097828A1
Authority
WO
WIPO (PCT)
Prior art keywords
echo
signal
audio signal
frequency sweep
far
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.)
Ceased
Application number
PCT/CN2018/115443
Other languages
English (en)
French (fr)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Heytap Technology Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Heytap Technology Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Heytap Technology Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201880098265.6A priority Critical patent/CN113170024B/zh
Priority to PCT/CN2018/115443 priority patent/WO2020097828A1/zh
Publication of WO2020097828A1 publication Critical patent/WO2020097828A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M9/00Arrangements for interconnection not involving centralised switching
    • H04M9/08Two-way loud-speaking telephone systems with means for conditioning the signal, e.g. for suppressing echoes for one or both directions of traffic
    • H04M9/082Two-way loud-speaking telephone systems with means for conditioning the signal, e.g. for suppressing echoes for one or both directions of traffic using echo cancellers
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M9/00Arrangements for interconnection not involving centralised switching
    • H04M9/08Two-way loud-speaking telephone systems with means for conditioning the signal, e.g. for suppressing echoes for one or both directions of traffic
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • 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.
  • the echo is due to the acoustic loop between the speaker and the microphone.
  • 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.
  • Embodiments of the present application provide an echo cancellation method, delay estimation method, device, storage medium, and equipment, which can improve call quality.
  • an embodiment of the present application provides an echo cancellation method, which is applied to an electronic device and includes:
  • 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.
  • an embodiment of the present application provides a delay estimation method, which is applied to an electronic device and includes:
  • 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.
  • 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
  • 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.
  • 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.
  • 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.
  • 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:
  • 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.
  • 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:
  • 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.
  • 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.
  • FIG. 1 is a schematic flowchart of an echo cancellation method provided by an embodiment of the present application.
  • FIG. 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.
  • FIG. 3 is a schematic diagram of collecting near-end audio signals through a microphone in an embodiment of the present application.
  • FIG 4 is another schematic flowchart of an echo cancellation method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an echo cancellation mode configuration interface provided in an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a delay estimation method provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an echo cancellation device provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a delay estimation device provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG 10 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 1 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:
  • a far-end audio signal is obtained from a far-end device.
  • 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.
  • 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.
  • the electronic device is recorded as a near-end device, and other electronic devices are recorded as a far-end device.
  • the electronic device can obtain the remote audio signal from the remote device.
  • 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.
  • 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.
  • a near-end audio signal corresponding to a far-end audio signal is obtained through a microphone.
  • the electronic device collects sound through a microphone.
  • 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.
  • the near-end audio signal includes the sound of the speaker playing the far-end audio signal
  • the far-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.
  • 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.
  • 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.
  • the electronic device 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.
  • the first echo signal is subtracted from the near-end audio signal to obtain a first residual audio 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.
  • 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.
  • 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.
  • FIG. 4 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:
  • the electronic device obtains a remote audio signal from the remote device.
  • 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.
  • 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.
  • the electronic device is recorded as a near-end device, and other electronic devices are recorded as a far-end device.
  • the electronic device can obtain the remote audio signal from the remote device.
  • 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.
  • 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.
  • the electronic device obtains the near-end audio signal corresponding to the far-end audio signal through the microphone.
  • the electronic device collects sound through the microphone.
  • 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.
  • the near-end audio signal includes the sound of the speaker playing the far-end audio signal
  • the far-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.
  • 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.
  • 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).
  • 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.
  • the electronic device performs echo estimation according to its echo path delay and the far-end audio signal to obtain a first echo signal.
  • 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.
  • the electronic device 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.
  • the electronic device when it 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.
  • 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.
  • the electronic device 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.
  • 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.
  • the electronic device subtracts the first echo signal from the near-end audio signal to obtain a first residual audio 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.
  • the electronic device updates the adaptive filter according to its echo path delay.
  • the electronic device performs echo estimation according to the updated adaptive filter and the far-end audio signal to obtain a second echo signal
  • the electronic device subtracts the second echo signal from the near-end audio signal to obtain a second residual audio signal.
  • 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.
  • the echo path is also the propagation path of the echo from the speaker to the microphone.
  • the electronic device 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.
  • the electronic device 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.
  • 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);
  • 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)
  • 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
  • y (n) represents the near-end audio signal.
  • the electronic device 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 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 electronic device may also execute:
  • the electronic device recognizes whether the far-end audio signal is a voice signal
  • the electronic device determines the current echo cancellation mode.
  • the electronic device 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
  • 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.
  • 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.
  • the preset energy value can be obtained by a person of ordinary skill in the art according to actual needs.
  • 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.
  • the preset threshold can be obtained by a person of ordinary skill in the art according to actual needs.
  • 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
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • FIG. 6 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:
  • an electronic device provides a preset frequency sweep signal to a speaker to play sound through the speaker.
  • the speaker may be an independent speaker externally connected to the electronic device, or may be a built-in speaker of the electronic device.
  • the preset frequency sweep signal may be generated in real time, or may be stored locally in the electronic device in advance.
  • the preset frequency sweep signal can be expressed as:
  • 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”.
  • 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.
  • 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.
  • the electronic device collects sound through a microphone to obtain a delayed frequency sweep signal corresponding to the preset frequency sweep signal.
  • the electronic device collects sound through the microphone to obtain a delayed frequency sweep signal corresponding to the preset frequency sweep signal.
  • the delayed frequency sweep signal is also the preset frequency sweep signal after the delay of the delayed echo path.
  • the delayed sweep signal can be expressed as:
  • a 2 represents the amplitude of the delayed sweep signal.
  • 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.
  • the electronic device 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.
  • the electronic device 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:
  • 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.
  • 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.
  • 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:
  • f d represents the frequency at the maximum amplitude in the calculation result.
  • 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.
  • the electronic device 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
  • the preset frequency sweep signal is provided to the speaker to play sound through the speaker.
  • the duration of the environmental audio signal collected by the electronic device can be set by a person of ordinary skill in the art according to actual needs.
  • the electronic device can be set to collect the environmental audio signal for 5 seconds.
  • 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.
  • the electronic device can provide a preset frequency sweep signal to the speaker to play sound through the speaker.
  • the electronic device may also execute:
  • the electronic device 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.
  • 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.
  • 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 represents the preset length
  • FIG. 7 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.
  • the first obtaining module 401 is used to obtain remote audio signals from the remote device
  • the second obtaining module 402 is configured to obtain a near-end audio signal corresponding to the far-end audio signal through a microphone;
  • 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;
  • 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.
  • the echo estimation module 403 may be used to:
  • the echo cancellation mode includes the first echo cancellation mode or the second 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.
  • the echo estimation module 403 may also be used to:
  • the echo estimation module 403 may be used to:
  • the echo estimation module 403 may be used to:
  • 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.
  • the echo estimation module 403 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:
  • 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.
  • the echo estimation module 403 may also be used to:
  • 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 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.
  • the transmission module may also be used to:
  • FIG. 8 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.
  • the signal playing module 501 is used to provide a preset frequency sweep signal to the speaker to play sound through the speaker;
  • 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;
  • 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;
  • 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;
  • 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.
  • the frequency determination module 504 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.
  • the signal collection module 502 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;
  • the signal playback module 501 provides a preset frequency sweep signal to the speaker to play sound through the speaker.
  • the multiplication operation module 503 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:
  • 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.
  • FIG. 9 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 .
  • the speaker 601 may output an audio signal to play sound.
  • 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.
  • 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.
  • the microphone 604 can collect sounds and generate audio signals.
  • 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:
  • 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 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.
  • 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:
  • 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.
  • FIG. 10 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device further includes components such as an input unit 605 and an output unit 606.
  • 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.
  • user characteristic information such as fingerprints
  • the output unit 606 may be used to display information input by the user or information provided to the user, such as a screen.
  • 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:
  • 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 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.
  • the processor 603 may execute:
  • the echo cancellation mode includes the first echo cancellation mode or the second 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.
  • the processor 603 may execute:
  • the processor 603 may execute:
  • the processor 603 may execute:
  • 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.
  • the processor 603 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:
  • the processor 603 may execute:
  • the processor 603 may execute:
  • 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.
  • the processor 603 may execute:
  • 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:
  • 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.
  • the processor 603 may execute:
  • the fast Fourier transform is used to transform the obtained operation result from time domain to frequency domain.
  • the processor 603 may execute:
  • the preset frequency sweep signal is provided to the speaker to play sound through the speaker.
  • the processor 603 when multiplying the overlapping part of the preset frequency sweep signal and the delayed frequency sweep signal, the processor 603 may execute:
  • 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.
  • 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 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.
  • 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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Telephone Function (AREA)
  • Cable Transmission Systems, Equalization Of Radio And Reduction Of Echo (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

一种回声消除方法以及一种延时估计方法,通过上述延时估计方法来估计电子设备的回声路径时延,从而在通话过程中利用该回声路径时延进行回声估计,消除回声,达到提升通话质量的目的。

Description

回声消除方法、延时估计方法、装置、存储介质及设备 技术领域
本申请属于音频处理技术领域,尤其涉及一种回声消除方法、延时估计方法、装置、存储介质及设备。
背景技术
回声的产生是由于扬声器和麦克风之间存在声学回路。在通话时,远端设备的音频信号经过通信连接传输到近端设备,被近端设备的扬声器放出,经过扬声器与麦克风之间的声学回路后被麦克风采集到,再经过通信连接传回远端设备,这样,远端设备的用户便会听到自己的回声。
发明内容
本申请实施例提供一种回声消除方法、延时估计方法、装置、存储介质及设备,可以提高通话质量。
第一方面,本申请实施例提供一种回声消除方法,应用于电子设备,包括:
从远端设备处获取远端音频信号;
通过麦克风获取对应所述远端音频信号的近端音频信号;
根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号;
从所述近端音频信号中减去所述第一回声信号,得到第一残余音频信号;
其中,所述回声路径时延根据预设扫频信号、所述麦克风采集到的对应所述预设扫频信号的延时扫频信号,进行延时估计得到。
第二方面,本申请实施例提供一种延时估计方法,应用于电子设备,包括:
向扬声器提供预设扫频信号,以通过所述扬声器播放声音;
通过麦克风进行声音采集,得到对应所述预设扫频信号的延时扫频信号;
估计所述预设扫频信号和所述延时扫频信号的重叠部分,并对所述预设扫频信号和所述延时扫频信号的重叠部分做乘法运算,得到运算结果;
将所述运算结果从时域变换到频域,确定所述运算结果的最大幅值处的频率;
根据所述频率以及所述预设扫频信号的时长、终止频率、起始频率,估计所述电子设备的回声路径时延。
第三方面,本申请实施例提供一种回声消除装置,应用于电子设备,包括:
第一获取模块,用于从远端设备处获取远端音频信号;
第二获取模块,用于通过麦克风获取对应所述远端音频信号的近端音频信号;
回声估计模块,用于根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号;
回声消除模块,用于从所述近端音频信号中减去所述第一回声信号,得到第一残余音频信号;
其中,所述回声路径时延根据预设扫频信号、所述麦克风采集到的对应所述预设扫频信号的延时扫频信号,进行延时估计得到。
第四方面,本申请实施例提供一种延时估计装置,应用于电子设备,包括:
信号播放模块,用于向扬声器提供预设扫频信号,以通过所述扬声器播放声音;
信号采集模块,用于通过麦克风进行声音采集,得到对应所述预设扫频信号的延时扫频信号;
乘法运算模块,用于估计所述预设扫频信号和所述延时扫频信号的重叠部分,并对所述预设扫频信号和所述延时扫频信号的重叠部分做乘法运算,得到运算结果;
频率确定模块,用于将所述运算结果从时域变换到频域,确定所述运算结果的最大幅值处的频率;
延时估计模块,用于根据所述频率以及所述预设扫频信号的时长、终止频率、起始频率,估计所述电子设备的回声路径时延。
第五方面,本申请实施例提供一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上执行时,使得所述计算机执行本实施例第一方面提供的回声消除方法,或者使得所述计算机执行本实施例第二方面提供的延时估计方法。
第六方面,本申请实施例提供一种电子设备,包括存储器,处理器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行本:
从远端设备处获取远端音频信号;
通过麦克风获取对应所述远端音频信号的近端音频信号;
根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号;
从所述近端音频信号中减去所述第一回声信号,得到第一残余音频信号;
其中,所述回声路径时延根据预设扫频信号、所述麦克风采集到的对应所述预设扫频信号的延时扫频信号,进行延时估计得到。
第七方面,本申请实施例提供一种电子设备,包括存储器,处理器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行:
向扬声器提供预设扫频信号,以通过所述扬声器播放声音;
通过麦克风进行声音采集,得到对应所述预设扫频信号的延时扫频信号;
估计所述预设扫频信号和所述延时扫频信号的重叠部分,并对所述预设扫频信号和所述延时扫频信号的重叠部分做乘法运算,得到运算结果;
将所述运算结果从时域变换到频域,确定所述运算结果的最大幅值处的频率;
根据所述频率以及所述预设扫频信号的时长、终止频率、起始频率,估计所述电子设备的回声路径时延。
通过采用本实施例提供的延时估计方法来估计电子设备的回声路径时延,在通话过程中即可采用本实施例提供的回声消除方法利用该回声路径时延进行回声估计,从而消除回声,达到提升通话质量的目的。
附图说明
下面结合附图,通过对本发明的具体实施方式详细描述,将使本发明的技术方案及其有益效果显而易见。
图1是本申请实施例提供的回声消除方法的一流程示意图。
图2是本申请实施例中作为近端设备的电子设备与作为远端设备的其它电子设备建立通信连接的示意图。
图3是本申请实施例中通过麦克风采集近端音频信号的示意图。
图4是本申请实施例提供的回声消除方法的另一流程示意图。
图5是本申请实施例中提供的回声消除模式配置界面的示意图。
图6是本申请实施例提供的延时估计方法的一流程示意图。
图7是本申请实施例提供的回声消除装置的一结构示意图。
图8是本申请实施例提供的延时估计装置的一结构示意图。
图9是本申请实施例提供的电子设备的一结构示意图。
图10是本申请实施例提供的电子设备的另一结构示意图。
具体实施方式
请参照图示,其中相同的组件符号代表相同的组件,本发明的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本发明具体实施例,其不应被视为限制本发明未在此详述的其它具体实施例。
请参照图1,图1是本申请实施例提供的回声消除方法的一流程示意图。该回声消除方法可以应用于电子设备。该回声消除方法的流程可以包括:
在101中,从远端设备处获取远端音频信号。
请参照图2,电子设备与其它电子设备基于网络建立有通信连接,基于该通信连接,以及各自的麦克风和扬声器,电子设备和其它电子设备可以进行音频信号的交互,比如,可以进行语音通话。
应当说明的是,麦克风和扬声器可以是外接至电子设备的独立设备,也可以是配置于电子设备之内的两个器件,比如智能手机、平板电脑等电子设备内置的麦克风和扬声器。
本实施例中,将电子设备记为近端设备,将其它电子设备记为远端设备。首先,电子设备可以从远端设备处获取远端音频信号。比如,远端设备通过麦克风采集远端用户的说话音,得到远端用户说话音的音频信号,并将该远端用户说话音的音频信号传输至电子设备,电子设备将接收到的、远端用户说话音的音频信号记为远端音频信号。
此外,电子设备还将获取到的远端音频信号提供给扬声器,通过扬声器播放远端音频信号的声音,使得近端用户能够听到远端用户的说话音。
在102中,通过麦克风获取对应远端音频信号的近端音频信号。
比如,请参照图3,电子设备通过麦克风进行声音采集,除了采集到近端用户的说话音之外,还会采集到扬声器播放远端音频信号的声音(即预案的用户的说话音),将采集到的这个既包括近端用户说话音、又包括扬声器播放远端音频信号的声音的音频信号记为近端音频信号。
容易理解的是,由于近端音频信号包括了扬声器播放远端音频信号的声音,若直接将近端音频信号 传输至远端设备,将使得远端用户听到自己的“回声”。为此,本实施例为避免将“回声”传递给远端用户,需要对回声进行消除,转入103。
在103中,根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号。
应当说明的是,本实施例中,将回声从扬声器到麦克风的传输时长记为回声路径时延。该回声路径时延在101之前根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,采用本申请实施例提供的延时估计方法进行延时估计得到。
本实施例中,电子设备在通过麦克风获取到对应远端音频信号的近端音频信号之后,进一步根据预先得到的回声路径时延以及远端音频信号进行回声估计,将此时估计得到的回声信号记为第一回声信号。
在104中,从近端音频信号中减去第一回声信号,得到第一残余音频信号。
本实施例中,电子设备在估计得到第一回声信号之后,即可从近端音频信号减去该第一回声信号,以消除近端音频信号中的回声,并将此时近端音频信号减去第一回声信号所得到的残余音频信号记为第一残余音频信号。
由上可知,本实施例中,电子设备作为近端设备,可以从远端设备处获取远端音频信号,并通过麦克风获取对应远端音频信号的近端音频信号;然后,根据回声路径时延以及远端音频信号进行回声估计,得到第一回声信号,再从近端音频信号中减去所述第一回声信号,消除近端音频信号中的回声,得到第一残余音频信号。其中,回声路径时延根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,预先进行延时估计得到,由此,当采用本方案时,只要得到回声路径时延,在通话过程中即可采用该回声路径时延进行回声估计,从而消除回声,达到提升通话质量的目的。
请参照图4,图4为本申请实施例提供的回声消除方法的另一种流程示意图。该回声消除方法可以应用于电子设备。该回声消除方法的流程可以包括:
在201中、电子设备从远端设备处获取远端音频信号。
请参照图2,电子设备与其它电子设备基于网络建立有通信连接,基于该通信连接,以及各自的麦克风和扬声器,电子设备和其它电子设备可以进行音频信号的交互,比如,可以进行语音通话。
应当说明的是,麦克风和扬声器可以是外接至电子设备的独立设备,也可以是配置于电子设备之内的两个器件,比如智能手机、平板电脑等电子设备内置的麦克风和扬声器。
本实施例中,将电子设备记为近端设备,将其它电子设备记为远端设备。首先,电子设备可以从远端设备处获取远端音频信号。比如,远端设备通过麦克风采集远端用户的说话音,得到远端用户说话音的音频信号,并将该远端用户说话音的音频信号传输至电子设备,电子设备将接收到的、远端用户说话音的音频信号记为远端音频信号。
此外,电子设备还将获取到的远端音频信号提供给扬声器,通过扬声器播放远端音频信号的声音,使得近端用户能够听到远端用户的说话音。
在202中、电子设备通过麦克风获取对应远端音频信号的近端音频信号。
比如,请参照图3,电子设备通过麦克风进行声音采集,除了采集到近端用户的说话音之外,还会 采集到扬声器播放远端音频信号的声音(即远端用户的说话音),将采集到的这个既包括近端用户说话音、又包括扬声器播放远端音频信号的声音的音频信号记为近端音频信号。
容易理解的是,由于近端音频信号包括了扬声器播放远端音频信号的声音,若直接将近端音频信号传输至远端设备,将使得远端用户听到自己的“回声”。为此,本实施例为避免将“回声”传递给远端用户,需要对回声进行消除,转入203。
在203中、电子设备确定当前的回声消除模式,其中,回声消除模式包括第一回声消除模式或第二回声消除模式,若当前的回声消除模式为第一回声消除模式,则转入204,若当前的回声消除模式为第二回声消除模式,则转入206。
应当说明的是,本实施例中提供了两种回声消除模式,分别记为第一回声消除模式和第二回声消除模式。其中,第一回声消除模式的处理速度快于第二回声消除模式的处理速度。电子设备当前采用的回声消除模式可由用户(即近端用户)指定,也可由电子设备缺省设定(如缺省采用第二回声消除模式)。
比如,请参照图5,电子设备提供有回声消除模式配置界面,该回声消除模式配置界面包括提示信息“请拨动滑块选择采用的回声消除模式”以及提示信息“滑块置中将不进行回声消除”,此外,该回声消除模式配置界面还包括可操作控件,该可操作控件包括供用户选择回声消除模式的圆形滑块,其中,该圆形滑块包括三个状态,分别为指示不进行回声消除的置中状态、指示采用第一回声消除模式的置左状态以及指示采用第二回声消除模式的置右状态。
在204中、电子设备根据其回声路径时延以及远端音频信号进行回声估计,得到第一回声信号。
应当说明的是,本实施例中,将回声从扬声器到麦克风的传输时长记为回声路径时延。该回声路径时延在201之前根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,采用本申请实施例提供的延时估计方法进行延时估计得到。
其中,当确定采用第一回声消除模式进行回声消除时,电子设备将首先根据其回声路径时延以及远端音频信号进行回声估计,将此时估计得到的回声信号记为第一回声信号。
可选的,在一实施方式中,电子设备在根据其回声路径时延以及远端音频信号进行回声估计,得到第一回声信号时,可以执行:
电子设备按照其回声路径时延延迟远端音频信号,将延迟后的远端音频信号作为第一回声信号。
比如,假设回声路径时延为50毫秒,则在时域将远端音频信号延迟50毫秒,将延迟50毫秒后的远端音频信号作为第一回声信号。
可选的,在一实施方式中,在将延迟后的远端音频信号作为第一回声信号之前,电子设备可以执行:
电子设备按照预设增益系数对延迟后的远端音频信号进行增益控制。
其中,该预设增益系数可以取经验值,用于对延迟后的远端音频信号进行增益控制,从而降低远端音频信号的幅值,使得估计得到第一回声信号能够更逼近真实的回声。
在205中、电子设备从近端音频信号中减去第一回声信号,得到第一残余音频信号。
本实施例中,电子设备在估计得到第一回声信号之后,即可从近端音频信号减去该第一回声信号,以消除第一音频信号中的回声,并将此时近端音频信号减去第一回声信号所得到的残余音频信号记为第 一残余音频信号。
在206中、电子设备根据其回声路径时延更新自适应滤波器。
在207中、电子设备根据更新后的自适应滤波器以及远端音频信号进行回声估计,得到第二回声信号;
在208中、电子设备从近端音频信号中减去第二回声信号,得到第二残余音频信号。
本实施例中,可以采用自适应滤波器技术来模拟回声路径,从而基于远端音频信号估计出回声信号。其中,回声路径也即是回声从扬声器到麦克风的传播路径。
其中,当确定采用第二回声消除模式进行回声消除时,电子设备将首先根据其回声路径时延更新自适应滤波器,也即是更新自适应滤波器的滤波器系数。
可选的,在一实施方式中,电子设备在根据其回声路径时延更新自适应滤波器时,可以执行:
电子设备按照其回声路径时延延迟远端音频信号,根据近端音频信号以及延迟后的远端音频信号更新自适应滤波器。
以上对自适应滤波器的更新操作可以表示为:
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);
其中,h(n)表示更新后的滤波器系数,h(n-1)表示更新前的滤波器系数,alpha表示更新步长(取经验值),x(n)表示延迟后的远端音频信号,beta表示规整因子(取经验值),e(n-1)表示更新前的更新前的滤波器系数进行回声消除所得到残余音频信号,y(n)表示近端音频信号。
电子设备在完成对自适应滤波器的更新之后,根据更新后的自适应滤波器以及远端音频信号进行回声估计,并将此时估计得到的回声信号记为第二回声信号。
以上根据更新后的自适应滤波器以及远端音频信号进行回声估计可以表示为:
z(n)=x(n)*h(n);
其中,z(n)表示估计得到的第二回声信号。
电子设备在根据更新后的自适应滤波器以及远端音频信号进行回声估计,得到第二回声信号之后,即可从近端音频信号中减去该第二回声信号,以消除近端音频信号中的回声,并将此时近端音频信号减去第二回声信号所得到的残余音频信号记为第二残余音频信号。
以上从近端音频信号中减去该第二回声信号可以表示为:
e(n)=y(n)-z(n);
其中,e(n)表示第二残余音频信号。
可选的,在一实施方式中,电子设备在确定当前的回声消除模式之前,还可以执行:
电子设备识别远端音频信号是否为语音信号;
若是,则电子设备确定当前的回声消除模式。
本实施例中,首先识别远端音频信号是否为语音信号,若识别到远端音频信号为语音信号,则电子设备进一步确定当前的回声消除模式,从而根据当前的回声消除模式对近端音频信号进行回声消除,具 体请参照以上实施例中的相关描述,此处不再赘述;若识别到远端音频信号不为语音信号,则电子设备确定无需对近端音频信号进行回声消除,直接将近端音频信号传输至远端设备。
作为一种可选的实施方式,在识别远端音频信号是否为语音信号时,电子设备可以执行:
电子设备获取远端音频信号的能量值;
电子设备判断远端音频信号的能量值是否达到预设能量值,是则确定远端音频信号为语音信号,否则不为语音信号。
其中,预设能量值可由本领域普通技术人员根据实际需要取经验值。
作为另一种可选的实施方式,在识别远端音频信号是否为语音信号时,电子设备可以执行:
电子设备获取远端音频信号的自相关值;
电子设备判断远端音频信号的自相关值是否达到预设阈值,是则确定远端音频信号为语音信号,否则不为语音信号。
其中,预设阈值可由本领域普通技术人员根据实际需要取经验值。
作为又一种可选的实施方式,在识别远端音频信号是否为语音信号时,电子设备可以执行:
电子设备获取远端音频信号的能量值;
电子设备判断远端音频信号的能量值是否达到预设能量值;
若是,则电子设备获取远端音频信号的自相关值;
电子设备判断远端音频信号的自相关值是否达到预设阈值,是则确定远端音频信号为语音信号,否则不为语音信号。
可选的,在一实施方式中,在从近端音频信号中减去第一回声信号,得到第一残余音频信号之后,电子设备还可以执行:
电子设备将第一残余音频信号传输至远端设备。
其中,第一残余信号即按照第一回声消除模式消除回声后的近端音频信号,远端设备在通过自己的扬声器播放该第一残余信号时,远端用户将听到近端用户的说话音,并不会听到自己的回声。
可选的,在实施方式中,在从近端音频信号中减去第二回声信号,得到第二残余音频信号之后,电子设备还可以执行:
电子设备将第二残余音频信号传输至远端设备。
其中,第二残余信号即按照第二回声消除模式消除回声后的近端音频信号,远端设备在通过自己的扬声器播放该第二残余信号时,远端用户将听到近端用户的说话音,并不会听到自己的回声。
请参照图6,图6为本申请实施例提供的延时估计方法的一流程示意图。该延时估计方法可以应用于电子设备。该延时估计方法的流程可以包括:
在301中,电子设备向扬声器提供预设扫频信号,以通过扬声器播放声音。
应当说明的是,扬声器可以是外接至电子设备的独立扬声器,可以是电子设备的内置扬声器。
其中,预设扫频信号可以实时生成,也可以预先存储在电子设备本地。
若使用s(t)表示预设扫频信号,则该预设扫频信号可以表示为:
Figure PCTCN2018115443-appb-000001
其中,A 1表示预设扫频信号的幅值,T表示预设扫频信号的时长,f 2表示预设扫频信号的终止频率,f 1表示预设扫频信号的起始频率,t表示变量“时间”。
应当说明的是,对于预设扫频信号的具体参数配置,可由本领域普通技术人员根据经验进行配置。
本实施例中,电子设备首先向扬声器提供预设扫频信号,通过扬声器播放预设扫频信号的声音。
在302中,电子设备通过麦克风进行声音采集,得到对应预设扫频信号的延时扫频信号。
本实施例中,在向扬声器提供预设扫频信号的过程中,电子设备通过麦克风进行声音采集,得到对应预设扫频信号的延时扫频信号。其中,延时扫频信号也即是延迟回声路径时延后的预设扫频信号。
若使用r(t)表示延时扫频信号,使用Δt表示回声路径时延,则延时扫频信号可以表示为:
Figure PCTCN2018115443-appb-000002
其中,A 2表示延时扫频信号的幅值。
在303中,电子设备估计预设扫频信号和延时扫频信号的重叠部分,并对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果。
本实施例中,在采集得到预设扫频信号对应的延时扫频信号之后,电子设备进一步估计预设扫频信号和延时扫频信号的重叠部分,其中,可以根据经验进行估计,也可以计算预设扫频信号和延时扫频信号的相关性,从而根据的计算的相关性来估计预设扫频信号和延时扫频信号的重叠部分。
在估计出预设扫频信号和延时扫频信号的重叠部分之后,电子设备对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果,可以表示为:
Figure PCTCN2018115443-appb-000003
从得到的运算结果可以看出,其中存在着一个以回声路径时延Δt为变量的固定频率分量。
在304中,电子设备将得到的运算结果从时域变换到频域,确定运算结果的最大幅值处的频率。
在305中,电子设备根据前述频率以及预设扫频信号的时长、终止频率、起始频率,估计电子设备的回声路径时延。
电子设备在对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果之后,进一步将得到的运算结果从时域变换到频域,确定出运算结果中的最大幅值处的频率。
之后,电子设备即可按照如下公式,根据前述频率以及预设扫频信号的时长、终止频率、起始频率估计电子设备的回声路径时延:
△T=f d*T/(f 2-f 1);
其中,f d表示运算结果中的最大幅值处的频率。
在一实施方式中,将得到的运算结果从时域变换到频域,电子设备可以执行:
电子设备采用快速傅里叶变换将得到的运算结果从时域变换到频域。
在一实施方式中,在向扬声器提供预设扫频信号,以通过扬声器播放声音之前,电子设备还可以执行:
电子设备通过麦克风进行声音采集,得到环境音频信号;
电子设备根据环境音频信号判断其当前所处的环境是否处于安静状态;
若是,则向扬声器提供预设扫频信号,以通过扬声器播放声音。
其中,对于电子设备采集环境音频信号的时长,本实施例中不做具体限制,可由本领域普通技术人员根据实际需要进行设置,比如,可以设置电子设备采集时长为5秒的环境音频信号。
在采集得到环境音频信号之后,电子设备基于环境音频信号判断其当前所处的环境是否处于安静状态,其中,电子设备可以判断环境音频信号的能量值是否持续预设时长小于预设能量值(可以配置为以上实施例中用于判断远端音频信号是否为语音信号的相同预设能量值),若是,则确定其当前所处的环境处于安静状态,否则不处于安静在通过。应当说明的是,对于预设时长的取值,可由本领域普通技术人员取经验值,比如,可以配置为5秒。
当判定当前所处的环境处于安静状态时,电子设备即可向扬声器提供预设扫频信号,以通过扬声器播放声音。
可选的,在一实施方式中,在根据环境音频信号判断其当前所处的环境是否处于安静状态之后,电子设备还可以执行:
若否,则继续判断其当前所处的环境是否处于安静状态,直至其当前所处的环境处于安静状态时,转入执行“向扬声器提供预设扫频信号,以通过扬声器播放声音”。
在一实施方式中,在对预设扫频信号和延时扫频信号的重叠部分做乘法运算时,电子设备可以执行:
电子设备从预设扫频信号和延时扫频信号的重叠部分中选取预设长度的部分做乘法运算。
其中,为降低进行乘法运算所需的时长,可以从预设扫频信号和延时扫频信号的重叠部分中选取预设长度的部分做乘法运算,其中,对于该预设长度的取值,可由本领域普通技术人员取经验值,比如,可以取一个音频帧或多个音频帧。
此时,电子设备对预设扫频信号和延时扫频信号的重叠部分中选取预设长度的部分做乘法运算,可以表示为:
Figure PCTCN2018115443-appb-000004
其中,n=[1,N],N表示预设长度。
请参照图7,图7为本申请实施例提供的回声消除装置的结构示意图。该回声消除装置可以应用于电子设备。回声消除装置可以包括:第一获取模块401,第二获取模块402,回声估计模块403,回声消除模块404。
第一获取模块401,用于从远端设备处获取远端音频信号;
第二获取模块402,用于通过麦克风获取对应远端音频信号的近端音频信号;
回声估计模块403,用于根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号;
回声消除模块404,用于从近端音频信号中减去第一回声信号,得到第一残余音频信号;
其中,回声路径时延根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,进行延时估计得到。
在一种实施方式中,在根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号之前,回声估计模块403可以用于:
确定当前的回声消除模式,其中,回声消除模式包括第一回声消除模式或第二回声消除模式;
若当前的回声消除模式为第一回声消除模式,则根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号。
在一实施方式中,在确定当前的回声消除模式之前,回声估计模块403还可以用于:
识别远端音频信号是否为语音信号;
若是,则确定当前的回声消除模式。
在一实施方式中,在识别远端音频信号是否为语音信号时,回声估计模块403可以用于:
获取远端音频信号的自相关值;
判断远端音频信号的自相关值是否达到预设阈值,是则确定远端音频信号为语音信号,否则不为语音信号。
在一实施方式中,在识别远端音频信号是否为语音信号时,回声估计模块403可以用于:
获取远端音频信号的能量值;
判断远端音频信号的能量值是否达到预设能量值,是则确定远端音频信号为语音信号,否则不为语音信号。
在一实施方式中,在根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号时,回声估计模块403可以用于:
按照电子设备的回声路径时延延迟远端音频信号,将延迟后的远端音频信号作为第一回声信号。
在一实施方式中,回声消除装置还包括传输模块,用于在回声消除模块404从近端音频信号中减去第一回声信号,得到第一残余音频信号之后,将第一残余音频信号传输至远端设备。
在一实施方式中,在确定当前的回声消除模式之后,回声估计模块403还可以用于:
若当前的回声消除模式为第二回声消除模式,则根据电子设备的回声路径时延更新自适应滤波器;
根据更新后的自适应滤波器以及远端音频信号进行回声估计,得到第二回声信号;
回声消除模块404还可以用于从近端音频信号中减去第二回声信号,得到第二残余音频信号。
在一实施方式中,在回声消除模块404从近端音频信号中减去第二回声信号,得到第二残余音频信号之后,传输模块还可以用于:
将第二残余音频信号传输至远端设备。
请参照图8,图8为本申请实施例提供的延时估计装置的结构示意图。该延时估计装置可以应用于电子设备延时估计装置500可以包括:信号播放模块501、信号采集模块502、乘法运算模块503、频率确定模块504以及延时估计模块505。
信号播放模块501,用于向扬声器提供预设扫频信号,以通过扬声器播放声音;
信号采集模块502,用于通过麦克风进行声音采集,得到对应预设扫频信号的延时扫频信号;
乘法运算模块503,用于估计预设扫频信号和延时扫频信号的重叠部分,并对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果;
频率确定模块504,用于将得到的运算结果从时域变换到频域,确定运算结果的最大幅值处的频率;
延时估计模块505,用于根据前述频率以及预设扫频信号的时长、终止频率、起始频率,估计电子设备的回声路径时延。
在一实施方式中,在将得到的运算结果从时域变换到频域时,频率确定模块504可以用于:
采用快速傅里叶变换将得到的运算结果从时域变换到频域。
在一实施方式中,在向扬声器提供预设扫频信号,以通过扬声器播放声音之前,信号采集模块502还用于通过麦克风进行声音采集,得到环境音频信号;
根据得到的环境音频信号判断电子设备当前所处的环境是否处于安静状态;
若是,则信号播放模块501向扬声器提供预设扫频信号,以通过扬声器播放声音。
在一实施方式中,在对预设扫频信号和延时扫频信号的重叠部分做乘法运算时,乘法运算模块503可以用于:
从预设扫频信号和延时扫频信号的重叠部分中选取预设长度的部分做乘法运算。
本申请实施例提供一种计算机可读的存储介质,其上存储有计算机程序,当其存储的计算机程序在计算机上执行时,使得计算机执行如本实施例提供的回声消除方法中的步骤,或者使得所述计算机执行如本实施例提供的延时估计方法中的步骤。
本申请实施例还提供一种电子设备,包括存储器,处理器,处理器通过调用存储器中存储的计算机程序,执行本实施例提供的回声消除方法中的步骤,或者执行如本实施例提供的延时估计方法中的步骤。
请参照图9,图9为本申请实施例提供的电子设备的结构示意图。该电子设备可以包括扬声器601、存储器602、处理器603以及麦克风604等部件。本领域普通技术人员可以理解,图9中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
扬声器601可以输出音频信号,以播放声音。
存储器602可用于存储应用程序和数据。存储器602存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器603通过运行存储在存储器602的应用程序,从而执行各种功能应用以及数据处理。
处理器603是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器602内的应用程序,以及调用存储在存储器602内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。
麦克风604可以采集声音,生成音频信号。
在一实施例中,电子设备中的处理器603会按照如下的指令,将一个或一个以上的回声消除程序的进程对应的可执行代码加载到存储器602中,并由处理器603来运行存储在存储器602中的应用程序,从而执行:
从远端设备处获取远端音频信号;
通过麦克风获取对应远端音频信号的近端音频信号;
根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号;
从近端音频信号中减去第一回声信号,得到第一残余音频信号;
其中,回声路径时延根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,进行延时估计得到。
或者,电子设备中的处理器603会按照如下的指令,将一个或一个以上的延时估计程序的进程对应的可执行代码加载到存储器602中,并由处理器603来运行存储在存储器602中的应用程序,从而执行:
向扬声器提供预设扫频信号,以通过扬声器播放声音;
通过麦克风进行声音采集,得到对应预设扫频信号的延时扫频信号;
估计预设扫频信号和延时扫频信号的重叠部分,并对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果;
将得到的运算结果从时域变换到频域,确定运算结果的最大幅值处的频率;
根据前述频率以及预设扫频信号的时长、终止频率、起始频率,估计电子设备的回声路径时延。
请参照图10,图10为本申请实施例提供的电子设备的另一结构示意图,与图6所示电子设备的区别在于,电子设备还包括输入单元605和输出单元606等组件。
其中,输入单元605可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入等。
输出单元606可用于显示由用户输入的信息或提供给用户的信息,如屏幕。
在本申请实施例中,电子设备中的处理器603会按照如下的指令,将一个或一个以上的回声消除程序的进程对应的可执行代码加载到存储器602中,并由处理器603来运行存储在存储器602中的应用程序,从而执行:
从远端设备处获取远端音频信号;
通过麦克风获取对应远端音频信号的近端音频信号;
根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号;
从近端音频信号中减去第一回声信号,得到第一残余音频信号;
其中,回声路径时延根据预设扫频信号、麦克风采集到的对应预设扫频信号的延时扫频信号,进行延时估计得到。
在一实施方式中,在根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号之前,处理器603可以执行:
确定当前的回声消除模式,其中,回声消除模式包括第一回声消除模式或第二回声消除模式;
若当前的回声消除模式为第一回声消除模式,则根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号。
在一实施方式中,在确定当前的回声消除模式之前,处理器603可以执行:
识别远端音频信号是否为语音信号;
若是,则确定当前的回声消除模式。
在一实施方式中,在识别远端音频信号是否为语音信号时,处理器603可以执行:
获取远端音频信号的自相关值;
判断远端音频信号的自相关值是否达到预设阈值,是则确定远端音频信号为语音信号,否则不为语音信号。
在一实施方式中,在识别远端音频信号是否为语音信号时,处理器603可以执行:
获取远端音频信号的能量值;
判断远端音频信号的能量值是否达到预设能量值,是则确定远端音频信号为语音信号,否则不为语音信号。
在一实施方式中,在根据电子设备的回声路径时延以及远端音频信号进行回声估计,得到第一回声信号时,处理器603可以执行:
按照电子设备的回声路径时延延迟远端音频信号,将延迟后的远端音频信号作为第一回声信号。
在一实施方式中,在从近端音频信号中减去第一回声信号,得到第一残余音频信号之后,处理器603可以执行:
将第一残余音频信号传输至远端设备。
在一实施方式中,在确定当前的回声消除模式之后,处理器603可以执行:
若当前的回声消除模式为第二回声消除模式,则根据电子设备的回声路径时延更新自适应滤波器;
根据更新后的自适应滤波器以及远端音频信号进行回声估计,得到第二回声信号;
从近端音频信号中减去第二回声信号,得到第二残余音频信号。
在一实施方式中,从近端音频信号中减去第二回声信号,得到第二残余音频信号之后,处理器603可以执行:
将第二残余音频信号传输至远端设备。
或者,电子设备中的处理器603会按照如下的指令,将一个或一个以上的延时估计程序的进程对应的可执行代码加载到存储器602中,并由处理器603来运行存储在存储器602中的应用程序,从而执行:
向扬声器提供预设扫频信号,以通过扬声器播放声音;
通过麦克风进行声音采集,得到对应预设扫频信号的延时扫频信号;
估计预设扫频信号和延时扫频信号的重叠部分,并对预设扫频信号和延时扫频信号的重叠部分做乘法运算,得到运算结果;
将得到的运算结果从时域变换到频域,确定运算结果的最大幅值处的频率;
根据前述频率以及预设扫频信号的时长、终止频率、起始频率,估计电子设备的回声路径时延。
在一实施方式中,在将得到的运算结果从时域变换到频域时,处理器603可以执行:
采用快速傅里叶变换将得到的运算结果从时域变换到频域。
在一实施方式中,在向扬声器提供预设扫频信号,以通过扬声器播放声音之前,处理器603可以执行:
通过麦克风进行声音采集,得到环境音频信号;
根据得到的环境音频信号判断电子设备当前所处的环境是否处于安静状态;
若是,则向扬声器提供预设扫频信号,以通过扬声器播放声音。
在一实施方式中,在对预设扫频信号和延时扫频信号的重叠部分做乘法运算时,处理器603可以执行:
从预设扫频信号和延时扫频信号的重叠部分中选取预设长度的部分做乘法运算。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对回声消除方法/延时估计方法的详细描述,此处不再赘述。
本申请实施例提供的回声消除装置与上文实施例中的回声消除方法属于同一构思,在回声消除装置上可以运行回声消除方法实施例中提供的任一方法,其具体实现过程详见回声消除方法实施例,此处不再赘述。
本申请实施例提供的延时估计装置与上文实施例中的延时估计方法属于同一构思,在延时估计装置上可以运行延时估计方法实施例中提供的任一方法,其具体实现过程详见延时估计方法实施例,此处不再赘述。
需要说明的是,对本申请实施例回声消除方法/延时估计方法而言,本领域普通技术人员可以理解实现本申请实施例回声消除方法/延时估计方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,计算机程序可存储于一计算机可读取存储介质中,如存储在存储器中,并被至少一个处理器执行,在执行过程中可包括如回声消除方法/延时估计方法的实施例的流程。其中,存储介质可为磁碟、光盘、只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)等。
对本申请实施例的回声消除装置/延时估计这种而言,其各功能模块可以集成在一个处理芯片中,也 可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,存储介质譬如为只读存储器,磁盘或光盘等。
以上对本申请实施例所提供的一种回声消除方法、延时估计方法、装置、存储介质以及电子设备进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本发明的限制。

Claims (20)

  1. 一种回声消除方法,应用于电子设备,其中,包括:
    从远端设备处获取远端音频信号;
    通过麦克风获取对应所述远端音频信号的近端音频信号;
    根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号;
    从所述近端音频信号中减去所述第一回声信号,得到第一残余音频信号;
    其中,所述回声路径时延根据预设扫频信号、所述麦克风采集到的对应所述预设扫频信号的延时扫频信号,进行延时估计得到。
  2. 如权利要求1所述的回声消除方法,其中,所述根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号之前,还包括:
    确定当前的回声消除模式,其中,所述回声消除模式包括第一回声消除模式或第二回声消除模式,且所述第一回声消除模式的处理速度快于所述第二回声消除模式的处理速度;
    若当前的回声消除模式为所述第一回声消除模式,则根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号。
  3. 如权利要求2所述的回声消除方法,其中,所述确定当前的回声消除模式之前,还包括:
    识别所述远端音频信号是否为语音信号;
    若是,则确定当前的回声消除模式。
  4. 如权利要求3所述的回声消除方法,其中,所述识别所述远端音频信号是否为语音信号,包括:
    获取所述远端音频信号的自相关值;
    判断所述自相关值是否达到预设阈值,是则确定所述远端音频信号为语音信号,否则不为语音信号。
  5. 如权利要求1所述的回声消除方法,其中,所述根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号,包括:
    按照所述回声路径时延延迟所述远端音频信号,将延迟后的所述远端音频信号作为所述第一回声信号。
  6. 如权利要求1所述的回声消除方法,其中,所述从所述近端音频信号中减去所述第一回声信号,得到第一残余音频信号之后,还包括:
    将所述第一残余音频信号传输至所述远端设备。
  7. 如权利要求2所述的回声消除方法,其中,所述确定当前的回声消除模式之后,还包括:
    若当前的回声消除模式为第二回声消除模式,则根据所述回声路径时延更新自适应滤波器;
    根据更新后的所述自适应滤波器以及所述远端音频信号进行回声估计,得到第二回声信号;
    从所述近端音频信号中减去所述第二回声信号,得到第二残余音频信号。
  8. 如权利要求7所述的回声消除方法,其中,所述从所述近端音频信号中减去所述第二回声信号,得到第二残余音频信号之后,还包括:
    将所述第二残余音频信号传输至所述远端设备。
  9. 一种延时估计方法,应用于电子设备,其中,包括:
    向扬声器提供预设扫频信号,以通过所述扬声器播放声音;
    通过麦克风进行声音采集,得到对应所述预设扫频信号的延时扫频信号;
    估计所述预设扫频信号和所述延时扫频信号的重叠部分,并对所述预设扫频信号和所述延时扫频信号的重叠部分做乘法运算,得到运算结果;
    将所述运算结果从时域变换到频域,确定所述运算结果的最大幅值处的频率;
    根据所述频率以及所述预设扫频信号的时长、终止频率、起始频率,估计所述电子设备的回声路径时延。
  10. 如权利要求9所述的延时估计方法,其中,所述将所述运算结果从时域变换到频域,包括:
    采用快速傅里叶变换将所述运算结果从时域变换到频域。
  11. 如权利要求9所述的延时估计方法,其中,所述向扬声器提供预设扫频信号,以通过所述扬声器播放声音之前,还包括:
    通过麦克风进行声音采集,得到环境音频信号;
    根据所述环境音频信号判断所述电子设备当前所处的环境是否处于安静状态;
    若是,则向所述扬声器提供所述预设扫频信号,以通过所述扬声器播放声音。
  12. 如权利要求9所述的延时估计方法,其中,所述对所述预设扫频信号和所述延时扫频信号的重叠部分做乘法运算,包括:
    从所述预设扫频信号和所述延时扫频信号的重叠部分中选取预设长度的部分做乘法运算。
  13. 一种回声消除装置,应用于电子设备,其中,包括:
    第一获取模块,用于从远端设备处获取远端音频信号;
    第二获取模块,用于通过麦克风获取对应所述远端音频信号的近端音频信号;
    回声估计模块,用于根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号;
    回声消除模块,用于从所述近端音频信号中减去所述第一回声信号,得到第一残余音频信号;
    其中,所述回声路径时延根据预设扫频信号、所述麦克风采集到的对应所述预设扫频信号的延时扫频信号,进行延时估计得到。
  14. 一种延时估计装置,应用于电子设备,其中,包括:
    信号播放模块,用于向扬声器提供预设扫频信号,以通过所述扬声器播放声音;
    信号采集模块,用于通过麦克风进行声音采集,得到对应所述预设扫频信号的延时扫频信号;
    乘法运算模块,用于估计所述预设扫频信号和所述延时扫频信号的重叠部分,并对所述预设扫频信号和所述延时扫频信号的重叠部分做乘法运算,得到运算结果;
    频率确定模块,用于将所述运算结果从时域变换到频域,确定所述运算结果的最大幅值处的频率;
    延时估计模块,用于根据所述频率以及所述预设扫频信号的时长、终止频率、起始频率,估计所述电子设备的回声路径时延。
  15. 一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上执行时,使得所述计算机执行如权利要求1至8中任一项所述的方法,或者使得所述计算机执行如权利要求9至12中任一项所述的方法。
  16. 一种电子设备,包括存储器,处理器,其中,所述处理器通过调用所述存储器中存储的计算机程序,用于执行:
    从远端设备处获取远端音频信号;
    通过麦克风获取对应所述远端音频信号的近端音频信号;
    根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号;
    从所述近端音频信号中减去所述第一回声信号,得到第一残余音频信号;
    其中,所述回声路径时延根据预设扫频信号、所述麦克风采集到的对应所述预设扫频信号的延时扫频信号,进行延时估计得到。
  17. 如权利要求16所述的电子设备,其中,在根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号之前,所述处理器用于执行:
    确定当前的回声消除模式,其中,所述回声消除模式包括第一回声消除模式或第二回声消除模式,且所述第一回声消除模式的处理速度快于所述第二回声消除模式的处理速度;
    若当前的回声消除模式为所述第一回声消除模式,则根据所述电子设备的回声路径时延以及所述远端音频信号进行回声估计,得到第一回声信号。
  18. 如权利要求17所述的电子设备,其中,在确定当前的回声消除模式之后,所述处理器用于执行:
    若当前的回声消除模式为第二回声消除模式,则根据所述回声路径时延更新自适应滤波器;
    根据更新后的所述自适应滤波器以及所述远端音频信号进行回声估计,得到第二回声信号;
    从所述近端音频信号中减去所述第二回声信号,得到第二残余音频信号。
  19. 一种电子设备,包括存储器,处理器,其中,所述处理器通过调用所述存储器中存储的计算机程序,用于执行:
    向扬声器提供预设扫频信号,以通过所述扬声器播放声音;
    通过麦克风进行声音采集,得到对应所述预设扫频信号的延时扫频信号;
    估计所述预设扫频信号和所述延时扫频信号的重叠部分,并对所述预设扫频信号和所述延时扫频信号的重叠部分做乘法运算,得到运算结果;
    将所述运算结果从时域变换到频域,确定所述运算结果的最大幅值处的频率;
    根据所述频率以及所述预设扫频信号的时长、终止频率、起始频率,估计所述电子设备的回声路径时延。
  20. 如权利要求19所述的电子设备,其中,在对所述预设扫频信号和所述延时扫频信号的重叠部分做乘法运算时,所述处理器用于执行:
    从所述预设扫频信号和所述延时扫频信号的重叠部分中选取预设长度的部分做乘法运算。
PCT/CN2018/115443 2018-11-14 2018-11-14 回声消除方法、延时估计方法、装置、存储介质及设备 Ceased WO2020097828A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880098265.6A CN113170024B (zh) 2018-11-14 2018-11-14 回声消除方法、延时估计方法、装置、存储介质及设备
PCT/CN2018/115443 WO2020097828A1 (zh) 2018-11-14 2018-11-14 回声消除方法、延时估计方法、装置、存储介质及设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/115443 WO2020097828A1 (zh) 2018-11-14 2018-11-14 回声消除方法、延时估计方法、装置、存储介质及设备

Publications (1)

Publication Number Publication Date
WO2020097828A1 true WO2020097828A1 (zh) 2020-05-22

Family

ID=70730188

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/115443 Ceased WO2020097828A1 (zh) 2018-11-14 2018-11-14 回声消除方法、延时估计方法、装置、存储介质及设备

Country Status (2)

Country Link
CN (1) CN113170024B (zh)
WO (1) WO2020097828A1 (zh)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111798864A (zh) * 2020-07-02 2020-10-20 杭州海康威视数字技术股份有限公司 一种回声消除方法、装置、电子设备及存储介质
CN111863011A (zh) * 2020-07-30 2020-10-30 北京达佳互联信息技术有限公司 音频处理方法及电子设备
CN112201268A (zh) * 2020-09-09 2021-01-08 北京小米松果电子有限公司 回声消除方法、回声消除装置及存储介质
CN112562709A (zh) * 2020-11-18 2021-03-26 珠海全志科技股份有限公司 一种回声消除信号处理方法及介质
CN113470675A (zh) * 2021-06-30 2021-10-01 北京小米移动软件有限公司 音频信号处理方法及装置
CN113838473A (zh) * 2021-09-26 2021-12-24 科大讯飞股份有限公司 设备的语音处理方法、装置以及设备
CN114449116A (zh) * 2022-02-16 2022-05-06 广州方硅信息技术有限公司 回声消除的延时获取方法、装置、计算机设备及存储介质
CN114724572A (zh) * 2022-03-31 2022-07-08 杭州网易智企科技有限公司 确定回声延时的方法和装置
CN115277962A (zh) * 2022-06-20 2022-11-01 北京奕斯伟计算技术股份有限公司 回声延迟估计方法、装置、存储介质和电子设备
CN118366488A (zh) * 2024-06-14 2024-07-19 宁波菊风系统软件有限公司 一种录音系统及计算机可读存储介质
CN119626242A (zh) * 2024-12-30 2025-03-14 马栏山音视频实验室 一种回声消除方法、装置、设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114141224B (zh) 2021-11-30 2023-06-09 北京百度网讯科技有限公司 信号处理方法和装置、电子设备、计算机可读介质
CN118506796A (zh) * 2023-02-15 2024-08-16 中兴通讯股份有限公司 回声消除方法、电子设备和计算机可读介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102044253A (zh) * 2010-10-29 2011-05-04 深圳创维-Rgb电子有限公司 一种回声信号处理方法、系统及电视机
US20110150067A1 (en) * 2009-12-17 2011-06-23 Oki Electric Industry Co., Ltd. Echo canceller for eliminating echo without being affected by noise
CN103391381A (zh) * 2012-05-10 2013-11-13 中兴通讯股份有限公司 回声消除方法及装置
CN103700374A (zh) * 2013-12-25 2014-04-02 宁波菊风系统软件有限公司 确定声学回声消除中系统延时的方法及声学回声消除方法
CN105187594A (zh) * 2015-07-28 2015-12-23 小米科技有限责任公司 一种消除回声的方法和装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106231145B (zh) * 2016-08-31 2019-09-27 广州市百果园网络科技有限公司 一种回声延时处理方法及回声延时处理装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110150067A1 (en) * 2009-12-17 2011-06-23 Oki Electric Industry Co., Ltd. Echo canceller for eliminating echo without being affected by noise
CN102044253A (zh) * 2010-10-29 2011-05-04 深圳创维-Rgb电子有限公司 一种回声信号处理方法、系统及电视机
CN103391381A (zh) * 2012-05-10 2013-11-13 中兴通讯股份有限公司 回声消除方法及装置
CN103700374A (zh) * 2013-12-25 2014-04-02 宁波菊风系统软件有限公司 确定声学回声消除中系统延时的方法及声学回声消除方法
CN105187594A (zh) * 2015-07-28 2015-12-23 小米科技有限责任公司 一种消除回声的方法和装置

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111798864A (zh) * 2020-07-02 2020-10-20 杭州海康威视数字技术股份有限公司 一种回声消除方法、装置、电子设备及存储介质
CN111798864B (zh) * 2020-07-02 2024-06-04 杭州海康威视数字技术股份有限公司 一种回声消除方法、装置、电子设备及存储介质
CN111863011B (zh) * 2020-07-30 2024-03-12 北京达佳互联信息技术有限公司 音频处理方法及电子设备
CN111863011A (zh) * 2020-07-30 2020-10-30 北京达佳互联信息技术有限公司 音频处理方法及电子设备
CN112201268A (zh) * 2020-09-09 2021-01-08 北京小米松果电子有限公司 回声消除方法、回声消除装置及存储介质
CN112562709A (zh) * 2020-11-18 2021-03-26 珠海全志科技股份有限公司 一种回声消除信号处理方法及介质
CN112562709B (zh) * 2020-11-18 2024-04-19 珠海全志科技股份有限公司 一种回声消除信号处理方法及介质
CN113470675A (zh) * 2021-06-30 2021-10-01 北京小米移动软件有限公司 音频信号处理方法及装置
CN113838473A (zh) * 2021-09-26 2021-12-24 科大讯飞股份有限公司 设备的语音处理方法、装置以及设备
CN113838473B (zh) * 2021-09-26 2024-07-05 科大讯飞股份有限公司 设备的语音处理方法、装置以及设备
CN114449116A (zh) * 2022-02-16 2022-05-06 广州方硅信息技术有限公司 回声消除的延时获取方法、装置、计算机设备及存储介质
CN114724572A (zh) * 2022-03-31 2022-07-08 杭州网易智企科技有限公司 确定回声延时的方法和装置
CN115277962A (zh) * 2022-06-20 2022-11-01 北京奕斯伟计算技术股份有限公司 回声延迟估计方法、装置、存储介质和电子设备
CN118366488A (zh) * 2024-06-14 2024-07-19 宁波菊风系统软件有限公司 一种录音系统及计算机可读存储介质
CN119626242A (zh) * 2024-12-30 2025-03-14 马栏山音视频实验室 一种回声消除方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN113170024B (zh) 2023-08-29
CN113170024A (zh) 2021-07-23

Similar Documents

Publication Publication Date Title
CN113170024B (zh) 回声消除方法、延时估计方法、装置、存储介质及设备
CN113241085B (zh) 回声消除方法、装置、设备及可读存储介质
CN111524498B (zh) 滤波方法、装置及电子设备
EP2982101B1 (en) Noise reduction
CN114040285B (zh) 耳机的前馈滤波器参数生成方法、设备、耳机及存储介质
US20140355752A1 (en) Echo cancellation
CN110992923B (zh) 回声消除方法、电子设备以及存储装置
CN113763977A (zh) 消除回声信号的方法、装置、计算设备和存储介质
CN114121031A (zh) 设备语音降噪、电子设备和存储介质
JP2011511522A (ja) エコー抑制フィルタの制御情報を演算する装置および方法、並びに、ディレイ値を演算する装置および方法
US20130028432A1 (en) Reverberation suppression device, reverberation suppression method, and computer-readable recording medium storing reverberation suppression program
KR102190833B1 (ko) 에코 억제
CN114302286B (zh) 一种通话语音降噪方法、装置、设备及存储介质
US20260057897A1 (en) Method for processing audio signal, electronic device, and computer-readable storage medium
CN111356058A (zh) 一种回声消除方法、装置及智能音箱
CN116980814A (zh) 信号处理方法、装置、电子设备及存储介质
CN109215672B (zh) 一种声音信息的处理方法、装置及设备
CN112289336B (zh) 音频信号处理方法和装置
CN115691524A (zh) 音频信号的处理方法、装置、设备及存储介质
CN110349592B (zh) 用于输出信息的方法和装置
CN110021289B (zh) 一种声音信号处理方法、装置及存储介质
CN112997249B (zh) 语音处理方法、装置、存储介质及电子设备
CN118486317A (zh) 一种非线性回声抑制方法、装置、电子设备及存储介质
CN106297816B (zh) 一种回声消除的非线性处理方法和装置及电子设备
CN110265048B (zh) 回声消除方法、装置、设备及存储介质

Legal Events

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

Ref document number: 18940360

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18940360

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 15.09.2021).

122 Ep: pct application non-entry in european phase

Ref document number: 18940360

Country of ref document: EP

Kind code of ref document: A1