Error early in generate_package.py if no alphabet was specified and not using UTF-8 mode

X-DeepSpeech: NOBUILD
This commit is contained in:
Reuben Morais 2020-03-30 18:16:49 +02:00
parent 080dc7df3c
commit 09673581a4

View File

@ -48,6 +48,9 @@ def create_bundle(
if use_utf8:
serialized_alphabet = UTF8Alphabet().serialize()
else:
if not alphabet_path:
print("No --alphabet path specified, can't continue.")
sys.exit(1)
serialized_alphabet = Alphabet(alphabet_path).serialize()
alphabet = NativeAlphabet()