Gregniuki commited on
Commit
badcdde
·
verified ·
1 Parent(s): 219a16f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -73,7 +73,7 @@ vocos = load_vocoder()
73
 
74
  target_sample_rate = 24000
75
  n_mel_channels = 100
76
- hop_length = 256
77
  target_rms = 0.1
78
  nfe_step = 16 # 16, 32
79
  cfg_strength = 2.0
@@ -243,7 +243,7 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence,
243
  final_text_list = convert_char_to_pinyin(text_list)
244
 
245
  # Calculate reference audio length
246
- ref_audio_len = audio.shape[-1] + 8 // hop_length
247
 
248
  if fix_duration is not None:
249
  duration = int(fix_duration * target_sample_rate / hop_length)
 
73
 
74
  target_sample_rate = 24000
75
  n_mel_channels = 100
76
+ hop_length = 256 - 8
77
  target_rms = 0.1
78
  nfe_step = 16 # 16, 32
79
  cfg_strength = 2.0
 
243
  final_text_list = convert_char_to_pinyin(text_list)
244
 
245
  # Calculate reference audio length
246
+ ref_audio_len = audio.shape[-1] // hop_length
247
 
248
  if fix_duration is not None:
249
  duration = int(fix_duration * target_sample_rate / hop_length)