DeepSpeech2的 baidu_cn1.2k_model.tar 中文模型识别中文语音转写文本失败
(1)/DeepSpeech/example/aishell/run_infer_golden.sh 脚本跑 aishell_model.tar.gz 模型已可以正常识别中文语音。
(2)我在run_infer_golden.sh基础上修改模型参数,使用 baidu_cn1.2k_model.tar来识别中文语音,出现大部分语音识别为空,个别语音只识别出一个"啊“,“的”等与语音无关的字。脚本的参数如下。
CUDA_VISIBLE_DEVICES=1
python -u infer.py
--num_samples=10
--trainer_count=1
--beam_size=300
--num_proc_bsearch=8
--num_conv_layers=2
--num_rnn_layers=3
--rnn_layer_size=2048
--alpha=2.6
--beta=5.0
--cutoff_prob=0.99
--cutoff_top_n=40
--use_gru=True
--use_gpu=True
--share_rnn_weights=False
--infer_manifest='data/aishell/manifest.test'
--mean_std_path='models/baidu_cn/mean_std.npz'
--vocab_path='models/baidu_cn/vocab.txt'
--model_path='models/baidu_cn/params.tar.gz'
--lang_model_path='models/lm/zh_giga.no_cna_cmn.prune01244.klm'
--decoding_method='ctc_beam_search'
--error_rate_type='wer'
--specgram_type='linear'
其中 baidu_cn1.2k_model.tar 包已解压到/DeepSpeech/models/baidu_cn/
对应的中文语言模型 zh_giga.no_cna_cmn.prune01244.klm 和 zhidao_giga.klm 都测试过,都无法识别中文语音。
--rnn_layer_size=2048
@bluebird138 如果要用我们提供的模型,模型结构参数是不能修改的,这里改回1024应该就没问题了
以上的”--rnn_layer_size=1024“已试过了,转写输出是一串的"韦兹韦兹……“,无意义的文字。 我是根据 baidu_cn1.2k_model.tar解压之后得到的 README.md 文件提示的参数修改的,README.md内容是以下:
Network structure setting:
--num_conv_layers=2 \
--num_rnn_layers=3 \
--rnn_layer_size=2048 \
--use_gru=True \
--share_rnn_weights=False \
--specgram_type='linear'
这问题已困扰我好久了,有人跑通过 baidu_cn1.2k_model.tar模型吗?请把运行脚本的参数贴出来,我参照来运行。
您好,此issue在近一个月内暂无更新,我们将于今天内关闭。若在关闭后您仍需跟进提问,可重新开启此问题,我们将在24小时内回复您。因关闭带来的不便我们深表歉意,请您谅解~感谢您对PaddlePaddle的支持! Hello, this issue has not been updated in the past month. We will close it today for the sake of other user‘s experience. If you still need to follow up on this question after closing, please feel free to reopen it. In that case, we will get back to you within 24 hours. We apologize for the inconvenience caused by the closure and thank you so much for your support of PaddlePaddle Group!
顶一下
经过我的尝试,将数据改为8k的采样率就行了。