Skip to content

Commit 082b531

Browse files
committed
Fix unexpected float64 dtype with NumPy 2.x
1 parent 66800d6 commit 082b531

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

preprocessing/variance_binarizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def process_item(self, item_name, meta_data, binarization_args):
331331
if uv.all(): # All unvoiced
332332
print(f'Skipped \'{item_name}\': empty gt f0')
333333
return None
334-
pitch = torch.from_numpy(librosa.hz_to_midi(f0.astype(np.float32))).to(self.device)
334+
pitch = torch.from_numpy(librosa.hz_to_midi(f0.astype(np.float32)).astype(np.float32)).to(self.device)
335335

336336
if hparams['predict_dur']:
337337
ph_num = torch.LongTensor(meta_data['ph_num']).to(self.device)

0 commit comments

Comments
 (0)