ulysses115 commited on
Commit
3a65292
·
1 Parent(s): d234fc9

Update preprocessing/data_gen_utils.py

Browse files
Files changed (1) hide show
  1. preprocessing/data_gen_utils.py +2 -2
preprocessing/data_gen_utils.py CHANGED
@@ -222,8 +222,8 @@ def get_pitch_world(wav_data, mel, hparams):
222
 
223
 
224
  def get_pitch_crepe(wav_data, mel, hparams, threshold=0.05):
225
- # device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
226
- device = torch.device("cuda")
227
  # crepe只支持16khz采样率,需要重采样
228
  wav16k = resampy.resample(wav_data, hparams['audio_sample_rate'], 16000)
229
  wav16k_torch = torch.FloatTensor(wav16k).unsqueeze(0).to(device)
 
222
 
223
 
224
  def get_pitch_crepe(wav_data, mel, hparams, threshold=0.05):
225
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
226
+ # device = torch.device("cuda")
227
  # crepe只支持16khz采样率,需要重采样
228
  wav16k = resampy.resample(wav_data, hparams['audio_sample_rate'], 16000)
229
  wav16k_torch = torch.FloatTensor(wav16k).unsqueeze(0).to(device)