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
6.49k stars 688 forks source link

微调英文数据,loss不降低,训练集的acc一直维持在很低的状态 #903

Closed I-am-little-curly-hair closed 7 months ago

I-am-little-curly-hair commented 1 year ago

我试验了以下两个模型:

speech_paraformer_asr-en-16k-vocab4199-pytorch speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch

分别用他们微调了speech_asr_commonvoice_en_trainsets,loss不降低,训练集的acc一直维持在很低的状态

为了排除超参数设置的问题,我从speech_asr_commonvoice_en_trainsets中随便抽出了一条音频,再用这俩模型分别跑了50个epoch,loss还是不降低,训练集的acc还是维持在不到0.1的状态

为了排除代码或者自建数据集格式的问题,我照葫芦画瓢找了一条中文音频,又分别用这俩模型跑了下,基本上第3个epoch训练集的acc就达到1.0了

现在可以确定的是,它们对英文数据微调的支持是存在问题的,请问我该怎么修改?

hnluo commented 1 year ago

Please check your english training data, whether english word is splited by space。

I-am-little-curly-hair commented 1 year ago

Please check your english training data, whether english word is splited by space。

是用空格拆分的,我反复确认过了,而且数据就是从common voice中选的

hnluo commented 1 year ago

You can use speech_paraformer_asr-en-16k-vocab4199-pytorch model to infer training subsets, check whether training data is correct.

I-am-little-curly-hair commented 1 year ago

You can use speech_paraformer_asr-en-16k-vocab4199-pytorch model to infer training subsets, check whether training data is correct.

image image image

上面是我的wav.scp、text、以及音频文件,可以看到,我的训练集就有一条数据,而且我听了下这个wav,它的音频内容和文本是能对上的

image

微信截图_20230901094249

上面是我的测试代码、以及测试结果,我用"speech_paraformer_asr-en-16k-vocab4199-pytorch"这个模型试了下,发现效果还不错,只错了一个单词

image

上面是我的微调代码,完全照抄的,我用这套代码调中文数据集就没有任何问题

image

上面是我的微调中间过程,可以看到,acc、wer指标低的吓人 同时我想问下,那个acc指标是啥意思?还有,英文不是应该计算wer吗?为啥还会计算cer指标?