| | |
| | | from funasr.models.campplus.utils import sv_chunk, postprocess, distribute_spk |
| | | from funasr.models.campplus.cluster_backend import ClusterBackend |
| | | except: |
| | | print("If you want to use the speaker diarization, please `pip install hdbscan`") |
| | | print("Notice: If you want to use the speaker diarization, please `pip install hdbscan`") |
| | | |
| | | |
| | | def prepare_data_iterator(data_in, input_len=None, data_type=None, key=None): |
| | |
| | | # step.2 compute asr model |
| | | model = self.model |
| | | deep_update(kwargs, cfg) |
| | | batch_size = int(kwargs.get("batch_size_s", 300))*1000 |
| | | batch_size = max(int(kwargs.get("batch_size_s", 300))*1000, 1) |
| | | batch_size_threshold_ms = int(kwargs.get("batch_size_threshold_s", 60))*1000 |
| | | kwargs["batch_size"] = batch_size |
| | | |