(num_spk, num_utt_per_spk)
return meta
Generate a dummy data.
Generate a dummy data.
Generate a dummy data .
def gen_dummy_meta(num_spk, num_utt_per_spk):
  ''' Generate a dummy data. '''
  meta = kaldi_dir.KaldiMetaData()
  for spk_idx in range(num_spk):
    for utt_idx in range(num_utt_per_spk):
      spk = str(spk_idx)
      utt = '%s_%d' % (spk, utt_idx)
      utt_meta = kaldi_dir.Utt()
      utt_meta.feat = 'foo/bar/feat/%s' % (utt)
      utt_meta.vad = 'foo/bar/vad/%s' % (utt)
      utt_meta.spk = spk
      meta.utts[utt] = utt_meta
  meta.collect_spks_from_utts()
  return meta
def gen_dummy_meta ( num_spk , num_utt_per_spk ) : meta = kaldi_dir . KaldiMetaData ( ) for spk_idx in range ( num_spk ) : for utt_idx in range ( num_utt_per_spk ) : spk = str ( spk_idx ) utt = '%s_%d' % ( spk , utt_idx ) utt_meta = kaldi_dir . Utt ( ) utt_meta . feat = 'foo/bar/feat/%s' % ( utt ) utt_meta . vad = 'foo/bar/vad/%s' % ( utt ) utt_meta . spk = spk meta . utts [ utt ] = utt_meta meta . collect_spks_from_utts ( ) return meta