zhifu gao
2023-11-22 b57b98364ff60ae0119b2e8d92471316bb4e504f
funasr/fileio/sound_scp.py
@@ -4,7 +4,7 @@
import random
import numpy as np
import soundfile
import librosa
import librosa
import torch
@@ -116,7 +116,7 @@
    def __getitem__(self, key):
        wav = self.data[key]
        if self.normalize:
            # soundfile.read normalizes data to [-1,1] if dtype is not given
            # librosa.load normalizes data to [-1,1] if dtype is not given
            array, rate = librosa.load(
                wav, sr=self.dest_sample_rate, mono=self.always_2d
            )