mrfakename commited on
Commit
f575abd
1 Parent(s): 35005eb

Sync from GitHub repo

Browse files

This Space is synced from the GitHub repo: https://github.com/SWivid/F5-TTS. Please submit contributions to the Space there

Files changed (1) hide show
  1. model/utils_infer.py +2 -1
model/utils_infer.py CHANGED
@@ -154,7 +154,8 @@ def load_model(model_cls, model_cfg, ckpt_path, vocab_file="", ode_method=ode_me
154
 
155
 
156
  def preprocess_ref_audio_text(ref_audio_orig, ref_text, show_info=print, device=None):
157
- device = get_device(device)
 
158
 
159
  show_info("Converting audio...")
160
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f:
 
154
 
155
 
156
  def preprocess_ref_audio_text(ref_audio_orig, ref_text, show_info=print, device=None):
157
+ if device is None:
158
+ device = get_device()
159
 
160
  show_info("Converting audio...")
161
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f: