| | |
| | | from funasr.utils.load_utils import load_audio_text_image_video, extract_fbank |
| | | from funasr.utils.timestamp_tools import timestamp_sentence |
| | | from funasr.models.campplus.utils import sv_chunk, postprocess, distribute_spk |
| | | from funasr.models.campplus.cluster_backend import ClusterBackend |
| | | try: |
| | | from funasr.models.campplus.cluster_backend import ClusterBackend |
| | | except: |
| | | print("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): |
| | |
| | | result['timestamp'], \ |
| | | result['raw_text']) |
| | | result['sentence_info'] = sentence_list |
| | | del result['spk_embedding'] |
| | | if "spk_embedding" in result: del result['spk_embedding'] |
| | | |
| | | result["key"] = key |
| | | results_ret_list.append(result) |