littlebird13 commited on
Commit
6812998
1 Parent(s): 88db84a

Update css/utils.py

Browse files
Files changed (1) hide show
  1. css/utils.py +4 -0
css/utils.py CHANGED
@@ -6,11 +6,15 @@ logging.basicConfig(level=logging.DEBUG,
6
 
7
  import torch
8
  import numpy as np
 
9
  import random
10
  import librosa
 
11
  from cosyvoice.utils.file_utils import load_wav
12
 
13
  from cosyvoice.cli.cosyvoice import CosyVoice
 
 
14
  cosyvoice= CosyVoice('speech_tts/CosyVoice-300M')
15
  cosyvoice_sft= CosyVoice('speech_tts/CosyVoice-300M-SFT')
16
  cosyvoice_instruct= CosyVoice('speech_tts/CosyVoice-300M-Instruct')
 
6
 
7
  import torch
8
  import numpy as np
9
+ import spaces
10
  import random
11
  import librosa
12
+
13
  from cosyvoice.utils.file_utils import load_wav
14
 
15
  from cosyvoice.cli.cosyvoice import CosyVoice
16
+
17
+ @spaces.GPU
18
  cosyvoice= CosyVoice('speech_tts/CosyVoice-300M')
19
  cosyvoice_sft= CosyVoice('speech_tts/CosyVoice-300M-SFT')
20
  cosyvoice_instruct= CosyVoice('speech_tts/CosyVoice-300M-Instruct')