Adding the possibility of get durations out of pretrained model

This commit is contained in:
Shivam Mehta
2024-05-24 11:34:51 +02:00
parent fb7b954de5
commit 4b39f6cad0
13 changed files with 274 additions and 24 deletions

View File

@@ -48,7 +48,7 @@ def plot_spectrogram_to_numpy(spectrogram, filename):
def process_text(i: int, text: str, device: torch.device):
print(f"[{i}] - Input text: {text}")
x = torch.tensor(
intersperse(text_to_sequence(text, ["english_cleaners2"]), 0),
intersperse(text_to_sequence(text, ["english_cleaners2"])[0], 0),
dtype=torch.long,
device=device,
)[None]