Skip to content
Discussion options

You must be logged in to vote

更正一下上一条回复:FunASR 1.2.x 的标准训练 JSONL 字段是 source,不是 audio_filepath。截图中的错误也不是 1.2.4 到 1.2.7 的数据格式迁移。

截图已经给出了关键线索:

wav_frontend.py, in forward
    batch_size = input.size(0)
AttributeError: 'str' object has no attribute 'size'

这里的 input 本应是音频 Tensor,却仍然是字符串。对于标准 AudioDataset,最常见且可以精确复现的原因是:JSONL 中 source 指向的音频文件对训练进程不可见,例如路径不存在、相对路径基准不对、容器没有挂载该目录,或者某个 DDP 节点看不到文件。

我下载并对比了官方 PyPI 的 FunASR 1.2.4 和 1.2.7 wheel:wav_frontend.pyAudioDatasetIndexDSJsonl 三个相关文件逐字节相同,音频加载分支也没有这项格式变化。用同一个真实 WAV 测试时,两版都返回 88,747 点的 Tensor;传入不存在的路径时,两版都会保留字符串,并复现与你截图完全相同的 AttributeError: 'str' object has no attribute 'size'

先检查实际加载的是哪个 FunASR

截图路径是本地源码目录 .../FunASR-main/funasr/...,它可能覆盖了 pip 安装包。请先运行:

python -c 'im…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by LauraGPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants