| | |
| | | from typing import Union |
| | | |
| | | import numpy as np |
| | | from typeguard import check_argument_types |
| | | |
| | | from funasr.fileio.read_text import load_num_sequence_text |
| | | |
| | |
| | | dtype: Union[str, np.dtype] = "float32", |
| | | loader_type: str = "csv_int", |
| | | ): |
| | | assert check_argument_types() |
| | | shape_file = Path(shape_file) |
| | | self.utt2shape = load_num_sequence_text(shape_file, loader_type) |
| | | self.dtype = np.dtype(dtype) |
| | |
| | | dtype: Union[str, np.dtype] = "int64", |
| | | loader_type: str = "csv_int", |
| | | ): |
| | | assert check_argument_types() |
| | | shape_file = Path(shape_file) |
| | | self.utt2shape = load_num_sequence_text(shape_file, loader_type) |
| | | self.dtype = np.dtype(dtype) |