# US 2021/0082449 A1 · Sample-Accurate Delay Identification in a Frequency Domain

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0082449 A1
- Document ID: US20210082449A1
- Status: Published application
- Kind: A1
- Application number: 17/022,423
- Filed: 2020-09-16
- Published: 2021-03-18
- Earliest claimed: 2019-09-17
- Assignees: Dolby Laboratories Licensing Corporation, San Francisco, CA
- Applicants: Dolby Laboratories Licensing Corporation
- Inventors: Nicholas Luke APPLETON; Shanush PREMA THASARATHAN
- Web page: https://patentgrep.com/patent/US20210082449A1

## CPC

- G10L 21/0224: Processing in the time domain
- G10L 25/48: specially adapted for particular use
- G10L 19/008: Multichannel audio signal coding or decoding using interchannel correlation to reduce redundancy, e.g. joint-stereo, intensity-coding or matrixing
- G10L 2021/02082: {the noise being echo, reverberation of the speech}
- G10L 2021/02165: {Two microphones, one receiving mainly the noise signal and the other one mainly the speech signal}
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING

## Abstract

Systems, methods, and computer program products for frequency-domain estimation of latency between audio signals. In some embodiments, the estimation is performed on first blocks of data indicative of samples of a first audio signal and second blocks of data indicative of samples of a second audio signal, and includes determining a coarse latency estimate, including by determining gains which, when applied to some of the second blocks, determine estimates of one of the first blocks, and identifying one of the estimates as having a best spectral match to said one of the first blocks. A refined latency estimate is determined from the coarse estimate and some of the gains. Optionally, at least one metric indicative of confidence in the refined latency estimate is generated. Audio processing (e.g., echo cancellation) may be performed on the frequency-domain data, including by performing time alignment based on the refined latency estimate.

## Claims

### Claim 1

A method of processing audio data to estimate latency between a first audio signal and a second audio signal, comprising:
(a) providing a first sequence of blocks, M(t,k), of frequency-domain data indicative of audio samples of the first audio signal and a second sequence of blocks, P(t,k), of frequency-domain data indicative of audio samples of the second audio signal, where t is an index denoting a time of each of the blocks, and k is an index denoting frequency bin, and for each block P(t,k) of the second sequence, where t is an index denoting the time of said each block, providing delayed blocks, P(t,b,k), where b is an index denoting block delay time, where each value of index b is an integer number of block delay times by which a corresponding one of the delayed blocks is delayed relative to the time t;
(b) for each block, M(t,k), determining a coarse estimate, bbest(t), of the latency at time t, including by determining gains which, when applied to each of the delayed blocks, P(t,b,k), determine estimates, Mest(t,b,k), of the block M(t,k), and identifying one of the estimates, Mest(t,b,k), as having a best spectral match to said block, M(t,k), where the coarse estimate, bbest(t), has accuracy on the order of one of the block delay times; and
(c) determining a refined estimate, R(t), of the latency at time t, from the coarse estimate, bbest(t), and some of the gains, where the refined estimate, R(t), has accuracy on the order of an audio sample time.

### Claim 2 (depends on 1)

The method of claim 1, wherein gains H(t,b,k) are the gains for each of the delayed blocks, P(t,b,k), wherein step (b) includes determining a heuristic unreliability factor, U(t,b,k), on a per frequency bin basis for each of the delayed blocks, P(t,b,k), and wherein each said unreliability factor, U(t,b,k), is determined from sets of statistical values, said sets including: mean values, Hm(t,b,k), determined from the gains H(t,b,k) by averaging over two times; and variance values Hv(t,b,k), determined from the gains H(t,b,k) and the mean values Hm(t,b,k) by averaging over the two times.

### Claim 3 (depends on 1)

The method of claim 1, wherein step (b) includes determining goodness factors, Q(t,b), for the estimates Mest(t,b,k) for the time t and each value of index b, and determining the coarse estimate, bbest(t), includes selecting one of the goodness factors, Q(t,b).

### Claim 4 (depends on 1)

The method of claim 1, also including:
(d) applying thresholding tests to determine whether a candidate refined estimate of the latency should be used to update a previously determined refined estimate R(t) of the latency; and
(e) using the candidate refined estimate to update the previously determined refined estimate R(t) of the latency only if the thresholding tests determine that thresholding conditions are met.

### Claim 5 (depends on 4)

The method of claim 4, wherein step (d) includes determining whether a set of smoothed gains Hs(t, bbest(t), k), for the coarse estimate, bbest(t), should be considered as a candidate set of gains for determining an updated refined estimate of the latency.

### Claim 6 (depends on 4)

The method of claim 4, wherein refined estimates R(t) of the latency are determined for a sequence of times t, from the sets of gains Hs(t,bbest(t),k) which meet the thresholding conditions, and step (e) includes identifying a median of a set of X values as the refined estimate R(t) of latency, where X is an integer, and the X values include the most recently determined candidate refined estimate and a set of X−1 previously determined refined estimates of the latency.

### Claim 7 (depends on 4)

The method of claim 4, also including determining a fourth best coarse estimate, b4thbest(t), of the latency at time t, and wherein:
step (b) includes determining goodness factors, Q(t,b), for the estimates Mest(t,b,k) for the time t and each value of index b, and determining the coarse estimate, bbest(t), includes selecting one of the goodness factors, Q(t,b), and
step (d) includes applying the thresholding tests to the goodness factor Q(t,bbest) for the coarse estimate bbest(t), the goodness factor Q(t,b4thbest) for the fourth best coarse estimate, b4thbest(t), and the estimates Mest(t,bbest,k) for the coarse estimate, bbest(t).

### Claim 8 (depends on 1)

The method of claim 1, also including:
generating at least one confidence metric indicative of confidence in the accuracy of the refined estimate, R(t), of the latency.

