Update ans_dfsmn_pipeline.py (#1510)

This commit is contained in:
weedge
2025-09-28 10:36:22 +08:00
committed by GitHub
parent 795e76bbfe
commit 7a37e99b6b

View File

@@ -132,7 +132,7 @@ class ANSDFSMNPipeline(Pipeline):
if len(data1.shape) > 1:
data1 = data1[:, 0]
if fs != self.SAMPLE_RATE:
data1 = librosa.resample(data1, fs, self.SAMPLE_RATE)
data1 = librosa.resample(data1, orig_sr=fs, target_sr=self.SAMPLE_RATE)
data = data1 * 32768
data_tensor = torch.from_numpy(data).type(torch.FloatTensor)
return data_tensor