tzzte commited on
Commit
06af588
·
verified ·
1 Parent(s): a0185ca

Update Echox_copy_stream.py

Browse files
Files changed (1) hide show
  1. Echox_copy_stream.py +15 -15
Echox_copy_stream.py CHANGED
@@ -107,21 +107,21 @@ class EchoxAssistant():
107
  print(f"### {self.args.cosyvoice_model_path}")
108
  if self.args.cosyvoice_model_path:
109
  print(f"[EchoxAssistant] Initializing CosyVoice2 TTS from {self.args.cosyvoice_model_path} ...")
110
- try:
111
- self.cosyvoice_tts = CosyVoice2TTS(model_dir=self.args.cosyvoice_model_path, device=self.device)
112
- # reference prompt for zero-shot voice cloning
113
- self.cosyvoice_ref_audio = self.args.cosyvoice_ref_audio
114
- self.cosyvoice_ref_text = self.args.cosyvoice_ref_text or ""
115
-
116
- self.vocoder = None
117
- self.voc_cfg = None
118
- self.audio_executor = ThreadPoolExecutor(max_workers=2)
119
- print("[EchoxAssistant] CosyVoice2 TTS ready.")
120
- except Exception as e:
121
- print(f"[EchoxAssistant] Failed to init CosyVoice2TTS: {e}. Falling back to original vocoder.")
122
- self.cosyvoice_tts = None
123
- self.vocoder, self.voc_cfg = load_speech_model(self.device)
124
- self.audio_executor = ThreadPoolExecutor(max_workers=2)
125
  else:
126
  print(f"backup plan")
127
  self.vocoder, self.voc_cfg = load_speech_model(self.device)
 
107
  print(f"### {self.args.cosyvoice_model_path}")
108
  if self.args.cosyvoice_model_path:
109
  print(f"[EchoxAssistant] Initializing CosyVoice2 TTS from {self.args.cosyvoice_model_path} ...")
110
+ # try:
111
+ self.cosyvoice_tts = CosyVoice2TTS(model_dir=self.args.cosyvoice_model_path, device=self.device)
112
+ # reference prompt for zero-shot voice cloning
113
+ self.cosyvoice_ref_audio = self.args.cosyvoice_ref_audio
114
+ self.cosyvoice_ref_text = self.args.cosyvoice_ref_text or ""
115
+
116
+ self.vocoder = None
117
+ self.voc_cfg = None
118
+ self.audio_executor = ThreadPoolExecutor(max_workers=2)
119
+ print("[EchoxAssistant] CosyVoice2 TTS ready.")
120
+ # except Exception as e:
121
+ # print(f"[EchoxAssistant] Failed to init CosyVoice2TTS: {e}. Falling back to original vocoder.")
122
+ # self.cosyvoice_tts = None
123
+ # self.vocoder, self.voc_cfg = load_speech_model(self.device)
124
+ # self.audio_executor = ThreadPoolExecutor(max_workers=2)
125
  else:
126
  print(f"backup plan")
127
  self.vocoder, self.voc_cfg = load_speech_model(self.device)