### Claim 9 (depends on 8)

The method of claim 8, wherein the at least one confidence metric includes at least one or more heuristic confidence metric.

### Claim 10 (depends on 1)

The method of claim 1, also including:
processing at least some of the frequency-domain data indicative of audio samples of the first audio signal and the frequency-domain data indicative of audio samples of the second audio signal, including by performing time alignment based on the refined estimate, R(t), of the latency.

### Claim 11 (depends on 1)

The method of claim 1, wherein the first audio signal is a microphone output signal, and the second audio signal is originated from a speaker tap.

### Claim 12 (depends on 1)

A non-transitory computer-readable medium storing instructions that, when executed by at least one processor, cause the at least one processor to perform the method of claim 1.

### Claim 13

A system for estimating latency between a first audio signal and a second audio signal, comprising:
at least one processor, coupled and configured to receive or generate a first sequence of blocks, M(t,k), of frequency-domain data indicative of audio samples of the first audio signal and a second sequence of blocks, P(t,k), of frequency-domain data indicative of audio samples of the second audio signal, where t is an index denoting a time of each of the blocks, and k is an index denoting frequency bin, and for each block P(t,k) of the second sequence, where t is an index denoting the time of said each block, providing delayed blocks, P(t,b,k), where b is an index denoting block delay time, where each value of index b is an integer number of block delay times by which a corresponding one of the delayed blocks is delayed relative to the time t, wherein the at least one processor is configured:
for each block, M(t,k), to determine a coarse estimate, bbest(t), of the latency at time t, including by determining gains which, when applied to each of the delayed blocks, P(t,b,k), determine estimates, Mest(t,b,k), of the block M(t,k), and identifying one of the estimates, Mest(t,b,k), as having a best spectral match to said block, M(t,k), where the coarse estimate, bbest(t), has accuracy on the order of one of the block delay times; and
to determine a refined estimate, R(t), of the latency at time t, from the coarse estimate, bbest(t), and some of the gains, where the refined estimate, R(t), has accuracy on the order of an audio sample time.

### Claim 14 (depends on 13)

The system of claim 13, wherein gains H(t,b,k) are the gains for each of the delayed blocks, P(t,b,k), and wherein the at least one processor is configured to:
determine the coarse estimate, bbest(t), including by determining a heuristic unreliability factor, U(t,b,k), on a per frequency bin basis for each of the delayed blocks, P(t,b,k), where each said unreliability factor, U(t,b,k), is determined from sets of statistical values, said sets including: mean values, Hm(t,b,k), determined from the gains H(t,b,k) by averaging over two times; and variance values Hv(t,b,k), determined from the gains H(t,b,k) and the mean values Hm(t,b,k) by averaging over the two times.

### Claim 15 (depends on 13)

The system of claim 13, wherein the at least one processor is configured to determine the coarse estimate, bbest(t), including by determining goodness factors, Q(t,b), for the estimates Mest(t,b,k) for the time t and each value of index b, and wherein determining the coarse estimate, bbest(t), includes selecting one of the goodness factors, Q(t,b).

### Claim 16 (depends on 13)

The system of claim 13, wherein the at least one processor is configured to:
apply thresholding tests to determine whether a candidate refined estimate of the latency should be used to update a previously determined refined estimate R(t) of the latency; and
use the candidate refined estimate to update the previously determined refined estimate R(t) of the latency only if the thresholding tests determine that thresholding conditions are met.

### Claim 17 (depends on 16)

The system of claim 16, wherein the at least one processor is configured to apply the thresholding tests including by determining whether a set of smoothed gains Hs(t, bbest(t), k), for the coarse estimate, bbest(t), should be considered as a candidate set of gains for determining an updated refined estimate of the latency.

### Claim 18 (depends on 16)

The system of claim 16, wherein the at least one processor is configured to determine refined estimates R(t) of the latency for a sequence of times t, from the sets of gains Hs(t, bbest(t),k) which meet the thresholding conditions, and to use the candidate refined estimate to update the previously determined refined estimate R(t) of the latency including by identifying a median of a set of X values as a new refined estimate R(t) of latency, where X is an integer, and the X values include the most recently determined candidate refined estimate and a set of X−1 previously determined refined estimates of the latency.

### Claim 19 (depends on 16)

The system of claim 16, wherein the at least one processor is configured to:
determine a fourth best coarse estimate, b4thbest(t), of the latency at time t;
determine the coarse estimate, bbest(t), including by determining goodness factors, Q(t,b), for the estimates Mest(t,b,k) for the time t and each value of index b, and determining the coarse estimate, bbest(t), includes selecting one of the goodness factors, Q(t,b); and
apply the thresholding tests to the goodness factor Q(t,bbest) for the coarse estimate bbest(t), the goodness factor Q(t,b4thbest) for the fourth best coarse estimate, b4thbest(t), and the estimates Mest(t,bbest,k) for the coarse estimate, bbest(t).

### Claim 20 (depends on 13)

The system of claim 13, wherein the at least one processor is configured to:
generate at least one confidence metric indicative of confidence in the accuracy of the refined estimate, R(t), of the latency.

### Claim 21 (depends on 20)

The system of claim 20, wherein the at least one confidence metric includes at least one or more heuristic confidence metric.

### Claim 22 (depends on 13)

The system of claim 13, wherein the at least one processor is configured to:
process at least some of the frequency-domain data indicative of audio samples of the first audio signal and the frequency-domain data indicative of audio samples of the second audio signal, including by performing time alignment based on the refined estimate, R(t), of the latency.

### Claim 23 (depends on 13)

The system of claim 13, wherein the first audio signal is a microphone output signal, and the second audio signal is originated from a speaker tap.
