Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def process_text(i: int, text: str, device: torch.device):
|
|
57 |
x_lengths = torch.tensor([x.shape[-1]], dtype=torch.long, device=device)
|
58 |
x_phones = sequence_to_text(x.squeeze(0).tolist())
|
59 |
print(f"[{i}] - Phonetised text: {x_phones}")
|
60 |
-
return {"x_orig": text, "x": x, "x_lengths": x_lengths, "x_phones": x_phones}
|
61 |
|
62 |
def to_waveform(mel, vocoder, denoiser=None):
|
63 |
audio = vocoder(mel).clamp(-1, 1)
|
|
|
57 |
x_lengths = torch.tensor([x.shape[-1]], dtype=torch.long, device=device)
|
58 |
x_phones = sequence_to_text(x.squeeze(0).tolist())
|
59 |
print(f"[{i}] - Phonetised text: {x_phones}")
|
60 |
+
return {"x_orig": text, "x": x, "x_lengths": x_lengths, "x_phones": x_phones.replace('_q_ˌ_o_l_o_n_q_ˈ_ɑ_', '_q_ˌ_o_l_ˈ_o_n_q_ɑ_')}
|
61 |
|
62 |
def to_waveform(mel, vocoder, denoiser=None):
|
63 |
audio = vocoder(mel).clamp(-1, 1)
|