SWivid commited on
Commit
68d590f
·
1 Parent(s): 4e95a39

fine-grained speed control for infer-cli. #1112

Browse files
Files changed (1) hide show
  1. src/f5_tts/infer/infer_cli.py +2 -1
src/f5_tts/infer/infer_cli.py CHANGED
@@ -333,6 +333,7 @@ def main():
333
  text = re.sub(reg2, "", text)
334
  ref_audio_ = voices[voice]["ref_audio"]
335
  ref_text_ = voices[voice]["ref_text"]
 
336
  gen_text_ = text.strip()
337
  print(f"Voice: {voice}")
338
  audio_segment, final_sample_rate, spectrogram = infer_process(
@@ -347,7 +348,7 @@ def main():
347
  nfe_step=nfe_step,
348
  cfg_strength=cfg_strength,
349
  sway_sampling_coef=sway_sampling_coef,
350
- speed=speed,
351
  fix_duration=fix_duration,
352
  device=device,
353
  )
 
333
  text = re.sub(reg2, "", text)
334
  ref_audio_ = voices[voice]["ref_audio"]
335
  ref_text_ = voices[voice]["ref_text"]
336
+ local_speed = voices[voice].get("speed", speed)
337
  gen_text_ = text.strip()
338
  print(f"Voice: {voice}")
339
  audio_segment, final_sample_rate, spectrogram = infer_process(
 
348
  nfe_step=nfe_step,
349
  cfg_strength=cfg_strength,
350
  sway_sampling_coef=sway_sampling_coef,
351
+ speed=local_speed,
352
  fix_duration=fix_duration,
353
  device=device,
354
  )