update repo

This commit is contained in:
嘉渊 2023-05-12 11:38:19 +08:00
parent 3911f1bfb7
commit 3faaa2f9c7
2 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,7 @@ from typing import Callable
from typing import Collection from typing import Collection
from typing import Dict from typing import Dict
from typing import Mapping from typing import Mapping
from typing import Optional
from typing import Tuple from typing import Tuple
from typing import Union from typing import Union
@ -110,7 +111,7 @@ class ESPnetDataset(Dataset):
float_dtype: str = "float32", float_dtype: str = "float32",
int_dtype: str = "long", int_dtype: str = "long",
dest_sample_rate: int = 16000, dest_sample_rate: int = 16000,
speed_perturb: list = None, speed_perturb: Optional[list, tuple] = None,
mode: str = "train", mode: str = "train",
): ):
assert check_argument_types() assert check_argument_types()

View File

@ -1,6 +1,7 @@
import collections.abc import collections.abc
from pathlib import Path from pathlib import Path
from typing import Union from typing import Union
from typing import Optional
import random import random
import numpy as np import numpy as np
@ -35,7 +36,7 @@ class SoundScpReader(collections.abc.Mapping):
always_2d: bool = False, always_2d: bool = False,
normalize: bool = False, normalize: bool = False,
dest_sample_rate: int = 16000, dest_sample_rate: int = 16000,
speed_perturb: tuple = None, speed_perturb: Optional[list, tuple] = None,
): ):
assert check_argument_types() assert check_argument_types()
self.fname = fname self.fname = fname