espnet2.spk.encoder.xvector_encoder.XvectorEncoder
espnet2.spk.encoder.xvector_encoder.XvectorEncoder
class espnet2.spk.encoder.xvector_encoder.XvectorEncoder(input_size: int, ndim: int = 512, output_size: int = 1500, kernel_sizes: List = [5, 3, 3, 1, 1], paddings: List = [2, 1, 1, 0, 0], dilations: List = [1, 2, 3, 1, 1], **kwargs)
Bases: AbsEncoder
X-vector encoder. Extracts frame-level x-vector embeddings from features.
Paper: D. Snyder et al., “X-vectors: Robust dnn embeddings for speaker recognition,” in Proc. IEEE ICASSP, 2018.
- Parameters:
- input_size – input feature dimension.
- ndim – dimensionality of the hidden representation.
- output_size – ouptut embedding dimension.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(x)
Defines the computation performed at every call.
Should be overridden by all subclasses.
NOTE
Although the recipe for forward pass needs to be defined within this function, one should call the Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
output_size() → int