tts_decoding
Author: Heli Qi Affiliation: NAIST Date: 2022.09
auto_regression(enc_text, enc_text_mask, reduction_factor, decode_one_step, feat_dim, spk_ids=None, spk_feat=None, stop_threshold=0.5, maxlen_ratio=10.0, continual_steps=0, use_before=False)
Auto-regressive acoustic feature generation using a transformer-based TTS model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enc_text
|
Tensor
|
Encoded text tensor. |
required |
enc_text_mask
|
Tensor
|
Mask for encoded text tensor. |
required |
reduction_factor
|
int
|
Reduction factor for acoustic features. |
required |
decode_one_step
|
callable
|
Function for decoding one step of the model. |
required |
feat_dim
|
int
|
Dimensionality of acoustic features. |
required |
spk_ids
|
Tensor
|
Speaker ID tensor. |
None
|
spk_feat
|
Tensor
|
Speaker feature tensor. |
None
|
stop_threshold
|
float
|
Threshold for stop token prediction. |
0.5
|
maxlen_ratio
|
float
|
Maximum length ratio for generated features. |
10.0
|
continual_steps
|
int
|
Number of steps to continue generation after stop token is predicted. |
0
|
use_before
|
bool
|
Whether to use the decoder's "before" features for generation. |
False
|
Returns:
Name | Type | Description |
---|---|---|
dict |
Dictionary containing synthetic acoustic features, their lengths, and the ratio of feature lengths to |
|
input text lengths. |
Source code in speechain/infer_func/tts_decoding.py
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|