Embed flag definitions

This commit is contained in:
Reuben Morais 2020-04-28 13:33:45 +02:00
parent d85b0960eb
commit 6f9fcf3029
3 changed files with 20 additions and 1 deletions

16
doc/Flags.rst Normal file
View File

@ -0,0 +1,16 @@
.. _training-flags:
Command-line flags for the training scripts
===========================================
Below you can find the definition of all command-line flags supported by the training scripts. This includes ``DeepSpeech.py``, ``evaluate.py``, ``evaluate_tflite.py``, ``transcribe.py`` and ``lm_optimizer.py``.
Flags
-----
.. literalinclude:: ../training/deepspeech_training/util/flags.py
:language: python
:linenos:
:lineno-match:
:start-after: sphinx-doc: training_ref_flags_start
:end-before: sphinx-doc: training_ref_flags_end

View File

@ -123,7 +123,7 @@ The central (Python) script is ``DeepSpeech.py`` in the project's root directory
./DeepSpeech.py --helpfull
To get the output of this in a slightly better-formatted way, you can also look up the option definitions in :github:`util/flags.py <util/flags.py>`.
To get the output of this in a slightly better-formatted way, you can also look at the flag definitions in :ref:`training-flags`.
For executing pre-configured training scenarios, there is a collection of convenience scripts in the ``bin`` folder. Most of them are named after the corpora they are configured for. Keep in mind that most speech corpora are *very large*, on the order of tens of gigabytes, and some aren't free. Downloading and preprocessing them can take a very long time, and training on them without a fast GPU (GTX 10 series or newer recommended) takes even longer.

View File

@ -5,6 +5,7 @@ import absl.flags
FLAGS = absl.flags.FLAGS
# sphinx-doc: training_ref_flags_start
def create_flags():
# Importer
# ========
@ -198,3 +199,5 @@ def create_flags():
f.register_validator('one_shot_infer',
lambda value: not value or os.path.isfile(value),
message='The file pointed to by --one_shot_infer must exist and be readable.')
# sphinx-doc: training_ref_flags_end