MCPcopy Create free account

hub / github.com/Xflick/EEND_PyTorch / functions

Functions45 in github.com/Xflick/EEND_PyTorch

↓ 3 callersFunctionload_wav
This function reads audio file and return data in numpy.float32 array. "lru_cache" holds recently loaded audio so that can be called
eend/kaldi_data.py:60
↓ 3 callersMethodload_wav
(self, recid, start=0, end=None)
eend/kaldi_data.py:160
↓ 2 callersMethod__init__
(self, optimizer, d_model, warmup_steps, last_epoch=-1)
eend/pytorch_backend/models.py:28
↓ 2 callersFunctionbatch_pit_loss
PIT loss over mini-batch. Args: ys: B-length list of predictions ts: B-length list of labels Returns: loss: (1,)-shap
eend/pytorch_backend/loss.py:49
↓ 2 callersMethodget_attention_weight
(self, src)
eend/pytorch_backend/models.py:123
↓ 1 callersFunction_count_frames
(data_len, size, shift)
eend/feature.py:162
↓ 1 callersFunction_count_frames
(data_len, size, step)
eend/pytorch_backend/diarization_dataset.py:13
↓ 1 callersFunction_gen_chunk_indices
(data_len, chunk_size)
eend/pytorch_backend/infer.py:20
↓ 1 callersFunction_gen_frame_indices
( data_length, size=2000, step=2000, use_last_samples=False, label_delay=0, su
eend/pytorch_backend/diarization_dataset.py:18
↓ 1 callersMethod_generate_square_subsequent_mask
(self, sz)
eend/pytorch_backend/models.py:77
↓ 1 callersFunctionaverage_model
(ifiles, ofile)
eend/bin/model_averaging.py:14
↓ 1 callersFunctioncalc_diarization_error
Calculates diarization error stats for reporting. Args: pred (torch.FloatTensor): (T,C)-shaped pre-activation values label (torc
eend/pytorch_backend/loss.py:70
↓ 1 callersMethodforward
(self, src, has_mask=False, activation=None)
eend/pytorch_backend/models.py:89
↓ 1 callersMethodget_lr
(self)
eend/pytorch_backend/models.py:40
↓ 1 callersFunctioninfer
(args)
eend/pytorch_backend/infer.py:29
↓ 1 callersMethodinit_weights
(self)
eend/pytorch_backend/models.py:82
↓ 1 callersFunctionload_reco2dur
returns dictionary { recid: duration }
eend/kaldi_data.py:100
↓ 1 callersFunctionload_segments_rechash
(segments_file)
eend/kaldi_data.py:41
↓ 1 callersFunctionload_spk2utt
returns dictionary { spkid: list of uttids }
eend/kaldi_data.py:92
↓ 1 callersFunctionload_utt2spk
returns dictionary { uttid: spkid }
eend/kaldi_data.py:86
↓ 1 callersFunctionload_wav_scp
return dictionary { rec: wav_rxfilename }
eend/kaldi_data.py:53
↓ 1 callersFunctionpit_loss
Permutation-invariant training (PIT) cross entropy loss function. Args: pred: (T,C)-shaped pre-activation values label: (T,C)-s
eend/pytorch_backend/loss.py:20
↓ 1 callersFunctionprint_var_assign_statements
Print variable assignment statements from yaml object. - { key: value } -> key=value - { parent: { child: value } } -> parent_child=v
eend/bin/yaml2bash.py:10
↓ 1 callersFunctionreport_diarization_error
Reports diarization errors Should be called with torch.no_grad Args: ys: B-length list of predictions (torch.FloatTensor) la
eend/pytorch_backend/loss.py:105
↓ 1 callersFunctionstft
Compute STFT features Args: data: audio signal (n_samples,)-shaped np.float32 array frame_size: number of samples in
eend/feature.py:134
↓ 1 callersFunctiontrain
Training model with pytorch backend. This function is called from eend/bin/train.py with parsed command-line arguments.
eend/pytorch_backend/train.py:20
Method__getitem__
(self, i)
eend/pytorch_backend/diarization_dataset.py:79
Method__init__
(self, data_dir)
eend/kaldi_data.py:147
Method__init__
Self-attention-based diarization model. Args: n_speakers (int): Number of speakers in recording in_size (int): Dimension
eend/pytorch_backend/models.py:47
Method__init__
(self, d_model, dropout=0.1, max_len=5000)
eend/pytorch_backend/models.py:162
Method__init__
( self, data_dir, chunk_size=2000, context_size=0,
eend/pytorch_backend/diarization_dataset.py:37
Method__len__
(self)
eend/pytorch_backend/diarization_dataset.py:76
Functionextract_segments
This function returns generator of segmented audio as (utterance id, numpy.float32 array) TODO?: sampling rate is not converted.
eend/kaldi_data.py:125
Methodforward
(self, x)
eend/pytorch_backend/models.py:174
Functionget_frame_labels
Get frame-aligned labels of given recording Args: kaldi_obj (KaldiData) rec (str): recording id start (int): start frame
eend/feature.py:170
Functionget_input_dim
( frame_size, context_size, transform_type, )
eend/feature.py:10
Functionget_labeledSTFT
Extracts STFT and corresponding labels Extracts STFT and corresponding diarization labels for given recording id and start/end times Ar
eend/feature.py:223
Methodhook
(module, input, output)
eend/pytorch_backend/models.py:126
Functionload_segments
load segments file as array
eend/kaldi_data.py:18
Functionload_segments_hash
(segments_file)
eend/kaldi_data.py:31
Functionmy_collate
(batch)
eend/pytorch_backend/diarization_dataset.py:31
Functionprocess_wav
This function returns preprocessed wav_rxfilename Args: wav_rxfilename: input process: command which can be connected via pipe,
eend/kaldi_data.py:108
Functionsplice
Frame splicing Args: Y: feature (n_frames, n_featdim)-shaped numpy array context_size: number of frames
eend/feature.py:109
Functionsubsample
Frame subsampling
eend/feature.py:101
Functiontransform
Transform STFT feature Args: Y: STFT (n_frames, n_bins)-shaped np.complex array transform_type: None, "l
eend/feature.py:24