雾聪
2023-11-30 9fa2b2128d3935b2edff2a2a3f1b8fd430a7e272
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
            )