class_docstr: Generalized Cross-Correlation with Phase Transform localization.
  
  Arguments
  ---------
  tdoa_max : int
      Specifies a range to search for delays. For example, if
      tdoa_max = 10, the method will restrict its search for delays
      between -10 and 10 samples. This parameter is optional and its
      default value is None. When tdoa_max is None, the method will
      search for delays between -n_fft/2 and n_fft/2 (full range).
  eps : float
      A small value to avoid divisions by 0 with the phase transformation.
      The default value is 1e-20.
  
  Example
  -------
  >>> import torch
  
  >>> from speechbrain.dataio.dataio import read_audio
  >>> from speechbrain.processing.features import STFT, ISTFT
  >>> from speechbrain.processing.multi_mic import Covariance
  >>> from speechbrain.processing.multi_mic import GccPhat, DelaySum
  >>>
  >>> xs_speech = read_audio(
  ...    'tests/samples/multi-mic/speech_-0.82918_0.55279_-0.082918.flac'
  ... )
  >>> xs_speech = xs_speech.unsqueeze(0) # [batch, time, channel]
  >>> xs_noise  = read_audio('tests/samples/multi-mic/noise_diffuse.flac')
  >>> xs_noise = xs_noise.unsqueeze(0) #[batch, time, channels]
  >>> fs = 16000
  >>> xs = xs_speech + 0.05 * xs_noise
  >>>
  >>> stft = STFT(sample_rate=fs)
  >>> cov = Covariance()
  >>> gccphat = GccPhat()
  >>> Xs = stft(xs)
  >>> XXs = cov(Xs)
  >>> tdoas = gccphat(XXs)
class_docstr_tok: ["Generalized","Cross-Correlation","with","Phase","Transform","localization",".","Arguments","--","--","--","--","-","tdoa_max",":","int","Specifies","a","range","to","search","for","delays",".","For","example",",","if","tdoa_max","=","10",",","the","method","will","restrict","its","search","for","delays","between","-10","and","10","samples",".","This","parameter","is","optional","and","its","default","value","is","None",".","When","tdoa_max","is","None",",","the","method","will","search","for","delays","between","-n_fft\/2","and","n_fft\/2","(","full","range",")",".","eps",":","float","A","small","value","to","avoid","divisions","by","0","with","the","phase","transformation",".","The","default","value","is","1e-20",".","Example","--","--","--","-",">",">",">","import","torch",">",">",">","from","speechbrain.dataio.dataio","import","read_audio",">",">",">","from","speechbrain.processing.features","import","STFT",",","ISTFT",">",">",">","from","speechbrain.processing.multi_mic","import","Covariance",">",">",">","from","speechbrain.processing.multi_mic","import","GccPhat",",","DelaySum",">",">",">",">",">",">","xs_speech","=","read_audio","(","...","'tests\/samples\/multi-mic\/speech_-0.82918_0.55279_-0.082918.flac'","...",")",">",">",">","xs_speech","=","xs_speech.unsqueeze","(","0",")","#","[","batch",",","time",",","channel","]",">",">",">","xs_noise","=","read_audio","(","'tests\/samples\/multi-mic\/noise_diffuse.flac","'",")",">",">",">","xs_noise","=","xs_noise.unsqueeze","(","0",")","#","[","batch",",","time",",","channels","]",">",">",">","fs","=","16000",">",">",">","xs","=","xs_speech","+","0.05","*","xs_noise",">",">",">",">",">",">","stft","=","STFT","(","sample_rate=fs",")",">",">",">","cov","=","Covariance","(",")",">",">",">","gccphat","=","GccPhat","(",")",">",">",">","Xs","=","stft","(","xs",")",">",">",">","XXs","=","cov","(","Xs",")",">",">",">","tdoas","=","gccphat","(","XXs",")"]
docstr: Perform quadratic interpolation on the cross-correlation to
  improve the tdoa accuracy. The result has the format:
  (batch, time_steps, n_mics + n_pairs)
  
  Arguments
  ---------
  xxs : tensor
      The correlation signals obtained after a gcc-phat operation. The tensor
      must have the format (batch, time_steps, n_fft, n_mics + n_pairs).
  delays : tensor
      The rounded tdoas obtained by selecting the sample with the highest
      amplitude. The tensor must have the format
      (batch, time_steps, n_mics + n_pairs).
code: def _interpolate(xxs, delays):
      """Perform quadratic interpolation on the cross-correlation to
      improve the tdoa accuracy. The result has the format:
      (batch, time_steps, n_mics + n_pairs)
  
      Arguments
      ---------
      xxs : tensor
          The correlation signals obtained after a gcc-phat operation. The tensor
          must have the format (batch, time_steps, n_fft, n_mics + n_pairs).
      delays : tensor
          The rounded tdoas obtained by selecting the sample with the highest
          amplitude. The tensor must have the format
          (batch, time_steps, n_mics + n_pairs).
      """
  
      # Get useful dimensions
      n_fft = xxs.shape[2]
  
      # Get the max amplitude and its neighbours
      tp = torch.fmod((delays - 1) + n_fft, n_fft).unsqueeze(2)
      y1 = torch.gather(xxs, 2, tp).squeeze(2)
      tp = torch.fmod(delays + n_fft, n_fft).unsqueeze(2)
      y2 = torch.gather(xxs, 2, tp).squeeze(2)
      tp = torch.fmod((delays + 1) + n_fft, n_fft).unsqueeze(2)
      y3 = torch.gather(xxs, 2, tp).squeeze(2)
  
      # Add a fractional part to the initially rounded delay
      delays_frac = delays + (y1 - y3) / (2 * y1 - 4 * y2 + 2 * y3)
  
      return delays_frac
  
imports: import torch
  from packaging import version
  import speechbrain.processing.decomposition
label_desc: Use image node_id 5 for calling the GccPhat obj's underlying member method code with example usage: obj._interpolate(xxs, delays) and returns: delays_frac