Style Token Layer (STL)
STL
Bases: Module
Style Token Layer (STL). This layer helps to encapsulate different speaking styles in token embeddings.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_config |
AcousticModelConfigType
|
An object containing the model's configuration parameters. |
required |
Attributes:
Name | Type | Description |
---|---|---|
embed |
Parameter
|
The style token embedding tensor. |
attention |
StyleEmbedAttention
|
The attention module used to compute a weighted sum of embeddings. |
Source code in models/tts/delightful_tts/reference_encoder/STL.py
forward(x)
Forward pass of the Style Token Layer Args: x (torch.Tensor): The input tensor.
Returns torch.Tensor: The emotion embedded tensor after applying attention mechanism.