dwb2023 commited on
Commit
e834779
1 Parent(s): 410704d

config path

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -24,10 +24,11 @@ def download_model(repo_id):
24
 
25
  # Download the model
26
  model_dir = download_model(repo_id="Borcherding/XTTS-v2_C3PO")
 
27
 
28
  # Initialize TTS
29
  try:
30
- tts = TTS(model_path=model_dir, progress_bar=False).to(device)
31
  logging.info("TTS model initialized successfully")
32
  except Exception as e:
33
  logging.error(f"Error initializing TTS model: {str(e)}", exc_info=True)
 
24
 
25
  # Download the model
26
  model_dir = download_model(repo_id="Borcherding/XTTS-v2_C3PO")
27
+ config_path = os.path.join(model_dir, "config.json")
28
 
29
  # Initialize TTS
30
  try:
31
+ tts = TTS(model_path=model_dir, config_path=config_path, progress_bar=False).to(device)
32
  logging.info("TTS model initialized successfully")
33
  except Exception as e:
34
  logging.error(f"Error initializing TTS model: {str(e)}", exc_info=True)