Spaces:
Build error
Build error
ChrisPreston
commited on
Commit
·
85bc08a
1
Parent(s):
1903060
Update preprocessing/process_pipeline.py
Browse files
preprocessing/process_pipeline.py
CHANGED
@@ -82,8 +82,8 @@ def get_pitch_parselmouth(wav_data, mel, hparams):
|
|
82 |
|
83 |
|
84 |
def get_pitch_crepe(wav_data, mel, hparams, threshold=0.05):
|
85 |
-
|
86 |
-
device = torch.device("cuda")
|
87 |
# crepe只支持16khz采样率,需要重采样
|
88 |
wav16k = resampy.resample(wav_data, hparams['audio_sample_rate'], 16000)
|
89 |
wav16k_torch = torch.FloatTensor(wav16k).unsqueeze(0).to(device)
|
|
|
82 |
|
83 |
|
84 |
def get_pitch_crepe(wav_data, mel, hparams, threshold=0.05):
|
85 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
86 |
+
# device = torch.device("cuda")
|
87 |
# crepe只支持16khz采样率,需要重采样
|
88 |
wav16k = resampy.resample(wav_data, hparams['audio_sample_rate'], 16000)
|
89 |
wav16k_torch = torch.FloatTensor(wav16k).unsqueeze(0).to(device)
|