ramkamal2000 commited on
Commit
02f4ff2
1 Parent(s): 5f22cc2
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -47,11 +47,11 @@ sys.path.append(TTS_PATH) # set this if TTS is not installed globally
47
  OUT_PATH = 'out/'
48
  os.makedirs(OUT_PATH, exist_ok=True)
49
 
50
- TTS_SPEAKERS = "yourTTS_config/speakers.json"
51
  USE_CUDA = torch.cuda.is_available()
52
  device = torch.device("cuda" if USE_CUDA else "cpu")
53
 
54
- CONFIG_PATH = 'yourTTS_config/config.json'
55
  C = load_config(CONFIG_PATH)
56
  ap = AudioProcessor(**C.audio)
57
 
@@ -61,13 +61,13 @@ C.model_args['use_speaker_encoder_as_loss'] = False
61
 
62
  model = setup_model(C)
63
 
64
- TTS_LANGUAGES = "yourTTS_config/language_ids.json"
65
  model.language_manager.set_language_ids_from_file(TTS_LANGUAGES)
66
 
67
  # print(model.language_manager.num_languages, model.embedded_language_dim)
68
  # print(model.emb_l)
69
 
70
- MODEL_PATH = 'yourTTS_config/best_model.pth.tar'
71
  cp = torch.load(MODEL_PATH, map_location=torch.device('cpu'))
72
 
73
  model_weights = cp['model'].copy()
 
47
  OUT_PATH = 'out/'
48
  os.makedirs(OUT_PATH, exist_ok=True)
49
 
50
+ TTS_SPEAKERS = "yourtts_config/speakers.json"
51
  USE_CUDA = torch.cuda.is_available()
52
  device = torch.device("cuda" if USE_CUDA else "cpu")
53
 
54
+ CONFIG_PATH = 'yourtts_config/config.json'
55
  C = load_config(CONFIG_PATH)
56
  ap = AudioProcessor(**C.audio)
57
 
 
61
 
62
  model = setup_model(C)
63
 
64
+ TTS_LANGUAGES = "yourtts_config/language_ids.json"
65
  model.language_manager.set_language_ids_from_file(TTS_LANGUAGES)
66
 
67
  # print(model.language_manager.num_languages, model.embedded_language_dim)
68
  # print(model.emb_l)
69
 
70
+ MODEL_PATH = 'yourtts_config/best_model.pth.tar'
71
  cp = torch.load(MODEL_PATH, map_location=torch.device('cpu'))
72
 
73
  model_weights = cp['model'].copy()