Files
wangjia 25acf9db6e feat(eval): ASR 模型评估框架
横向对比云端 gummy 与本地开源模型(faster-whisper/SenseVoice/Paraformer),
重点覆盖中英混说,产出准确率(CER/WER/MER)/速度(延迟/RTF)/资源(cpu/mem/模型大小)
对比报告。公共集(ASCEND/AISHELL/LibriSpeech)统一走 HF 适配器 + 自定义 JSONL manifest。
gummy 引擎对照 server/internal/asr/gummy.go 协议移植。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 11:25:04 +08:00

26 lines
726 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""数据集注册表:config 的 type(hf|custom) 映射到适配器。
公共集(ASCEND/AISHELL/LibriSpeech)统一走 HFDataset,差异全在 config.yaml 里描述
hf_id/split/text_field/lang),所以"广覆盖 + 自定义"只需改配置,不必加代码。
"""
from __future__ import annotations
from .base import Dataset
def build_dataset(cfg: dict, audio_cache: str) -> Dataset:
dtype = cfg["type"]
if dtype == "hf":
from .hf import HFDataset
return HFDataset(cfg, audio_cache)
if dtype == "custom":
from .custom import CustomDataset
return CustomDataset(cfg)
raise ValueError(f"未知数据集类型: {dtype}")
__all__ = ["Dataset", "build_dataset"]