0

我正在尝试使用 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```
4

1 回答 1

0

能够为上述问题找到解决方案。将值减小top_k到 15000 后成功创建语言模型。我的短语文件只有大约 42000 个条目。我们必须top_k根据集合中短语的数量来调整值。top_k参数说 - 在处理之前将删除这些不太常见的短语。

于 2021-12-06T03:33:08.827 回答