调用DeepSpeech的generate_lm.py时出现子进程调用错误



我正在尝试使用colab中的DeepSpeech为语音到文本构建定制的评分器(语言模型(。调用generate_lm.py时出现以下错误:

main()
File "generate_lm.py", line 201, in main
build_lm(args, data_lower, vocab_str)
File "generate_lm.py", line 126, in build_lm
binary_path,
File "/usr/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/content/DeepSpeech/native_client/kenlm/build/bin/build_binary', '-a', '255', '-q', '8', '-v', 'trie', '/content/DeepSpeech/data/lm/lm_filtered.arpa', '/content/DeepSpeech/data/lm/lm.binary']' died with <Signals.SIGSEGV: 11>.```
Calling the script generate_lm.py like this :
```! python3 generate_lm.py --input_txt hindi_tokens.txt --output_dir /content/DeepSpeech/data/lm --top_k 500000 --kenlm_bins /content/DeepSpeech/native_client/kenlm/build/bin/ --arpa_order 5 --max_arpa_memory "85%" --arpa_prune "0|0|1" --binary_a_bits 255 --binary_q_bits 8 --binary_type trie```

能够找到上述问题的解决方案。在将top_k的值减少到15000之后,成功创建了语言模型。我的短语文件只有大约42000个条目。我们必须根据集合中短语的数量调整top_k值。top_k参数表示-在处理之前,这许多不太频繁的短语将被删除。

相关内容

  • 没有找到相关文章

最新更新