AkitoP commited on
Commit
599b984
1 Parent(s): 9df994f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import os
2
  import sys
 
3
  # to avoid the modified user.pth file
4
  cnhubert_base_path = "GPT_SoVITS/pretrained_models/chinese-hubert-base"
5
  bert_path = "GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large"
@@ -132,6 +133,7 @@ def get_spepc(hps, filename):
132
  return spec
133
 
134
  def create_tts_fn(vq_model, ssl_model, t2s_model, hps, config, hz, max_sec):
 
135
  def tts_fn(ref_wav_path, prompt_text, prompt_language, target_phone, text_language, target_text = None):
136
  t0 = ttime()
137
  prompt_text=prompt_text.strip()
 
1
  import os
2
  import sys
3
+ import spaces
4
  # to avoid the modified user.pth file
5
  cnhubert_base_path = "GPT_SoVITS/pretrained_models/chinese-hubert-base"
6
  bert_path = "GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large"
 
133
  return spec
134
 
135
  def create_tts_fn(vq_model, ssl_model, t2s_model, hps, config, hz, max_sec):
136
+ @spaces.GPU
137
  def tts_fn(ref_wav_path, prompt_text, prompt_language, target_phone, text_language, target_text = None):
138
  t0 = ttime()
139
  prompt_text=prompt_text.strip()