From 8629573587e5e1296473cf61eded560f6bf4f6a9 Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Mon, 27 Jul 2020 10:23:43 +0200 Subject: [PATCH] Fix #3182: document rebuild of generate_scorer_package X-DeepSpeech: NOBUILD --- doc/BUILDING.rst | 14 ++++++++++++++ doc/Scorer.rst | 3 +++ 2 files changed, 17 insertions(+) diff --git a/doc/BUILDING.rst b/doc/BUILDING.rst index 16c5734a..bcc4d374 100644 --- a/doc/BUILDING.rst +++ b/doc/BUILDING.rst @@ -77,6 +77,20 @@ You can now use Bazel to build the main DeepSpeech library, ``libdeepspeech.so`` The generated binaries will be saved to ``bazel-bin/native_client/``. +.. _build-generate-scorer-package: + +Compile ``generate_scorer_package`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Following the same setup as for ``libdeepspeech.so`` above, you can rebuild the ``generate_scorer_package`` binary by adding its target to the command line: ``//native_client:generate_scorer_package``. +Using the example from above you can build the library and that binary at the same time: + +.. code-block:: + + bazel build --workspace_status_command="bash native_client/bazel_workspace_status_cmd.sh" --config=monolithic -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-fvisibility=hidden //native_client:libdeepspeech.so //native_client:generate_scorer_package + +The generated binaries will be saved to ``bazel-bin/native_client/``. + Compile Language Bindings ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/Scorer.rst b/doc/Scorer.rst index 04ce2d68..1f374604 100644 --- a/doc/Scorer.rst +++ b/doc/Scorer.rst @@ -49,6 +49,9 @@ Afterwards you can use ``generate_scorer_package`` to generate the scorer packag ./generate_scorer_package --alphabet ../alphabet.txt --lm lm.binary --vocab vocab-500000.txt \ --package kenlm.scorer --default_alpha 0.931289039105002 --default_beta 1.1834137581510284 +The ``generate_scorer_package`` binary is part of the released ``native_client.tar.xz``. If for some reason you need to rebuild it, +please refer to how to :ref:`build-generate-scorer-package`. + Building your own scorer ------------------------