diff --git a/become_yukarin/dataset/dataset.py b/become_yukarin/dataset/dataset.py index b584e44..433d0b4 100644 --- a/become_yukarin/dataset/dataset.py +++ b/become_yukarin/dataset/dataset.py @@ -8,13 +8,13 @@ from typing import Callable from typing import Dict from typing import List -import scipy.ndimage import chainer import librosa import numpy import pysptk import pyworld +import scipy.ndimage from ..config.config import DatasetConfig from ..config.sr_config import SRDatasetConfig @@ -180,7 +180,7 @@ def __init__(self, validate=False) -> None: self._validate = validate def __call__(self, path: Path, test=None): - d = numpy.load(path.expanduser()).item() # type: dict + d: Dict[str, Any] = numpy.load(path.expanduser(), allow_pickle=True).item() feature = AcousticFeature( f0=d['f0'], spectrogram=d['spectrogram'], @@ -198,7 +198,7 @@ def __init__(self, validate=False) -> None: self._validate = validate def __call__(self, path: Path, test=None): - d = numpy.load(path.expanduser()).item() # type: dict + d: Dict[str, Any] = numpy.load(path.expanduser(), allow_pickle=True).item() feature = LowHighSpectrogramFeature( low=d['low'], high=d['high'],