class_docstr: Multiple Signal Classification (MUSIC) localization.
  
  Arguments
  ---------
  mics : tensor
      The cartesian coordinates (xyz) in meters of each microphone.
      The tensor must have the following format (n_mics, 3).
  space : string
      If this parameter is set to 'sphere', the localization will
      be done in 3D by searching in a sphere of possible doas. If
      it set to 'circle', the search will be done in 2D by searching
      in a circle. By default, this parameter is set to 'sphere'.
      Note: The 'circle' option isn't implemented yet.
  sample_rate : int
      The sample rate in Hertz of the signals to perform SRP-PHAT on.
      By default, this parameter is set to 16000 Hz.
  speed_sound : float
      The speed of sound in the medium. The speed is expressed in meters
      per second and the default value of this parameter is 343 m/s.
  eps : float
      A small value to avoid errors like division by 0. The default value
      of this parameter is 1e-20.
  n_sig : int
      An estimation of the number of sound sources. The default value is set
      to one source.
  
  Example
  -------
  >>> import torch
  
  >>> from speechbrain.dataio.dataio import read_audio
  >>> from speechbrain.processing.features import STFT
  >>> from speechbrain.processing.multi_mic import Covariance
  >>> from speechbrain.processing.multi_mic import SrpPhat
  
  >>> xs_speech = read_audio('tests/samples/multi-mic/speech_-0.82918_0.55279_-0.082918.flac')
  >>> xs_noise = read_audio('tests/samples/multi-mic/noise_diffuse.flac')
  >>> fs = 16000
  
  >>> xs_speech = xs_speech.unsqueeze(0) # [batch, time, channels]
  >>> xs_noise = xs_noise.unsqueeze(0)
  
  >>> ss1 = xs_speech
  >>> ns1 = 0.05 * xs_noise
  >>> xs1 = ss1 + ns1
  
  >>> ss2 = xs_speech
  >>> ns2 = 0.20 * xs_noise
  >>> xs2 = ss2 + ns2
  
  >>> ss = torch.cat((ss1,ss2), dim=0)
  >>> ns = torch.cat((ns1,ns2), dim=0)
  >>> xs = torch.cat((xs1,xs2), dim=0)
  
  >>> mics = torch.zeros((4,3), dtype=torch.float)
  >>> mics[0,:] = torch.FloatTensor([-0.05, -0.05, +0.00])
  >>> mics[1,:] = torch.FloatTensor([-0.05, +0.05, +0.00])
  >>> mics[2,:] = torch.FloatTensor([+0.05, +0.05, +0.00])
  >>> mics[3,:] = torch.FloatTensor([+0.05, +0.05, +0.00])
  
  >>> stft = STFT(sample_rate=fs)
  >>> cov = Covariance()
  >>> music = Music(mics=mics)
  
  >>> Xs = stft(xs)
  >>> XXs = cov(Xs)
  >>> doas = music(XXs)
class_docstr_tok: ["Multiple","Signal","Classification","(","MUSIC",")","localization",".","Arguments","--","--","--","--","-","mics",":","tensor","The","cartesian","coordinates","(","xyz",")","in","meters","of","each","microphone",".","The","tensor","must","have","the","following","format","(","n_mics",",","3",")",".","space",":","string","If","this","parameter","is","set","to","'sphere","'",",","the","localization","will","be","done","in","3D","by","searching","in","a","sphere","of","possible","doas",".","If","it","set","to","'circle","'",",","the","search","will","be","done","in","2D","by","searching","in","a","circle",".","By","default",",","this","parameter","is","set","to","'sphere","'",".","Note",":","The","'circle","'","option","is","n't","implemented","yet",".","sample_rate",":","int","The","sample","rate","in","Hertz","of","the","signals","to","perform","SRP-PHAT","on",".","By","default",",","this","parameter","is","set","to","16000","Hz",".","speed_sound",":","float","The","speed","of","sound","in","the","medium",".","The","speed","is","expressed","in","meters","per","second","and","the","default","value","of","this","parameter","is","343","m\/s",".","eps",":","float","A","small","value","to","avoid","errors","like","division","by","0",".","The","default","value","of","this","parameter","is","1e-20",".","n_sig",":","int","An","estimation","of","the","number","of","sound","sources",".","The","default","value","is","set","to","one","source",".","Example","--","--","--","-",">",">",">","import","torch",">",">",">","from","speechbrain.dataio.dataio","import","read_audio",">",">",">","from","speechbrain.processing.features","import","STFT",">",">",">","from","speechbrain.processing.multi_mic","import","Covariance",">",">",">","from","speechbrain.processing.multi_mic","import","SrpPhat",">",">",">","xs_speech","=","read_audio","(","'tests\/samples\/multi-mic\/speech_-0.82918_0.55279_-0.082918.flac","'",")",">",">",">","xs_noise","=","read_audio","(","'tests\/samples\/multi-mic\/noise_diffuse.flac","'",")",">",">",">","fs","=","16000",">",">",">","xs_speech","=","xs_speech.unsqueeze","(","0",")","#","[","batch",",","time",",","channels","]",">",">",">","xs_noise","=","xs_noise.unsqueeze","(","0",")",">",">",">","ss1","=","xs_speech",">",">",">","ns1","=","0.05","*","xs_noise",">",">",">","xs1","=","ss1","+","ns1",">",">",">","ss2","=","xs_speech",">",">",">","ns2","=","0.20","*","xs_noise",">",">",">","xs2","=","ss2","+","ns2",">",">",">","ss","=","torch.cat","(","(","ss1",",","ss2",")",",","dim=0",")",">",">",">","ns","=","torch.cat","(","(","ns1",",","ns2",")",",","dim=0",")",">",">",">","xs","=","torch.cat","(","(","xs1",",","xs2",")",",","dim=0",")",">",">",">","mics","=","torch.zeros","(","(","4,3",")",",","dtype=torch.float",")",">",">",">","mics","[","0",",",":","]","=","torch.FloatTensor","(","[","-0.05",",","-0.05",",","+0.00","]",")",">",">",">","mics","[","1",",",":","]","=","torch.FloatTensor","(","[","-0.05",",","+0.05",",","+0.00","]",")",">",">",">","mics","[","2",",",":","]","=","torch.FloatTensor","(","[","+0.05",",","+0.05",",","+0.00","]",")",">",">",">","mics","[","3",",",":","]","=","torch.FloatTensor","(","[","+0.05",",","+0.05",",","+0.00","]",")",">",">",">","stft","=","STFT","(","sample_rate=fs",")",">",">",">","cov","=","Covariance","(",")",">",">",">","music","=","Music","(","mics=mics",")",">",">",">","Xs","=","stft","(","xs",")",">",">",">","XXs","=","cov","(","Xs",")",">",">",">","doas","=","music","(","XXs",")"]
code: def __init__(
      self,
      mics,
      space="sphere",
      sample_rate=16000,
      speed_sound=343.0,
      eps=1e-20,
      n_sig=1,
  ):
      super().__init__()
  
      # Generate the doas
      if space == "sphere":
          self.doas = sphere()
  
      if space == "circle":
          pass
  
      # Generate associated taus with the doas
      self.taus = doas2taus(
          self.doas, mics=mics, fs=sample_rate, c=speed_sound
      )
  
      # Save epsilon
      self.eps = eps
  
      # Save number of signals
      self.n_sig = n_sig
  
imports: import torch
  from packaging import version
  import speechbrain.processing.decomposition
label_desc: Use image node_id 1 to create a new Music object from inherited base classes: torch.nn with example: obj = Music(mics, space, sample_rate, speed_sound, eps, n_sig)