zhifu gao
2024-04-24 861147c7308b91068ffa02724fdf74ee623a909e
funasr/datasets/large_datasets/collate_fn.py
@@ -17,7 +17,7 @@
            float_pad_value: Union[float, int] = 0.0,
            int_pad_value: int = -32768,
            not_sequence: Collection[str] = (),
            max_sample_size=None
        max_sample_size=None,
    ):
        self.float_pad_value = float_pad_value
        self.int_pad_value = int_pad_value
@@ -47,8 +47,7 @@
        int_pad_value: int = -32768,
        not_sequence: Collection[str] = (),
) -> Tuple[List[str], Dict[str, torch.Tensor]]:
    """Concatenate ndarray-list to an array and convert to torch.Tensor.
    """
    """Concatenate ndarray-list to an array and convert to torch.Tensor."""
    uttids = [u for u, _ in data]
    data = [d for _, d in data]
@@ -85,7 +84,7 @@
            float_pad_value: Union[float, int] = 0.0,
            int_pad_value: int = -32768,
            not_sequence: Collection[str] = (),
            max_sample_size=None
        max_sample_size=None,
    ):
        self.float_pad_value = float_pad_value
        self.int_pad_value = int_pad_value
@@ -115,8 +114,7 @@
        int_pad_value: int = -32768,
        not_sequence: Collection[str] = (),
) -> Tuple[List[str], Dict[str, torch.Tensor]]:
    """Concatenate ndarray-list to an array and convert to torch.Tensor.
    """
    """Concatenate ndarray-list to an array and convert to torch.Tensor."""
    uttids = [u for u, _ in data]
    data = [d for _, d in data]