@@ -45,7 +45,7 @@ def __init__(self, filename, target_sr=None, int_values=False, offset=0,
4545 duration = 0 , trim = False , trim_db = 60 ):
4646 """Create audio segment from samples.
4747
48- Samples are convert float32 internally, with int scaled to [-1, 1].
48+ Samples are converted to float32 internally, with int scaled to [-1, 1].
4949 Load a file supported by librosa and return as an AudioSegment.
5050 :param filename: path of file to load
5151 :param target_sr: the desired sample rate
@@ -67,10 +67,11 @@ def __init__(self, filename, target_sr=None, int_values=False, offset=0,
6767
6868 samples = self ._convert_samples_to_float32 (samples )
6969 if target_sr is not None and target_sr != sample_rate :
70- samples = librosa .core .resample (samples , sample_rate , target_sr )
70+ samples = librosa .resample (samples , orig_sr = sample_rate ,
71+ target_sr = target_sr )
7172 sample_rate = target_sr
7273 if trim :
73- samples , _ = librosa .effects .trim (samples , trim_db )
74+ samples , _ = librosa .effects .trim (samples , top_db = trim_db )
7475 self ._samples = samples
7576 self ._sample_rate = sample_rate
7677 if self ._samples .ndim >= 2 :
0 commit comments