Spaces:
Runtime error
Runtime error
Update cosyvoice/cli/cosyvoice.py
Browse files
cosyvoice/cli/cosyvoice.py
CHANGED
|
@@ -18,7 +18,6 @@ from modelscope import snapshot_download
|
|
| 18 |
from cosyvoice.cli.frontend import CosyVoiceFrontEnd
|
| 19 |
from cosyvoice.cli.model import CosyVoiceModel
|
| 20 |
|
| 21 |
-
import spaces
|
| 22 |
|
| 23 |
class CosyVoice:
|
| 24 |
|
|
@@ -54,7 +53,6 @@ class CosyVoice:
|
|
| 54 |
tts_speeches.append(model_output['tts_speech'])
|
| 55 |
return {'tts_speech': torch.concat(tts_speeches, dim=1)}
|
| 56 |
|
| 57 |
-
@spaces.GPU
|
| 58 |
def inference_zero_shot(self, tts_text, prompt_text, prompt_speech_16k):
|
| 59 |
prompt_text = self.frontend.text_normalize(prompt_text, split=False)
|
| 60 |
tts_speeches = []
|
|
@@ -64,7 +62,6 @@ class CosyVoice:
|
|
| 64 |
tts_speeches.append(model_output['tts_speech'])
|
| 65 |
return {'tts_speech': torch.concat(tts_speeches, dim=1)}
|
| 66 |
|
| 67 |
-
@spaces.GPU
|
| 68 |
def inference_cross_lingual(self, tts_text, prompt_speech_16k):
|
| 69 |
if self.frontend.instruct is True:
|
| 70 |
raise ValueError('{} do not support cross_lingual inference'.format(self.model_dir))
|
|
|
|
| 18 |
from cosyvoice.cli.frontend import CosyVoiceFrontEnd
|
| 19 |
from cosyvoice.cli.model import CosyVoiceModel
|
| 20 |
|
|
|
|
| 21 |
|
| 22 |
class CosyVoice:
|
| 23 |
|
|
|
|
| 53 |
tts_speeches.append(model_output['tts_speech'])
|
| 54 |
return {'tts_speech': torch.concat(tts_speeches, dim=1)}
|
| 55 |
|
|
|
|
| 56 |
def inference_zero_shot(self, tts_text, prompt_text, prompt_speech_16k):
|
| 57 |
prompt_text = self.frontend.text_normalize(prompt_text, split=False)
|
| 58 |
tts_speeches = []
|
|
|
|
| 62 |
tts_speeches.append(model_output['tts_speech'])
|
| 63 |
return {'tts_speech': torch.concat(tts_speeches, dim=1)}
|
| 64 |
|
|
|
|
| 65 |
def inference_cross_lingual(self, tts_text, prompt_speech_16k):
|
| 66 |
if self.frontend.instruct is True:
|
| 67 |
raise ValueError('{} do not support cross_lingual inference'.format(self.model_dir))
|