update deps
Browse files- app.py +2 -3
- requirements.txt +3 -2
app.py
CHANGED
|
@@ -5,6 +5,7 @@ from khmer_phonemizer import phonemize_single
|
|
| 5 |
import utils
|
| 6 |
import commons
|
| 7 |
import torch
|
|
|
|
| 8 |
|
| 9 |
_pad = "_"
|
| 10 |
_punctuation = ". "
|
|
@@ -48,11 +49,9 @@ _ = net_g.eval()
|
|
| 48 |
_ = utils.load_checkpoint("G_22000.pth", net_g, None)
|
| 49 |
|
| 50 |
def generate_voice(text):
|
| 51 |
-
|
| 52 |
-
|
| 53 |
text = " ".join(phonemize_single(text) + ["."])
|
| 54 |
stn_tst = get_text(text, hps)
|
| 55 |
-
print(text)
|
| 56 |
with torch.no_grad():
|
| 57 |
x_tst = stn_tst.unsqueeze(0)
|
| 58 |
x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
|
|
|
|
| 5 |
import utils
|
| 6 |
import commons
|
| 7 |
import torch
|
| 8 |
+
import khmernormalizer
|
| 9 |
|
| 10 |
_pad = "_"
|
| 11 |
_punctuation = ". "
|
|
|
|
| 49 |
_ = utils.load_checkpoint("G_22000.pth", net_g, None)
|
| 50 |
|
| 51 |
def generate_voice(text):
|
| 52 |
+
text = khmernormalizer.normalize(text)
|
|
|
|
| 53 |
text = " ".join(phonemize_single(text) + ["."])
|
| 54 |
stn_tst = get_text(text, hps)
|
|
|
|
| 55 |
with torch.no_grad():
|
| 56 |
x_tst = stn_tst.unsqueeze(0)
|
| 57 |
x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
|
requirements.txt
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
-
numpy
|
| 2 |
librosa
|
| 3 |
scipy
|
| 4 |
torch
|
| 5 |
torchvision
|
| 6 |
Unidecode
|
| 7 |
gradio
|
| 8 |
-
khmernormalizer
|
|
|
|
|
|
| 1 |
+
numpy==1.25.2
|
| 2 |
librosa
|
| 3 |
scipy
|
| 4 |
torch
|
| 5 |
torchvision
|
| 6 |
Unidecode
|
| 7 |
gradio
|
| 8 |
+
khmernormalizer
|
| 9 |
+
monotonic-align
|