diff --git a/doc/Flags.rst b/doc/Flags.rst new file mode 100644 index 00000000..66b26f0c --- /dev/null +++ b/doc/Flags.rst @@ -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 diff --git a/doc/TRAINING.rst b/doc/TRAINING.rst index 3f0b584c..36decbb9 100644 --- a/doc/TRAINING.rst +++ b/doc/TRAINING.rst @@ -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 `. +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. diff --git a/training/deepspeech_training/util/flags.py b/training/deepspeech_training/util/flags.py index fde946cc..2bd65be0 100644 --- a/training/deepspeech_training/util/flags.py +++ b/training/deepspeech_training/util/flags.py @@ -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