Skip to content

Commit 627579e

Browse files
committed
create new advanced control GUI
1 parent 06b7d54 commit 627579e

File tree

5 files changed

+685
-2
lines changed

5 files changed

+685
-2
lines changed

InferenceInterfaces/ToucanTTSInterface.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ def forward(self,
144144
input_is_phones=False,
145145
return_plot_as_filepath=False,
146146
loudness_in_db=-29.0,
147-
prosody_creativity=0.1):
147+
prosody_creativity=0.1,
148+
return_everything=False):
148149
"""
149150
duration_scaling_factor: reasonable values are 0.8 < scale < 1.2.
150151
1.0 means no scaling happens, higher values increase durations for the whole
@@ -233,6 +234,8 @@ def forward(self,
233234
plt.savefig("tmp.png")
234235
plt.close()
235236
return wave, sr, "tmp.png"
237+
if return_everything:
238+
return wave, mel, durations, pitch
236239
return wave, sr
237240

238241
def read_to_file(self,

Modules/ToucanTTS/InferenceToucanTTS.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def _forward(self,
242242
mask=text_masks.float(),
243243
n_timesteps=20,
244244
temperature=prosody_creativity,
245-
c=utterance_embedding)), min=0.0).long().squeeze(1) if gold_durations is None else gold_durations
245+
c=utterance_embedding)), min=0.0).long().squeeze(1) if gold_durations is None else gold_durations.squeeze(1)
246246

247247
# modifying the predictions with control parameters
248248
for phoneme_index, phoneme_vector in enumerate(text_tensors.squeeze(0)):

requirements.txt

70 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)