espnet2.asvspoof.espnet_model.ESPnetASVSpoofModel
espnet2.asvspoof.espnet_model.ESPnetASVSpoofModel
class espnet2.asvspoof.espnet_model.ESPnetASVSpoofModel(frontend: AbsFrontend | None, specaug: AbsSpecAug | None, normalize: AbsNormalize | None, encoder: AbsEncoder, preencoder: AbsPreEncoder | None, decoder: AbsDecoder, losses: Dict[str, AbsASVSpoofLoss])
Bases: AbsESPnetModel
ASV Spoofing model
A simple ASV Spoofing model
Initializes internal Module state, shared by both nn.Module and ScriptModule.
collect_feats(speech: Tensor, speech_lengths: Tensor, **kwargs) → Dict[str, Tensor]
encode(speech: Tensor, speech_lengths: Tensor) → Tuple[Tensor, Tensor]
Frontend + Encoder
- Parameters:
- speech – (Batch, Length, …)
- speech_lengths – (Batch,)
- bottleneck_feats – (Batch, Length, …): used for enh + diar
forward(speech: Tensor, speech_lengths: Tensor | None = None, label: Tensor | None = None, **kwargs) → Tuple[Tensor, Dict[str, Tensor], Tensor]
Frontend + Encoder + Decoder + Calc loss
- Parameters:
- speech – (Batch, samples)
- spk_labels – (Batch, )
- kwargs – “utt_id” is among the input.