fcyai commited on
Commit
47d7832
1 Parent(s): dacf536
Files changed (1) hide show
  1. tts_model.py +3 -2
tts_model.py CHANGED
@@ -79,7 +79,7 @@ def generate_audio_for_seed(chat, seed, texts, batch_size, speed, refine_text_pr
79
  raise ValueError("维度应为 768。")
80
  else:
81
  raise ValueError(f"Invalid speaker_type: {speaker_type}. ")
82
-
83
  params_infer_code = {
84
  'spk_emb': rnd_spk_emb,
85
  'prompt': f'[speed_{speed}]',
@@ -99,7 +99,7 @@ def generate_audio_for_seed(chat, seed, texts, batch_size, speed, refine_text_pr
99
  flag = 0
100
  if not cur_tqdm:
101
  cur_tqdm = tqdm
102
-
103
  if re.search(r'\[uv_break\]|\[laugh\]', ''.join(texts)) is not None:
104
  if not skip_refine_text:
105
  print("Detected [uv_break] or [laugh] in text, skipping refine_text")
@@ -112,6 +112,7 @@ def generate_audio_for_seed(chat, seed, texts, batch_size, speed, refine_text_pr
112
  use_decoder=True, skip_refine_text=skip_refine_text)
113
  all_wavs.extend(wavs)
114
  clear_cuda_cache()
 
115
  if skip_save:
116
  return all_wavs
117
  combined_audio = combine_audio(all_wavs)
 
79
  raise ValueError("维度应为 768。")
80
  else:
81
  raise ValueError(f"Invalid speaker_type: {speaker_type}. ")
82
+ print(f'generate_audio_for_seed,1, speaker_type:{speaker_type}')
83
  params_infer_code = {
84
  'spk_emb': rnd_spk_emb,
85
  'prompt': f'[speed_{speed}]',
 
99
  flag = 0
100
  if not cur_tqdm:
101
  cur_tqdm = tqdm
102
+ print(f'generate_audio_for_seed,2, speaker_type:{speaker_type}')
103
  if re.search(r'\[uv_break\]|\[laugh\]', ''.join(texts)) is not None:
104
  if not skip_refine_text:
105
  print("Detected [uv_break] or [laugh] in text, skipping refine_text")
 
112
  use_decoder=True, skip_refine_text=skip_refine_text)
113
  all_wavs.extend(wavs)
114
  clear_cuda_cache()
115
+ print(f'generate_audio_for_seed,3, speaker_type:{speaker_type}')
116
  if skip_save:
117
  return all_wavs
118
  combined_audio = combine_audio(all_wavs)