def METHOD_NAME(cls, filename, target_sr=None, int_values=False, offset=0,
              duration=0, trim=False):
    """
    Load a file supported by librosa and return as an AudioSegment.
    :param filename: path of file to load
    :param target_sr: the desired sample rate
    :param int_values: if true, load samples as 32-bit integers
    :param offset: offset in seconds when loading audio
    :param duration: duration in seconds when loading audio
    :return: numpy array of samples
    """
    with sf.SoundFile(filename, 'r') as f:
        dtype = 'int32' if int_values else 'float32'
        sample_rate = f.samplerate
        if offset > 0:
            f.seek(int(offset * sample_rate))
        if duration > 0:
            samples = f.read(int(duration * sample_rate), dtype=dtype)
        else:
            samples = f.read(dtype=dtype)
    samples = samples.transpose()
    return cls(samples, sample_rate, target_sr=target_sr, trim=trim)