stephenhoang commited on
Commit
6c39087
·
verified ·
1 Parent(s): 177e5d0

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +1 -20
inference.py CHANGED
@@ -293,26 +293,7 @@ class StyleTTS2(torch.nn.Module):
293
 
294
  tokens = [0] + tokens + [0]
295
  tokens = torch.LongTensor(tokens).unsqueeze(0).to(device)
296
- import yaml
297
-
298
- config_path = "./Models/config.yaml" # <-- đổi thành path config bạn đang dùng
299
-
300
- with open(config_path, "r", encoding="utf-8") as f:
301
- cfg = yaml.safe_load(f)
302
-
303
- symbols = (
304
- list(cfg['symbol']['pad']) +
305
- list(cfg['symbol']['punctuation']) +
306
- list(cfg['symbol']['letters']) +
307
- list(cfg['symbol']['letters_ipa']) +
308
- list(cfg['symbol']['extend'])
309
- )
310
-
311
- for i in range(20):
312
- print(i, repr(symbols[i]))
313
-
314
- print("Total:", len(symbols)+1)
315
-
316
 
317
 
318
  with torch.no_grad():
 
293
 
294
  tokens = [0] + tokens + [0]
295
  tokens = torch.LongTensor(tokens).unsqueeze(0).to(device)
296
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
 
298
 
299
  with torch.no_grad():