modelscope / FunASR

A Fundamental End-to-End Speech Recognition Toolkit and Open Source SOTA Pretrained Models, Supporting Speech Recognition, Voice Activity Detection, Text Post-processing etc.
https://www.funasr.com
Other
5.81k stars 629 forks source link

怎样使用kaldi 格式的feats.scp直接训练paraformer? #886

Open zjc6666 opened 1 year ago

zjc6666 commented 1 year ago

麻烦请教一下,因为有大部分音频丢失了原始wav,只保留了特征,所以想仅仅使用feats.scp和text来运行我们的Funasr代码,并且针对公开的模型进行finetune,遇到了以下问题,麻烦帮忙解答一下: 首先,我直接更改data_types:kaldi_ark,text,data_file_names:feats.scp, text, 并且使用large的dataset 我做完以上更改后,并无法直接运行 找了一下原因,原因有两个 1、在这一行,原本输入的应该是scp文件,但是代码中是”ark_reader = ReadHelper('ark:{}'.format(data_file))“, 更改为”ark_reader = ReadHelper('scp:{}'.format(data_file))“ 后第一个问题解决 https://github.com/alibaba-damo-academy/FunASR/blob/f70f70711045fc191a4ce9498c155d61e969b57f/funasr/datasets/large_datasets/dataset.py#L108

2、当使用feats.scp和large dataset时,我并没有发现有拼帧、跳帧操作

我不确定以上两个问题的出现,是由于我的使用方式有误,还是没有用对Funasr工具,麻烦指正!!!

另外,当我修改完以上两个地方开始训练后(用70w条短数据,训练220M的模型),发现acc不能够正常增长,大约卡在了30%这个阶段,每个epoch都是重新再从16->30%,请教一下如果想进行finetune,最佳的finetune方式是什么呢? 例如:先tune decoder, 然后再全参数量funetune

谢谢!

LauraGPT commented 1 year ago

You could ref to the recipe and docs. But before you start to train model, you must process you fbank to low frame rate (LFR6) and cmvn as the code line 139~141. The config of LFR6 and cmvn file could be found in modelscope