Update model.py
Browse files
model.py
CHANGED
@@ -1389,7 +1389,7 @@ def extract_features(batch, tokenizer, spectrogram, waveforms, pitch, frequency=
|
|
1389 |
frame_period=hop_length/sampling_rate*1000)
|
1390 |
f0 = pw.stonemask(wav_np, f0, t, sampling_rate)
|
1391 |
f0 = torch.from_numpy(f0)
|
1392 |
-
batch["pitch"] = f0
|
1393 |
|
1394 |
if frequency:
|
1395 |
wav_np = wav.numpy().astype(np.float64)
|
|
|
1389 |
frame_period=hop_length/sampling_rate*1000)
|
1390 |
f0 = pw.stonemask(wav_np, f0, t, sampling_rate)
|
1391 |
f0 = torch.from_numpy(f0)
|
1392 |
+
batch["pitch"] = f0.unsqueeze(0)
|
1393 |
|
1394 |
if frequency:
|
1395 |
wav_np = wav.numpy().astype(np.float64)
|