Spaces:
Runtime error
Runtime error
Commit ·
3a65292
1
Parent(s): d234fc9
Update preprocessing/data_gen_utils.py
Browse files221 unmodified lines222223224225226227228229221 unmodified linesdef get_pitch_crepe(wav_data, mel, hparams, threshold=0.05):# device = torch.device("cuda" if torch.cuda.is_available() else "cpu")device = torch.device("cuda")# crepe只支持16khz采样率,需要重采样wav16k = resampy.resample(wav_data, hparams['audio_sample_rate'], 16000)wav16k_torch = torch.FloatTensor(wav16k).unsqueeze(0).to(device)221 unmodified lines222223224225226227228229221 unmodified linesdef get_pitch_crepe(wav_data, mel, hparams, threshold=0.05):device = torch.device("cuda" if torch.cuda.is_available() else "cpu")# device = torch.device("cuda")# crepe只支持16khz采样率,需要重采样wav16k = resampy.resample(wav_data, hparams['audio_sample_rate'], 16000)wav16k_torch = torch.FloatTensor(wav16k).unsqueeze(0).to(device)
preprocessing/data_gen_utils.py+2-2