(self)
Convert utt2spk to spk2utt.
Convert utt2spk to spk2utt.
Convert utt2spk to spk2utt .
def collect_spks_from_utts(self):
    ''' Convert utt2spk to spk2utt. '''
    for utt_key, utt in self.utts.items():
      if self.spks[utt.spk].utts is None:
        self.spks[utt.spk].utts = []
      self.spks[utt.spk].utts.append(utt_key)
    for spk_idx, spk in enumerate(sorted(self.spks.keys())):
      self.spks[spk].id = spk_idx
      self.spks[spk].numutt = len(self.spks[spk].utts)
def collect_spks_from_utts ( self ) : for utt_key , utt in self . utts . items ( ) : if self . spks [ utt . spk ] . utts is None : self . spks [ utt . spk ] . utts = [ ] self . spks [ utt . spk ] . utts . append ( utt_key ) for spk_idx , spk in enumerate ( sorted ( self . spks . keys ( ) ) ) : self . spks [ spk ] . id = spk_idx self . spks [ spk ] . numutt = len ( self . spks [ spk ] . utts )