pull/10/head
erogol 2020-11-26 11:44:52 +01:00
parent 0c6f7e4c77
commit 7b0a93d2f8
2 changed files with 4 additions and 4 deletions

View File

@ -323,11 +323,11 @@ class AudioProcessor(object):
### save and load ###
def load_wav(self, filename, sr=None):
if sr is None:
if self.resample:
x, sr = librosa.load(filename, sr=self.sample_rate)
elif sr is None:
x, sr = sf.read(filename)
assert self.sample_rate == sr, "%s vs %s"%(self.sample_rate, sr)
elif self.resample:
x, sr = librosa.load(filename, sr=self.sample_rate)
else:
x, sr = librosa.load(filename, sr=sr)
if self.do_trim_silence:

View File

@ -33,7 +33,7 @@ args, unknown_args = parser.parse_known_args()
# Remove our arguments from argv so that setuptools doesn't see them
sys.argv = [sys.argv[0]] + unknown_args
version = '0.0.6'
version = '0.0.7'
# Adapted from https://github.com/pytorch/pytorch
cwd = os.path.dirname(os.path.abspath(__file__))