Spaces:
Runtime error
Runtime error
wenmengzhou
commited on
Commit
•
98dc562
1
Parent(s):
9d1ad25
Update cosyvoice/cli/frontend.py
Browse files
cosyvoice/cli/frontend.py
CHANGED
@@ -112,7 +112,7 @@ class CosyVoiceFrontEnd:
|
|
112 |
def frontend_sft(self, tts_text, spk_id):
|
113 |
self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
114 |
tts_text_token, tts_text_token_len = self._extract_text_token(tts_text)
|
115 |
-
embedding = self.spk2info[spk_id]['embedding']
|
116 |
model_input = {'text': tts_text_token, 'text_len': tts_text_token_len, 'llm_embedding': embedding, 'flow_embedding': embedding}
|
117 |
return model_input
|
118 |
|
|
|
112 |
def frontend_sft(self, tts_text, spk_id):
|
113 |
self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
114 |
tts_text_token, tts_text_token_len = self._extract_text_token(tts_text)
|
115 |
+
embedding = self.spk2info[spk_id]['embedding'].to(self.device)
|
116 |
model_input = {'text': tts_text_token, 'text_len': tts_text_token_len, 'llm_embedding': embedding, 'flow_embedding': embedding}
|
117 |
return model_input
|
118 |
|