Add link to RTD, actually exit on error
This commit is contained in:
parent
1276c47d8f
commit
a590e3726b
@ -3,6 +3,7 @@ from __future__ import absolute_import, division, print_function
|
||||
|
||||
import argparse
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
import ds_ctcdecoder
|
||||
from deepspeech_training.util.text import Alphabet, UTF8Alphabet
|
||||
@ -56,6 +57,8 @@ def create_bundle(
|
||||
err = scorer.load_lm(lm_path)
|
||||
if err != ds_ctcdecoder.DS_ERR_SCORER_NO_TRIE:
|
||||
print('Error loading language model file: 0x{:X}.'.format(err))
|
||||
print('See the error codes section in https://deepspeech.readthedocs.io for a description.')
|
||||
sys.exit(1)
|
||||
scorer.fill_dictionary(list(words))
|
||||
shutil.copy(lm_path, package_path)
|
||||
scorer.save_dictionary(package_path, True) # append, not overwrite
|
||||
|
Loading…
x
Reference in New Issue
Block a user