| import json, sys |
| sys.path.insert(0, '/taoye/lhy/czy/moss/MOSS-Transcribe-Diarize') |
| from aishell4_eval import inference_worker |
|
|
| audio_items = [] |
| with open('/taoye/lhy/datasets/AISHELL-4/test/test.jsonl') as f: |
| for line in f: |
| line = line.strip() |
| if line: |
| audio_items.append(json.loads(line)) |
| chunk_size = (len(audio_items) + 2 - 1) // 2 |
| chunks = [audio_items[i:i+chunk_size] for i in range(0, len(audio_items), chunk_size)] |
|
|
| inference_worker(0, chunks[0], '/taoye/lhy/czy/moss/MOSS-Transcribe-Diarize/aishell4_eval_output_v2') |
|
|