From 18b9a8c844348f131d7900c1c59566033c4f08ae Mon Sep 17 00:00:00 2001 From: Tao Liu <91858374+liutaocode@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:53:09 +0800 Subject: [PATCH] Update model.py The torch.tensor() function does not have a dim parameter --- cosyvoice/cli/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosyvoice/cli/model.py b/cosyvoice/cli/model.py index 1fcc31f..024fa7f 100644 --- a/cosyvoice/cli/model.py +++ b/cosyvoice/cli/model.py @@ -230,7 +230,7 @@ class CosyVoiceModel: if self.llm_end_dict[this_uuid] is True and len(self.tts_speech_token_dict[this_uuid]) < token_hop_len + self.token_overlap_len: break # deal with remain tokens, make sure inference remain token len equals token_hop_len when cache_speech is not None - this_tts_speech_token = torch.tensor(self.tts_speech_token_dict[this_uuid], dim=1).unsqueeze(dim=0) + this_tts_speech_token = torch.tensor(self.tts_speech_token_dict[this_uuid]).unsqueeze(dim=0) this_tts_speech = self.token2wav(token=this_tts_speech_token, prompt_token=flow_prompt_speech_token, prompt_feat=prompt_speech_feat,