lalalic commited on
Commit
3516cfc
·
verified ·
1 Parent(s): 57cbb64

Update xtts.py

Browse files
Files changed (1) hide show
  1. xtts.py +8 -8
xtts.py CHANGED
@@ -12,11 +12,6 @@ import torch
12
  import torchaudio
13
 
14
  logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
15
- model_dir=os.environ.get("MODEL_DIR")
16
- model_path=model_dir
17
- config_path=f'{model_dir}/config.json'
18
- vocoder_config_path=f'{model_dir}/vocab.json'
19
-
20
  app = Flask(__name__)
21
  # def upload_bytes(bytes, ext=".wav"):
22
  # return bytes
@@ -40,12 +35,17 @@ default_sample=f'{os.path.dirname(os.path.abspath(__file__))}/sample.wav', f'{sa
40
  ffmpeg=f'{os.path.dirname(os.path.abspath(__file__))}/ffmpeg'
41
 
42
  if tts is None:
 
 
 
 
43
  model_name="tts_models/multilingual/multi-dataset/xtts_v2"
44
  logging.info(f"loading model {model_name} ...")
45
  tts = TTS(
46
- model_path=model_path,
47
- config_path=config_path,
48
- vocoder_config_path=vocoder_config_path,
 
49
  progress_bar=False
50
  )
51
  model=tts.synthesizer.tts_model
 
12
  import torchaudio
13
 
14
  logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
 
 
 
 
 
15
  app = Flask(__name__)
16
  # def upload_bytes(bytes, ext=".wav"):
17
  # return bytes
 
35
  ffmpeg=f'{os.path.dirname(os.path.abspath(__file__))}/ffmpeg'
36
 
37
  if tts is None:
38
+ # model_dir=os.environ.get("MODEL_DIR")
39
+ # model_path=model_dir
40
+ # config_path=f'{model_dir}/config.json'
41
+ # vocoder_config_path=f'{model_dir}/vocab.json'
42
  model_name="tts_models/multilingual/multi-dataset/xtts_v2"
43
  logging.info(f"loading model {model_name} ...")
44
  tts = TTS(
45
+ model_name
46
+ # model_path=model_path,
47
+ # config_path=config_path,
48
+ # vocoder_config_path=vocoder_config_path,
49
  progress_bar=False
50
  )
51
  model=tts.synthesizer.tts_model