Traced Generator
TracedGenerator
Bases: Module
Source code in models/vocoder/univnet/traced_generator.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
__init__(generator)
A traced version of the UnivNet class that can be used for faster inference.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
generator |
UnivNet
|
The UnivNet instance to trace. |
required |
Source code in models/vocoder/univnet/traced_generator.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
forward(c, mel_lens)
Forward pass of the traced UnivNet.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
c |
Tensor
|
The input mel-spectrogram tensor. |
required |
mel_lens |
Tensor
|
The lengths of the input mel-spectrograms. |
required |
Returns:
Type | Description |
---|---|
Tensor
|
torch.Tensor: The generated audio tensor. |
Source code in models/vocoder/univnet/traced_generator.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|