stt_data_generator / src /utils /load_jsonl.py
Abdelrahman2922's picture
Upload 95 files
8ab5485 verified
Raw
History Blame Contribute Delete
376 Bytes
import json
from pathlib import Path
from loguru import logger
def load_jsonl(jsonl_path: Path):
records = []
with open(jsonl_path, "r", encoding="utf-8") as f:
for line in f:
try:
records.append(json.loads(line))
except Exception as e:
logger.warning(f"Failed parsing line: {e}")
return records