Delay calculation method and related apparatus
By playing multiple ultrasonic signals through a speaker and receiving microphone signals, the echo delay is calculated using the time difference between the ultrasonic signals, thus solving the complex echo delay calculation problem in the prior art and improving the calculation speed and equipment efficiency.
Patent Information
- Application Number
- CN202210713688.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2042-06-22
AI Technical Summary
In the existing echo cancellation process, calculating the echo delay requires calculating multiple cross-correlation coefficients, which makes the calculation process complex and slow, especially when the position of the electronic device changes, the calculation requirements increase.
By generating multiple ultrasonic signals and receiving microphone signals after they are played through a speaker, the echo delay is calculated using the difference between the transmission time of the ultrasonic signals and the reception time of the echo signals, thus simplifying the delay calculation process.
It improves the calculation rate of echo delay, reduces the computational requirements of electronic devices, and simplifies the delay calculation process.
Smart Images

Figure CN117316174B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of signal processing, and in particular to a time delay calculation method and related apparatus. Background Technology
[0002] Echo cancellation is a fundamental function of both playback and pickup devices (e.g., mobile phones, smart speakers, conference terminals, etc.). Playback devices can play audio signals through speakers, while pickup devices can capture audio signals through microphones. For example, a mobile phone is both a playback and pickup device. In a hands-free call scenario, the sound emitted by the remote electronic device (referred to as the downlink voice signal) is transmitted to the local phone and played through its speaker. After airborne propagation and reflection, it is captured by the phone's microphone along with the speaker's voice (the signal captured by the microphone can be called the uplink voice signal). This results in the audio signal transmitted to the remote electronic device including the sound emitted by the remote electronic device itself, affecting call quality. Echo cancellation is the process of filtering out the sound emitted by the remote electronic device from the signal captured by the microphone, ensuring that the signal received by the remote electronic device only contains the speaker's voice received by the mobile phone.
[0003] Currently, echo cancellation is achieved by calculating the maximum cross-correlation coefficient between the downlink and uplink speech signals to determine the echo delay, and then using the echo delay and the downlink speech signal to cancel the echo in the uplink speech signal.
[0004] The process of determining the echo delay mentioned above requires calculating multiple cross-correlation coefficients, and then determining the maximum cross-correlation coefficient based on these multiple cross-correlation coefficients. The calculation process is complex and the delay calculation rate is slow. Summary of the Invention
[0005] This application provides a delay calculation method and related apparatus, which simplifies the delay calculation process and improves the delay calculation speed.
[0006] In a first aspect, a time delay calculation method is provided, comprising: generating multiple ultrasonic signals, wherein the transmission times of the multiple ultrasonic signals are different from each other, and the interval between the transmission times of any two pairs of ultrasonic signals is different, each pair of ultrasonic signals including two ultrasonic signals from the multiple ultrasonic signals; transmitting the multiple ultrasonic signals to a speaker to play the multiple ultrasonic signals through the speaker; receiving a signal from a microphone and detecting the signal to determine a first echo signal and a second echo signal; wherein the signal from the microphone is obtained by the microphone processing the signal picked up by the speaker and includes... The echo signals of some or all of the plurality of ultrasonic signals, wherein the first echo signal is the echo signal of the first ultrasonic signal among the plurality of ultrasonic signals, and the second echo signal is the echo signal of the second ultrasonic signal among the plurality of ultrasonic signals, wherein the interval between the reception time of the first echo signal and the second echo signal is the same as the interval between the transmission time of the first ultrasonic signal and the second ultrasonic signal among the plurality of ultrasonic signals; the echo delay is determined according to the transmission time of the first ultrasonic signal and the reception time of the first echo signal, or, the echo delay is determined according to the transmission time of the second ultrasonic signal and the reception time of the second echo signal.
[0007] This application transmits ultrasonic signals at multiple times and plays them through a speaker, so that the echo signal received by the microphone includes the ultrasonic signal played through the speaker. The difference between the time of receiving the echo signal and the time of transmission of the ultrasonic signal is determined as the echo delay. This method simplifies the calculation of echo delay by reducing the number of times it is calculated and improves the calculation speed.
[0008] In conjunction with the first aspect, in some implementations of the first aspect, the plurality of ultrasonic signals include multiple sets of ultrasonic signals transmitted at a preset duration. The transmission time interval between any two sets of ultrasonic signals is R times t, where t is a predefined value, and R is derived from N predefined values. The N values satisfy the following: if the N values are arranged in ascending order, the nth value among the N values is not the sum of any multiple adjacent values among the first n-1 values, N ≥ n ≥ 2, where n and N are integers, and R is a positive number.
[0009] In conjunction with the first aspect, in some implementations of the first aspect, the preset duration is not greater than the maximum delay, where the maximum delay is the maximum value of the time difference between the time the speaker plays the signal and the time difference between the time the echo signal of the received signal is received.
[0010] In conjunction with the first aspect, in some implementations of the first aspect, the signal from the microphone further includes an echo signal of the first speech signal, the first speech signal being a speech signal received from another electronic device; the method further includes: filtering the detected echo signal to obtain the echo signal of the first speech signal.
[0011] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: receiving the first speech signal; processing the first speech signal based on the echo delay to obtain a second speech signal, wherein the phase difference between the second speech signal and the first speech signal is the echo delay; and performing echo cancellation on the echo signal of the first speech signal based on the second speech signal.
[0012] Secondly, a delay calculation device is provided, which includes: a generation module, a detection module, and an estimation module.
[0013] The generation module is used to generate multiple ultrasonic signals, wherein the transmission times of the multiple ultrasonic signals are different from each other, and the interval between the transmission times of any two pairs of ultrasonic signals is different, and each pair of ultrasonic signals includes two ultrasonic signals from the multiple ultrasonic signals. The system transmits the plurality of ultrasonic signals to a loudspeaker to play the plurality of ultrasonic signals through the loudspeaker. The detection module is configured to: receive a signal from a microphone and detect the signal to determine a first echo signal and a second echo signal; wherein the signal from the microphone is obtained by processing the signal played by the loudspeaker, and the signal from the microphone includes echo signals of some or all of the plurality of ultrasonic signals; the first echo signal is the echo signal of the first ultrasonic signal among the plurality of ultrasonic signals, and the second echo signal is the echo signal of the second ultrasonic signal among the plurality of ultrasonic signals; the interval between the reception times of the first echo signal and the second echo signal is the same as the interval between the transmission times of the first ultrasonic signal and the second ultrasonic signal among the plurality of ultrasonic signals; the estimation module is configured to: determine an echo delay based on the transmission time of the first ultrasonic signal and the reception time of the first echo signal; or, determine an echo delay based on the transmission time of the second ultrasonic signal and the reception time of the second echo signal.
[0014] In conjunction with the second aspect, in some implementations of the second aspect, the plurality of ultrasonic signals include multiple sets of ultrasonic signals transmitted with a preset duration. Within any one period, the transmission time interval between any two sets of ultrasonic signals is R times t, where t is a predefined value, and R is derived from N predefined values. The N values satisfy the following: if the N values are arranged in ascending order, the nth value among the N values is not the sum of any multiple adjacent values among the first n-1 values, N ≥ n ≥ 2, where n and N are integers, and R is a positive number.
[0015] In conjunction with the second aspect, in some implementations of the second aspect, the preset duration is not greater than the maximum delay, where the maximum delay is the maximum value of the time difference between the time the device plays the signal through the speaker and the time difference between the time the device receives the echo signal of the signal.
[0016] In conjunction with the second aspect, in some implementations of the second aspect, the signal from the microphone further includes an echo signal of a first voice signal, the first voice signal being a voice signal received by an electronic device connected to the device from another electronic device; the device further includes: a filtering module for filtering the detected echo signal to obtain the echo signal of the first voice signal.
[0017] In conjunction with the second aspect, in some implementations of the second aspect, the apparatus further includes: a determining module, configured to receive the first speech signal, process the first speech signal based on the echo delay to obtain a second speech signal, wherein the phase difference between the second speech signal and the first speech signal is the echo delay; and a cancellation module, configured to perform echo cancellation on the echo signal of the first speech signal based on the second speech signal.
[0018] Thirdly, an electronic device is provided, comprising: a speaker and any of the possible time-delay calculation devices in the second aspect.
[0019] In conjunction with the third aspect, in some implementations of the third aspect, the electronic device further includes: a microphone for acquiring information, the signal including an echo signal from the speaker.
[0020] Fourthly, another delay calculation device is provided, including a processor and a memory for storing code instructions; the processor is used to execute the code instructions such that the delay calculation device performs the method as described in the first aspect or any implementation thereof.
[0021] Fifthly, a computer-readable storage medium is provided that stores instructions which, when executed, cause a computer to perform the method described in the first aspect or any implementation thereof.
[0022] A sixth aspect is a computer program product comprising a computer program that, when run, causes a computer to perform the methods described in the first aspect or any implementation thereof. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0024] Figure 2 This is a schematic block diagram of a time delay calculation device;
[0025] Figure 3 This is a schematic diagram illustrating the relationship between multiple voice signals provided in an embodiment of this application;
[0026] Figure 4 This is a schematic flowchart illustrating a delay calculation method provided in an embodiment of this application;
[0027] Figure 5 This is a schematic diagram illustrating a method for generating ultrasonic signals according to an embodiment of this application;
[0028] Figure 6 This is a schematic block diagram of a delay calculation device provided in an embodiment of this application;
[0029] Figure 7 This is a schematic block diagram of another electronic device provided in an embodiment of this application;
[0030] Figure 8 This is a schematic block diagram of another electronic device provided in the embodiments of this application;
[0031] Figure 9 This is a schematic block diagram of another delay calculation device provided in the embodiments of this application. Detailed Implementation
[0032] The technical solutions in this application will now be described with reference to the accompanying drawings.
[0033] The terminal in this application embodiment may also be referred to as: client, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, wireless communication device, user agent, or user equipment, etc.
[0034] A terminal can be a device that provides voice / data connectivity to a user, such as a handheld device or in-vehicle device with wireless connectivity. Currently, examples of terminal devices include: mobile phones, tablets, laptops, PDAs, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving vehicles, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks, or future public land mobile communication networks. This application does not limit the terminal devices in a network (PLMN), etc.
[0035] It should be understood that the terminal in this application embodiment can be any electronic device with voice input or output function.
[0036] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 1As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a sensor module 180, buttons 190, an indicator 192, a camera 193, and a display screen 194, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a proximity sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0037] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device. In other embodiments of this application, the terminal device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0038] The processor 110 may include one or more processing units. These processing units may be independent devices or integrated within one or more processors. The processor 110 may also include memory for storing instructions and data.
[0039] The Universal Serial Bus (USB) interface 130 is a USB standard-compliant interface. This USB interface 130 can be used to connect a charger to charge terminal devices, and can also be used for data transfer between terminal devices and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices.
[0040] The charging management module 140 receives charging input from the charger. The charger can be a wireless charger or a wired charger. The power management module 141 connects the charging management module 140 to the processor 110.
[0041] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
[0042] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Antennas in terminal equipment can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0043] The mobile communication module 150 can provide solutions for wireless communication applications in terminal devices, including 2G, 3G, 4G, and 5G technologies. The mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, filter and amplify the received electromagnetic waves, and then transmit them to a modem processor for demodulation.
[0044] The wireless communication module 160 can provide solutions for wireless communication applications on terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.
[0045] The terminal device implements display functions through a graphics processing unit (GPU), a display screen 194, and an application processor. The GPU connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering.
[0046] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the terminal device may include one or N display screens 194, where N is a positive integer greater than 1.
[0047] Terminal devices can achieve shooting functions through image signal processing (ISP), cameras 193, video codecs, GPUs, displays 194, and application processors.
[0048] Camera 193 is used to capture still images or videos. In some embodiments, the terminal device may include one or N cameras 193, where N is a positive integer greater than 1.
[0049] The external storage interface 120 can be used to connect an external memory card, thereby expanding the storage capacity of the terminal device. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0050] Internal memory 121 can be used to store executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area.
[0051] The terminal device can implement audio functions such as music playback and recording through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, and an application processor.
[0052] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Terminal devices can listen to music or hands-free calls through speaker 170A. Receiver 170B, also called a "handpiece," is used to convert audio electrical signals into sound signals. When the terminal device answers a phone call or voice message, it can listen to the voice by bringing the receiver 170B close to the user's ear. Microphone 170C, also called a "microphone" or "voice transducer," is used to convert sound signals into electrical signals.
[0053] A pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on a display screen 194. A gyroscope sensor 180B can be used to determine the motion posture of the terminal device. A barometric pressure sensor 180C is used to measure barometric pressure. A magnetic sensor 180D includes a Hall effect sensor. An accelerometer sensor 180E can detect the magnitude of acceleration of the terminal device in various directions (generally three axes). A distance sensor 180F is used to measure distance. A proximity sensor 180G may include, for example, a light-emitting diode (LED) and a photodetector, such as a photodiode. An ambient light sensor 180L is used to sense ambient light intensity. A fingerprint sensor 180H is used to collect fingerprints. A temperature sensor 180J is used to detect temperature. A touch sensor 180K, also known as a "touch device," is used. A bone conduction sensor 180M can acquire vibration signals.
[0054] Touch sensor 180K can be disposed on display screen 194, and touch screen, or "touchscreen", is composed of touch sensor 180K and display screen 194. In this embodiment, the touchscreen can be provided with a grid of capacitive sensing nodes (hereinafter referred to as capacitive sensors). When the terminal device determines that the capacitance value of at least one grid received by the capacitive sensor exceeds the capacitance threshold, a touch operation can be determined. Furthermore, the terminal device can determine the touch area corresponding to the touch operation based on the area occupied by at least one grid that exceeds the capacitance threshold.
[0055] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. The terminal device can receive button input and generate key signal inputs related to user settings and function control of the terminal device. Indicator 192 can be an indicator light, used to indicate charging status, power level changes, messages, missed calls, notifications, etc.
[0056] Currently, during voice calls, if the sound from a remote electronic device played by the speaker is picked up by the microphone, the caller at the remote end will hear an echo of their own voice, which seriously affects the call quality. Therefore, it is necessary to cancel the echo of the signal picked up by the microphone in order to eliminate the echo of the sound played by the speaker.
[0057] The following is combined with Figure 2 This document details the specific process of echo cancellation. In this embodiment, the process by which sound played by a speaker is reflected through the air and other surrounding elements is referred to as the echo path.
[0058] Figure 2 This is a schematic block diagram of a delay calculation device 200. (Example) Figure 2As shown, the delay calculation device 200 includes: a speaker 210, a microphone 220, a delay estimation module 230, and an adaptive filter 240.
[0059] It should be understood that the echo path of the sound played by the speaker back to the microphone after reflection from the surrounding environment is different in different scenarios.
[0060] It should also be understood that the above-described delay calculation device 200 is merely an example shown in the embodiments of this application and does not constitute any limitation on the delay calculation device of this application.
[0061] like Figure 2 As shown, device 200 receives a voice signal x(n) from a remote electronic device and plays it through speaker 210. After playback, the voice signal x(n) is transformed into the voice of a speaker at the remote location. At this time, microphone 240 may collect the echo signal y(n) after the sound passes through the echo path and convert it into the corresponding voice signal. If there is a speaker's voice s(n) on the device 200 side, device 200 can collect the voice s(n) through microphone 240. At this time, microphone 240 converts the voice signal s(n) and the echo signal y(n) into the corresponding voice signal d(n) = y(n) + s(n) and sends the signal to the time delay estimation module 230.
[0062] like Figure 2 As shown, the time delay estimation module 230 in device 200 acquires the voice signal x(n) from the remote electronic device and the voice signal d(n) collected by the microphone 220, and calculates the cross-correlation coefficient between the two based on the voice signals x(n) and d(n), thereby determining the time delay corresponding to the maximum value among the acquired cross-correlation coefficients as the echo delay. For example, for an audio signal with a sampling frequency of F (e.g., 16000Hz), a time delay calculation precision of P (e.g., 0.001 seconds), and a maximum time delay of Dmax (e.g., 0.02 seconds), each time the echo delay is determined, N = F * P / Dmax cross-correlation coefficients Corr(0), Corr(1) ... Corr(N) need to be calculated, and then the maximum value Corr(M) is taken. M * 0.001 seconds is the echo delay Δt determined by the time delay estimation module 230.
[0063] like Figure 2As shown, the adaptive filter 240 in device 200 acquires the speech signal x(n) from the remote electronic device and the echo delay Δt determined by the delay estimation module 230. Based on the echo delay Δt, it determines the order parameters of the adaptive filter and parameters such as the buffer size. A specific adaptive algorithm is then used to continuously adjust the weight vector, making the estimated echo path gradually approach the actual echo path. That is, the signal y1(n) output by the adaptive filter 240 is essentially the same as the signal y(n) after passing through the echo path. Afterwards, device 200 subtracts the signal d(n) from the echo signal y1(n) estimated by the adaptive filter 240 to obtain the error signal e(n) = d(n) - y1(n). It should be understood that the smaller the value of this error signal e(n), the closer the echo path estimated by the adaptive filtering algorithm is to the actual echo path.
[0064] The following is combined with Figure 3 The relationship between the above signals x(n), y1(n), and d(n) is explained in detail.
[0065] Figure 3 This is a schematic diagram illustrating the relationship between multiple voice signals provided in an embodiment of this application. For example... Figure 3 As shown, signal x(n) is the speech signal without an echo path; signal d(n) is the speech signal collected by the microphone, signal d(n) = y(n) + s(n); signal y1(n) is the speech signal after passing through the above... Figure 2 The output speech signal after the adaptive filter 240 is shown. Signal d(n) can be considered as signal x(n) shifted Δt along the time axis and then added to signal s(n), i.e., d(n) = x(n+Δt) + s(n). Signal y1(n) can be considered as signal x(n) shifted Δt along the time axis, i.e., y1(n) = x(n+Δt).
[0066] Combination Figure 2 In the example shown, the echo cancellation process is: e(n) = d(n) - y1(n), where signal d(n) includes signal y(n), i.e., e(n) = y(n) + s(n) - y1(n). Since signal y(n) and signal y1(n) are essentially the same, echo cancellation can be performed using the above formula.
[0067] In summary, the echo cancellation process described above requires the calculation of multiple cross-correlation coefficients for each time delay calculation, which is not only complex but also slow.
[0068] For example, when the speaker and microphone are deployed on two separate electronic devices, the relative distance and position of the two electronic devices may change at any time. That is, the transmission delay of the voice signal may change at any time within a large range. The above-mentioned delay calculation method requires more frequent delay calculation, which means that the electronic devices need to constantly calculate the cross-correlation coefficient to determine the echo delay, and the computing power requirements of the electronic devices will also be higher.
[0069] In view of this, embodiments of this application provide a delay calculation method and related apparatus. By adding multiple ultrasonic signals to the voice signal to be played, with any two pairs of ultrasonic signals having different time intervals, and by sending the multiple ultrasonic signals to a speaker for playback, the echo signals of at least two ultrasonic signals are obtained. The corresponding ultrasonic signal is determined based on the echo signal of the ultrasonic signal. The echo delay of the signal is calculated based on the time of the obtained echo signal of the ultrasonic signal and the transmission time of the corresponding ultrasonic signal. This simplifies the delay calculation process, improves the calculation rate of echo delay, and thus reduces the computational requirements of electronic devices for delay calculation.
[0070] Before introducing the delay calculation method and related apparatus provided in this application, the following points should be made first.
[0071] First, in the embodiments shown below, the terms "first," "second," and various numerical designations are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. For example, distinguishing different voice signals. It should be noted that the use of ordinal numbers such as "first" and "second" in the embodiments of this application is for distinguishing multiple objects and is not intended to limit the order, timing, priority, or importance of multiple objects. For example, "first voice signal," "second voice signal," etc., are only for distinguishing different voice signals and do not indicate that the two voice signals are of different importance.
[0072] Second, in the embodiments shown below, the words "exemplarily" or "for example" are used to indicate that they are examples, illustrations, or descriptions. Any embodiment or design described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0073] Furthermore, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0074] Figure 4 This is a schematic flowchart illustrating a latency calculation method 400 provided in an embodiment of this application. This method 400 can be applied to any latency calculation device with voice playback functionality or a latency calculation device with both voice playback and voice pickup functionality. Figure 4 As shown, the method 400 may include steps S401 to S404. The following is a detailed description of each step in the method 400.
[0075] S401 generates multiple ultrasonic signals. The transmission times of the multiple ultrasonic signals are different, and the interval between the transmission times of any two pairs of ultrasonic signals is different. Each pair of ultrasonic signals includes two ultrasonic signals from the multiple ultrasonic signals.
[0076] S402 sends multiple ultrasonic signals to a speaker to play the multiple ultrasonic signals through the speaker.
[0077] It should be understood that the generation time of the above x+1 (or more) ultrasonic signals can be time t0, time t1, ..., time tx, and the x+1 times can form (x+1)*x / 2 time intervals, and any two time intervals in the (x+1)*x / 2 time intervals are different, where x is an integer greater than 0.
[0078] For example, taking the generation of four ultrasonic signals as an example, ultrasonic signals are generated at times t0, t1, t2, and t3, and then sent to a speaker for playback. The transmission time intervals between any two pairs of ultrasonic signals include: n01 between t0 and t1, n02 between t0 and t2, n03 between t0 and t3, n12 between t1 and t2, n13 between t1 and t3, and n23 between t2 and t3. Therefore, the intervals between any two pairs of ultrasonic signals are different, namely n01, n02, n03, n12, n13, and n23, and n01, n02, n03, n12, n13, and n23 are all different.
[0079] It should be noted that the ultrasonic signal is generated when an electronic device receives a voice signal from another electronic device. The program calls the interface corresponding to the generation module used to generate the ultrasonic signal to notify the module to generate the ultrasonic signal.
[0080] S403 receives a signal from the microphone and detects the signal to determine the first echo signal and the second echo signal.
[0081] The signal from the microphone is obtained by processing the signal played by the speaker. The signal from the microphone includes echo signals of some or all of the multiple ultrasonic signals. The first echo signal is the echo signal of the first ultrasonic signal among the multiple ultrasonic signals, and the second echo signal is the echo signal of the second ultrasonic signal among the multiple ultrasonic signals. The interval between the reception time of the first echo signal and the second echo signal is the same as the interval between the transmission time of the first ultrasonic signal and the second ultrasonic signal among the multiple ultrasonic signals.
[0082] It should be understood that the first echo signal can be the echo signal of the ultrasonic signal generated at time ti, and the second echo signal can be the echo signal of the ultrasonic signal generated at time tj, where i is not equal to j. That is to say, the first echo signal and the second echo signal mentioned above are echo signals of ultrasonic signals transmitted at different times.
[0083] Referring to the example above, the first echo signal can be the echo of any ultrasonic signal generated at time t0, t1, t2, or t3, and the second echo signal can be the echo of any ultrasonic signal remaining after the first echo signal from the ultrasonic signals generated at time t0, t1, t2, or t3. For example, the first echo signal is the echo of the ultrasonic signal transmitted at time t0, and the second echo signal can be the echo of the ultrasonic signal transmitted at time t1, t2, or t3.
[0084] S404, determine the echo delay based on the transmission time of the first ultrasonic signal and the reception time of the first echo signal, or determine the echo delay based on the transmission time of the second ultrasonic signal and the reception time of the second echo signal.
[0085] It should be understood that the aforementioned echo delay is the time difference between the transmission time of the first ultrasonic signal and the reception time of the first echo signal, or the time difference between the transmission time of the second ultrasonic signal and the reception time of the second echo signal.
[0086] Combining the example above, if the transmission time of the first ultrasonic signal is ti, the corresponding reception time of the first echo signal is ti', the transmission time of the second ultrasonic signal is tj, and the reception time of the second echo signal is tj', then the echo delay Δt = ti' - ti, or Δt = tj' - tj.
[0087] It should be understood that, based on the characteristics of ultrasound, ultrasound is a sound that cannot be heard by the human ear. Therefore, the generated ultrasound signal will not have any impact on the call quality between users.
[0088] In this embodiment, by sending ultrasonic signals at multiple times and playing them through a speaker, the echo signal received by the microphone includes the ultrasonic signal played through the speaker. The difference between the time of receiving the echo signal and the time of sending the ultrasonic signal is determined as the echo delay. This method simplifies the delay calculation process and improves the delay calculation speed.
[0089] As an optional embodiment, the aforementioned multiple ultrasonic signals include multiple sets of ultrasonic signals transmitted with a preset duration. Within any one period, the transmission time interval between any two sets of ultrasonic signals is R times t, where t is a predefined value, and R is derived from N predefined values. The N values satisfy the following conditions: if the N values are arranged in ascending order, the nth value among the N values is not the sum of any multiple adjacent values among the first n-1 values, N≥n≥2, where n and N are integers, and R is a positive number.
[0090] It should be understood that if n = N = 2, the two values are different.
[0091] The following example uses nine ultrasound waves generated from time t0 to time t8, combined with... Figure 5 This section details the methods for generating multiple ultrasonic signals.
[0092] Figure 5 This is a schematic diagram illustrating a method for generating ultrasonic signals according to an embodiment of this application. Figure 5As shown, the preset duration is T = t4-t0, T = t5-t1, T = t6-t2, T = t7-t3, or T = t8-t4. That is to say, the transmission period of the ultrasonic signal is T = m1*t + m2*t + m3*t + m4*t = (m1 + m2 + m3 + m4)*t, where m1, m2, m3, and m4 are all positive numbers.
[0093] It should be understood that m1, m2, m3, and m4 can be taken from the above N values, where N can be equal to 4. That is to say, four values are predefined, namely m1, m2, m3, and m4.
[0094] like Figure 5 As shown, four sets of ultrasonic signals were transmitted with a period T. Each set of ultrasonic signals was generated at time t0 to t4 (1-1), time t1 to t5 (2-2), time t2 to t6 (3-3), and time t3 to t7 (4-4). Within any given period, for example, from time t0 to time t4, 1, 2, 3, and 4 represent a set of ultrasonic signals. The time interval between any two sets of ultrasonic signals can be m1*t, m2*t, m3*t, m4*t, m1*t+m2*t, m1*t+m2*t+m3*t, m1*t+m2*t+m3*t+m4*t, m2*t+m3*t, m2*t+m3*t+m4*t, m3*t+m4*t. The time interval between any two sets of ultrasonic signals is R times t, and the above time intervals are all different from each other. The values of t, m1, m2, m3, and m4 are all predefined values.
[0095] It should be understood that the values of m1, m2, m3, and m4 mentioned above can come from the predefined N values mentioned above. Based on the requirement that the time intervals between any two sets of ultrasonic signals are different, the N values satisfy the following: if the N values are arranged in ascending order, the nth value among the N values is not the sum of any number of adjacent values among the first n-1 values.
[0096] In this embodiment, the time interval between any two ultrasonic signals among the multiple ultrasonic signals generated and transmitted in each cycle is different. This allows the transmission time of the ultrasonic signal corresponding to the echo signal to be determined based on the time interval between the two echo signals when the echo signals of any two ultrasonic signals are received. Furthermore, the echo delay is calculated based on the reception time and transmission time, thereby improving the delay calculation rate.
[0097] As an optional embodiment, the preset duration is not greater than the maximum delay, which is the maximum value of the time difference between the time the speaker plays the signal and the time difference between the time the echo signal of the received signal is received.
[0098] It should be understood that the aforementioned maximum latency is the time difference estimated by the developers before the device leaves the factory, based on the most likely usage scenario of the electronic device, from the time the electronic device emits a sound signal to the time it receives the echo signal of the sound signal in that scenario, and this difference is determined as the maximum latency, thereby determining the parameters required to generate multiple ultrasonic signals.
[0099] In this embodiment, the transmission period of the ultrasonic signal is set according to the maximum time delay, so that the echo signals of the two received ultrasonic waves belong to two signals within the same period, thereby improving the accuracy of echo time delay calculation.
[0100] Optionally, the signal from the microphone may also include an echo signal of the first speech signal, which is a speech signal received from another electronic device; the method 400 may further include: filtering the detected echo signal to obtain the echo signal of the first speech signal.
[0101] It should be understood that the electronic device (another electronic device in this application) converts the acquired sound signal into an electrical signal (the voice signal in this application), and transmits the electrical signal to the delay calculation device that establishes the communication connection. The delay calculation device plays the received electrical signal through a speaker and converts it back into a sound signal. It may be received by the microphone on the delay calculation device and converted back into an electrical signal for transmission to the electronic device. In this embodiment of the application, this part of the signal transmitted to the electronic device A is called the echo signal of the first voice signal.
[0102] Optionally, the signal from the microphone may also include the user's voice signal received by the local delay calculation device. The user's voice signal is the electrical signal converted from the user's voice signal by the microphone.
[0103] It should be understood that when the signal from the microphone also includes the user's voice signal received by the local electronic device, the above-mentioned filtering of the detected echo signal results in a signal that includes the echo signal of the first voice signal and the received user's voice signal.
[0104] Optionally, the method 400 further includes: receiving a first speech signal; processing the first speech signal based on the echo delay to obtain a second speech signal; and canceling the echo signal of the first speech signal based on the second speech signal.
[0105] For example, such as Figure 3The signal x(n) shown is the first speech signal, Δt is the echo delay, and signal y1(n) is the second speech signal obtained by processing the first speech signal based on the echo delay. It should be understood that this processing method involves shifting the first speech signal by Δt along the time axis. Signal y(n) is the echo signal of the first speech signal, and the method described above for echo cancellation of the echo signal of the first speech signal based on the second speech signal is y1(n)-y(n).
[0106] In another possible implementation, an ultrasonic signal is generated and sent to a speaker for playback; a signal from a microphone is received and detected to determine the echo signal of the ultrasonic signal; and the echo delay is determined based on the reception time of the echo signal and the transmission time of the ultrasonic signal.
[0107] The above method only requires calculating the echo delay once based on the time of the rise signal of the received ultrasonic signal and the time of transmission of the ultrasonic signal, which simplifies the delay calculation process and improves the calculation speed.
[0108] It should be understood that the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0109] The above text combines Figure 4 and Figure 5 The delay calculation method of the embodiments of this application is described in detail below. Figures 6 to 9 The apparatus of the embodiments of this application is described in detail below.
[0110] Figure 6 This is a schematic block diagram of a delay calculation device provided in an embodiment of this application. Figure 6 As shown, the device 600 includes: a generation module 610, a detection module 620, and an estimation module 630.
[0111] The generation module 610 is used to: generate multiple ultrasonic signals and send the multiple ultrasonic signals to a speaker to play the multiple ultrasonic signals through the speaker; the transmission times of the multiple ultrasonic signals are different, and the interval between the transmission times of any two pairs of ultrasonic signals is different, and each pair of ultrasonic signals includes two ultrasonic signals from the multiple ultrasonic signals.
[0112] The detection module 620 is configured to: receive a signal from a microphone and detect the signal to determine a first echo signal and a second echo signal; wherein the signal from the microphone is obtained by the microphone processing the signal played by the speaker, the signal from the microphone includes echo signals of some or all of the plurality of ultrasonic signals, the first echo signal is the echo signal of the first ultrasonic signal among the plurality of ultrasonic signals, the second echo signal is the echo signal of the second ultrasonic signal among the plurality of ultrasonic signals, and the interval between the reception time of the first echo signal and the second echo signal is the same as the interval between the transmission time of the first ultrasonic signal and the second ultrasonic signal among the plurality of ultrasonic signals.
[0113] The estimation module 630 is used to: determine the echo delay based on the transmission time of the first ultrasonic signal and the reception time of the first echo signal; or, to determine the echo delay based on the transmission time of the second ultrasonic signal and the reception time of the second echo signal.
[0114] It should be understood that when device 600 receives a voice signal from another electronic device, it calls the interface corresponding to the generation module through a program to notify the generation module to generate an ultrasonic signal.
[0115] Optionally, the plurality of ultrasonic signals includes multiple sets of ultrasonic signals transmitted at a preset duration. Within any one period, the transmission time interval between any two sets of ultrasonic signals is R times t, where t is a predefined value, and R is derived from N predefined values. The N values satisfy the following conditions: if the N values are arranged in ascending order, the nth value is not the sum of any number of adjacent values among the first n-1 values, N ≥ n ≥ 2, where n and N are integers, and R is a positive number.
[0116] Optionally, the preset duration is not greater than the maximum delay, where the maximum delay is the maximum value of the time difference between the time the device plays the signal through the speaker and the time difference between the time the device receives the echo signal of the signal.
[0117] Optionally, the signal from the microphone may also include an echo signal of a first voice signal, which is a voice signal received by an electronic device connected to the device from another electronic device; the device 600 may further include a filtering module 640 for filtering the detected echo signal to obtain the echo signal of the first voice signal.
[0118] Optionally, the device further includes: a determining module 650, configured to receive the first speech signal, process the first speech signal based on the echo delay to obtain a second speech signal, wherein the phase difference between the second speech signal and the first speech signal is the echo delay; and an echo cancellation module 660, configured to perform echo cancellation on the echo signal of the first speech signal based on the second speech signal.
[0119] The beneficial effects of the above embodiments can be found in the relevant description of the method described above, and will not be repeated here.
[0120] It should be understood that the delay calculation device 600 here is embodied in the form of a functional module. The term "module" here may refer to application-specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, proprietary processors, or group processors) and memories for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functions.
[0121] The aforementioned delay calculation device 600 has the function of implementing the corresponding steps performed by the delay calculation device in the aforementioned method 400; the aforementioned function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned function.
[0122] In the embodiments of this application, Figure 6 The delay calculation device 600 in the application can also be a chip or a chip system, such as a system on chip (SoC), which is not limited herein.
[0123] Figure 7 This is a schematic block diagram of another electronic device 700 provided in an embodiment of this application. For example... Figure 7 As shown, the electronic device 700 includes a device 600 and a speaker 710.
[0124] The functions of device 600 can be found in the descriptions of the modules described above, and will not be repeated here. Speaker 710 is used to play voice signals.
[0125] Optionally, the device 700 further includes a microphone 720 for acquiring information, the signal including an echo signal from the speaker.
[0126] Figure 8 This is a schematic block diagram of another electronic device 800 provided in an embodiment of this application. Figure 8As shown, the electronic device 800 includes: a generation module 810, a speaker 820, a microphone 830, a detection module 840, an estimation module 850, a filtering module 860, a determination module 870, and an elimination module 880.
[0127] The generation module 810 is used to: generate multiple ultrasonic signals ux(n) when the electronic device 800 receives a voice signal x(n) (first voice signal) from another electronic device, and send the generation time of the multiple ultrasonic signals ux(n) to the estimation module 850.
[0128] It should be understood that the method by which the generation module 810 generates ultrasonic signals can be referred to the relevant description of the generation module 810 above, and will not be repeated here.
[0129] The speaker 820 is used to play signals x(n) and ux(n). That is, the played voice signal x(n) + ux(n) is converted into a sound signal that can be received by another electronic device. At the same time, the generation module 810 sends the generation times of multiple ultrasonic signals to the estimation module 850.
[0130] The microphone 830 is used to: collect the sound signal played by the speaker 820, the echo signal y(n)+uy(n) after passing through the echo path, and convert it into the corresponding speech signal (the speech signal includes the echo signal of the first speech signal x(n) and the echo signal of the ultrasonic signal ux(n), and send the speech signal to the detection module 840.
[0131] Optionally, if a user's voice s(n) is present on the side of the electronic device 800, the microphone 830 is further configured to: acquire the voice signal s(n), convert the voice signal s(n) and the echo signal y(n)+uy(n) into a corresponding speech signal, and send the speech signal to the detection module 840.
[0132] The detection module 840 is used to: receive the voice signal from the microphone 830 and send the time of the echo signal uy(n) of the detected ultrasonic signal to the estimation module 850.
[0133] Optionally, the detection module 840 is also used to forward the received voice signal from the microphone 830 to the filtering module 860.
[0134] The filtering module 860 is used to filter the echo signal uy(n) of the ultrasonic signal in the received voice signal and send the filtered signal d(n) to the cancellation module 880.
[0135] The estimation module 850 is used to: receive the generation time (i.e. transmission time) of multiple ultrasonic signals and the time when the electronic device 800 receives the echo signal of the ultrasonic signal, calculate the echo delay based on the generation time of the ultrasonic signal and the time of the echo signal, and send the echo delay to the determination module 870.
[0136] The specific calculation process here can be found in the calculation process of echo delay in Method 400 above, and will not be repeated here.
[0137] The determining module 870 is used to: process the received speech signal x(n) according to the received echo delay to obtain the processed speech signal (the second speech signal mentioned above), and send the processed speech signal to the cancellation module 880.
[0138] It should be understood that this processing procedure can be referred to the relevant description of obtaining the second speech signal in method 400 above, and will not be repeated here.
[0139] The echo cancellation module 880 is used to: cancel the echo of the signal d(n) based on the voice signal received from the determination module 870, and send the canceled voice signal to another electronic device that has established a communication connection with the electronic device 800.
[0140] Alternatively, the microphone 830 described above can also be deployed in other electronic devices.
[0141] Figure 9 This is a schematic block diagram of another delay calculation device 900 provided in an embodiment of this application. For example... Figure 9 As shown, the device 900 includes a processor 910, a memory 920, and a transceiver 930. The processor 910, memory 920, and transceiver 930 are connected via an internal connection path. The memory 920 stores instructions, and the processor 910 executes the instructions stored in the memory 920, enabling the device 900 to execute the latency calculation method 400 provided in the above-described method embodiment.
[0142] It should be understood that the functions of device 600 in the above embodiments can be integrated into device 900, which can be used to execute the various steps and / or processes corresponding to the latency calculation device in the above method embodiments. Optionally, the memory 920 may include read-only memory and random access memory, and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information. The processor 910 can be used to execute instructions stored in the memory, and when the processor executes the instructions, the processor 910 can execute the various steps and / or processes corresponding to the terminal device in the above method embodiments.
[0143] It should be understood that, in the embodiments of this application, the processor 910 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 910 may be a microprocessor or any conventional processor.
[0144] In implementation, each step of the above method 400 can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly manifested as execution by a hardware processor, or as a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor executes the instructions in the memory, combining them with its hardware to complete the steps of the above method. To avoid repetition, detailed descriptions are omitted here.
[0145] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0146] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0147] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0148] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0149] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0150] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0151] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A delay calculation method, characterized in that, include: Multiple ultrasonic signals are generated, and the transmission times of the multiple ultrasonic signals are different from each other, and the interval between the transmission times of any two pairs of ultrasonic signals is different. Each pair of ultrasonic signals includes two ultrasonic signals from the multiple ultrasonic signals. The multiple ultrasonic signals include multiple sets of ultrasonic signals transmitted with a preset duration as the period. The preset duration is not greater than the maximum time delay. The maximum time delay is the maximum value of the time difference between the time when the speaker plays the signal and the time difference between the time when the echo signal of the received signal is received. The plurality of ultrasonic signals are sent to a loudspeaker to play the plurality of ultrasonic signals through the loudspeaker; The system receives and detects signals from a microphone to determine a first echo signal and a second echo signal. The signal from the microphone is obtained by processing a signal picked up by the microphone and played from a speaker. The signal from the microphone includes echo signals of some or all of the plurality of ultrasonic signals. The first echo signal is the echo signal of the first ultrasonic signal among the plurality of ultrasonic signals, and the second echo signal is the echo signal of the second ultrasonic signal among the plurality of ultrasonic signals. The interval between the reception time of the first echo signal and the second echo signal is the same as the interval between the transmission time of the first ultrasonic signal and the second ultrasonic signal among the plurality of ultrasonic signals. The echo delay is determined based on the transmission time of the first ultrasonic signal and the reception time of the first echo signal, or the echo delay is determined based on the transmission time of the second ultrasonic signal and the reception time of the second echo signal.
2. The method according to claim 1, characterized in that, The transmission time interval between any two sets of ultrasonic signals in the plurality of ultrasonic signals is t times R, where t is a predefined value and R is derived from N predefined values. The N values satisfy the following conditions: if the N values are arranged in ascending order, the nth value among the N values is not the sum of any number of adjacent values among the first n-1 values, N ≥ n ≥ 2, where n and N are integers and R is a positive number.
3. The method according to claim 1 or 2, characterized in that, The signal from the microphone also includes an echo signal of a first voice signal, which is a voice signal received from another electronic device. The method further includes: The detected echo signal is filtered to obtain the echo signal of the first speech signal.
4. The method according to claim 3, characterized in that, The method further includes: Receive the first voice signal; The first speech signal is processed based on the echo delay to obtain a second speech signal, and the phase difference between the second speech signal and the first speech signal is the echo delay. Based on the second speech signal, echo cancellation is performed on the echo signal of the first speech signal.
5. A time delay calculation device, characterized in that, include: A generation module is used to generate multiple ultrasonic signals and send the multiple ultrasonic signals to a speaker for playback of the multiple ultrasonic signals through the speaker; the transmission times of the multiple ultrasonic signals are different, and the interval between the transmission times of any two pairs of ultrasonic signals is different, and each pair of ultrasonic signals includes two ultrasonic signals from the multiple ultrasonic signals. A detection module is used to receive signals from a microphone and detect the signals to determine a first echo signal and a second echo signal; wherein the signals from the microphone are obtained by processing the signals picked up by the microphone from the signals played by the speaker, and the signals from the microphone include echo signals of some or all of the plurality of ultrasonic signals, the first echo signal is the echo signal of the first ultrasonic signal among the plurality of ultrasonic signals, the second echo signal is the echo signal of the second ultrasonic signal among the plurality of ultrasonic signals, and the interval between the reception time of the first echo signal and the second echo signal is the same as the interval between the transmission time of the first ultrasonic signal and the second ultrasonic signal among the plurality of ultrasonic signals; The estimation module is used to determine the echo delay based on the transmission time of the first ultrasonic signal and the reception time of the first echo signal; or, it is used to determine the echo delay based on the transmission time of the second ultrasonic signal and the reception time of the second echo signal.
6. The apparatus according to claim 5, characterized in that, The plurality of ultrasonic signals include multiple sets of ultrasonic signals transmitted at a preset duration. Within any one period, the interval between the transmission times of any two sets of ultrasonic signals is R times t, where t is a predefined value and R is derived from N predefined values. The N values satisfy the following conditions: if the N values are arranged in ascending order, the nth value is not the sum of any number of adjacent values among the first n-1 values, N ≥ n ≥ 2, where n and N are integers and R is a positive number.
7. The apparatus according to claim 5 or 6, characterized in that, The signal from the microphone also includes an echo signal of the first voice signal, which is a voice signal received by an electronic device connected to the device from another electronic device. The device further includes: The filtering module is used to filter the detected echo signal to obtain the echo signal of the first speech signal.
8. The apparatus according to claim 7, characterized in that, The device further includes: The determining module is used to receive the first speech signal, process the first speech signal based on the echo delay, and obtain a second speech signal, wherein the phase difference between the second speech signal and the first speech signal is the echo delay; The echo cancellation module is used to cancel the echo signal of the first speech signal based on the second speech signal.
9. An electronic device, characterized in that, Includes a loudspeaker, and the device as claimed in any one of claims 5 to 8.
10. The electronic device according to claim 9, characterized in that, The electronic device also includes: A microphone is used to collect signals, including echo signals from the speaker.
11. A time delay calculation device, characterized in that, include: A processor coupled to a memory for storing a computer program, which, when invoked by the processor, causes the apparatus to perform the method as described in any one of claims 1 to 4.
12. A computer-readable storage medium, characterized in that, Used to store a computer program, the computer program including instructions for implementing the method as described in any one of claims 1 to 4.
13. A computer program product, characterized in that, It includes a computer program, the computer program comprising instructions for implementing the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Far-field pickup device and method for collecting human voice signals in far-field pickup device
CN110166882A
Time delay estimation method and device in echo cancellation and electronic equipment
CN113870889A
Echo cancellation method for voice interaction system, electronic equipment and storage medium
CN114242102A
