From a9ca50fb72eaf4287865d0bdd59bd4a4938b92a0 Mon Sep 17 00:00:00 2001 From: csukuangfj Date: Wed, 21 Sep 2022 06:23:20 +0000 Subject: [PATCH] deploy: 9ae2f3a3c5a3c2336ca236c984843c0e133ee307 --- .buildinfo | 2 +- .../lstm_pruned_stateless_transducer.rst.txt | 73 ++++++++++-------- objects.inv | Bin 717 -> 719 bytes recipes/index.html | 2 +- recipes/librispeech/conformer_ctc.html | 6 +- recipes/librispeech/index.html | 4 +- .../lstm_pruned_stateless_transducer.html | 71 ++++++++++------- recipes/librispeech/tdnn_lstm_ctc.html | 2 +- recipes/timit/index.html | 4 +- searchindex.js | 2 +- 10 files changed, 96 insertions(+), 70 deletions(-) diff --git a/.buildinfo b/.buildinfo index d727d6619..46f8d58fb 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 3ca2e66d59e42ffdb5e0a5ba2153f99e +config: cfc3e6ecc44ed7573f700065af8738a7 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_sources/recipes/librispeech/lstm_pruned_stateless_transducer.rst.txt b/_sources/recipes/librispeech/lstm_pruned_stateless_transducer.rst.txt index 0aeccb70a..b9d5bdcba 100644 --- a/_sources/recipes/librispeech/lstm_pruned_stateless_transducer.rst.txt +++ b/_sources/recipes/librispeech/lstm_pruned_stateless_transducer.rst.txt @@ -1,5 +1,5 @@ -Transducer -========== +LSTM Transducer +=============== .. hint:: @@ -7,7 +7,7 @@ Transducer for pretrained models if you don't want to train a model from scratch. -This tutorial shows you how to train a transducer model +This tutorial shows you how to train an LSTM transducer model with the `LibriSpeech `_ dataset. We use pruned RNN-T to compute the loss. @@ -20,9 +20,9 @@ We use pruned RNN-T to compute the loss. The transducer model consists of 3 parts: - - Encoder, a.k.a, transcriber. We use an LSTM model - - Decoder, a.k.a, predictor. We use a model consisting of ``nn.Embedding`` - and ``nn.Conv1d`` + - Encoder, a.k.a, the transcription network. We use an LSTM model + - Decoder, a.k.a, the prediction network. We use a stateless model consisting of + ``nn.Embedding`` and ``nn.Conv1d`` - Joiner, a.k.a, the joint network. .. caution:: @@ -74,7 +74,11 @@ Data preparation The script ``./prepare.sh`` handles the data preparation for you, **automagically**. All you need to do is to run it. -The data preparation contains several stages, you can use the following two +.. note:: + + We encourage you to read ``./prepare.sh``. + +The data preparation contains several stages. You can use the following two options: - ``--stage`` @@ -263,7 +267,7 @@ You will find the following files in that directory: - ``tensorboard/`` - This folder contains TensorBoard logs. Training loss, validation loss, learning + This folder contains tensorBoard logs. Training loss, validation loss, learning rate, etc, are recorded in these logs. You can visualize them by: .. code-block:: bash @@ -287,7 +291,7 @@ You will find the following files in that directory: [2022-09-20T15:53:02] Total uploaded: 210171 scalars, 0 tensors, 0 binary objects Listening for new data in logdir... - Note there is a URL in the above output, click it and you will see + Note there is a URL in the above output. Click it and you will see the following screenshot: .. figure:: images/librispeech-lstm-transducer-tensorboard-log.png @@ -422,7 +426,7 @@ The following shows two examples: Export models ------------- -`lstm_transducer_stateless2/export.py `_ supports to export checkpoints from ``lstm_transducer_stateless2/exp`` in the following ways. +`lstm_transducer_stateless2/export.py `_ supports exporting checkpoints from ``lstm_transducer_stateless2/exp`` in the following ways. Export ``model.state_dict()`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -458,7 +462,7 @@ It will generate a file ``./lstm_transducer_stateless2/exp/pretrained.pt``. cd lstm_transducer_stateless2/exp ln -s pretrained epoch-9999.pt - And then pass `--epoch 9999 --avg 1 --use-averaged-model 0` to + And then pass ``--epoch 9999 --avg 1 --use-averaged-model 0`` to ``./lstm_transducer_stateless2/decode.py``. To use the exported model with ``./lstm_transducer_stateless2/pretrained.py``, you @@ -506,6 +510,11 @@ To use the generated files with ``./lstm_transducer_stateless2/jit_pretrained``: /path/to/foo.wav \ /path/to/bar.wav +.. hint:: + + Please see ``_ + for how to use the exported models in ``sherpa``. + Export model for ncnn ~~~~~~~~~~~~~~~~~~~~~ @@ -576,37 +585,37 @@ It will generate the following files: - ``./lstm_transducer_stateless2/exp/joiner_jit_trace-pnnx.ncnn.param`` - ``./lstm_transducer_stateless2/exp/joiner_jit_trace-pnnx.ncnn.bin`` -To use the above generate files, run: +To use the above generated files, run: .. code-block:: bash -./lstm_transducer_stateless2/ncnn-decode.py \ - --bpe-model-filename ./data/lang_bpe_500/bpe.model \ - --encoder-param-filename ./lstm_transducer_stateless2/exp/encoder_jit_trace-pnnx.ncnn.param \ - --encoder-bin-filename ./lstm_transducer_stateless2/exp/encoder_jit_trace-pnnx.ncnn.bin \ - --decoder-param-filename ./lstm_transducer_stateless2/exp/decoder_jit_trace-pnnx.ncnn.param \ - --decoder-bin-filename ./lstm_transducer_stateless2/exp/decoder_jit_trace-pnnx.ncnn.bin \ - --joiner-param-filename ./lstm_transducer_stateless2/exp/joiner_jit_trace-pnnx.ncnn.param \ - --joiner-bin-filename ./lstm_transducer_stateless2/exp/joiner_jit_trace-pnnx.ncnn.bin \ - /path/to/foo.wav + ./lstm_transducer_stateless2/ncnn-decode.py \ + --bpe-model-filename ./data/lang_bpe_500/bpe.model \ + --encoder-param-filename ./lstm_transducer_stateless2/exp/encoder_jit_trace-pnnx.ncnn.param \ + --encoder-bin-filename ./lstm_transducer_stateless2/exp/encoder_jit_trace-pnnx.ncnn.bin \ + --decoder-param-filename ./lstm_transducer_stateless2/exp/decoder_jit_trace-pnnx.ncnn.param \ + --decoder-bin-filename ./lstm_transducer_stateless2/exp/decoder_jit_trace-pnnx.ncnn.bin \ + --joiner-param-filename ./lstm_transducer_stateless2/exp/joiner_jit_trace-pnnx.ncnn.param \ + --joiner-bin-filename ./lstm_transducer_stateless2/exp/joiner_jit_trace-pnnx.ncnn.bin \ + /path/to/foo.wav .. code-block:: bash -./lstm_transducer_stateless2/streaming-ncnn-decode.py \ - --bpe-model-filename ./data/lang_bpe_500/bpe.model \ - --encoder-param-filename ./lstm_transducer_stateless2/exp/encoder_jit_trace-pnnx.ncnn.param \ - --encoder-bin-filename ./lstm_transducer_stateless2/exp/encoder_jit_trace-pnnx.ncnn.bin \ - --decoder-param-filename ./lstm_transducer_stateless2/exp/decoder_jit_trace-pnnx.ncnn.param \ - --decoder-bin-filename ./lstm_transducer_stateless2/exp/decoder_jit_trace-pnnx.ncnn.bin \ - --joiner-param-filename ./lstm_transducer_stateless2/exp/joiner_jit_trace-pnnx.ncnn.param \ - --joiner-bin-filename ./lstm_transducer_stateless2/exp/joiner_jit_trace-pnnx.ncnn.bin \ - /path/to/foo.wav + ./lstm_transducer_stateless2/streaming-ncnn-decode.py \ + --bpe-model-filename ./data/lang_bpe_500/bpe.model \ + --encoder-param-filename ./lstm_transducer_stateless2/exp/encoder_jit_trace-pnnx.ncnn.param \ + --encoder-bin-filename ./lstm_transducer_stateless2/exp/encoder_jit_trace-pnnx.ncnn.bin \ + --decoder-param-filename ./lstm_transducer_stateless2/exp/decoder_jit_trace-pnnx.ncnn.param \ + --decoder-bin-filename ./lstm_transducer_stateless2/exp/decoder_jit_trace-pnnx.ncnn.bin \ + --joiner-param-filename ./lstm_transducer_stateless2/exp/joiner_jit_trace-pnnx.ncnn.param \ + --joiner-bin-filename ./lstm_transducer_stateless2/exp/joiner_jit_trace-pnnx.ncnn.bin \ + /path/to/foo.wav To use the above generated files in C++, please see ``_ -It is able to generate a static linked library that can be run on Linux, Windows, -macOS, Raspberry Pi, etc. +It is able to generate a static linked executable that can be run on Linux, Windows, +macOS, Raspberry Pi, etc, without external dependencies. Download pretrained models -------------------------- diff --git a/objects.inv b/objects.inv index b0de8a293a63a5bdf7356771c0f6f875bc8bfdb5..622ff5f6a347feeb2362ed853bec6104db353214 100644 GIT binary patch delta 530 zcmV+t0`2|H1iTK0m2}!Q$WN1Z`5TJnHvZ3|>Fe4}yOa#(=bDjYMxSuh-)XSA*IQ+JWC{5fJ%QOG}CZVSrA~%$z2_3s-C%F4!&wn3zIpgC zz)8I!l}`8WIY0gD`kv_@UHG6An+%l}x0x-TY?OxCS>AG+Pc5KFmCb*4bDVVJFkb6E zXDwA1y5c|HeQvo75`ikd*rHe3)+0rn|9`s)H#3@X(34(< Ue4q0$S;=bn{KUw=TEha*3myUu_5c6? delta 527 zcmV+q0`UFM1mO+YEmeO<&h;+NER=pDQA#j6UI@ztdoK$t6^@bzXmj$!SG} zsJqudC!8Q2$eYgn%xWSV86=1o(b@bY7+gvrT#d2rH{tj>3~wUG+vkO`ns9n++IV$E z+!R_!N`?|Hh{P(pE4>levsG2^t^+RBV;9=?SKBBVcH@;dFC{k(2;nZGyeQp*J~10S zw+{>NPXIz>eOyP%Q6k9#RGNRFNW(>CL4YwQcXgzxdgg{bkWAI%gu{&?$2${^vz3%5 zVQjk;Mo@?Yj<35NeLEbtK^WN(yu-gEbng-Tthwm`ShKvIZ1JNN`Au1eQ4uP>4e()v zlX_z+o$lRpe)`w-J<~s>9WT)rSzKhcc(zRH$7XrUZ9XuMo>Vs5&2fL$jl+1Y`<%5@ zo$reOc>k5KwRq%2*`vc=!AO-qtVg5DZ!kMG>mG*Xn+Mi&Fbp?PYSx5bYluxxG4lJe zhGLdvZ-zH|H-F27T8kO428@mvbr^N3?tchR72j#W+iW`^MVSA8yYV+OnQ_pQUdDW% R^DtY
  • LibriSpeech
  • TIMIT
      diff --git a/recipes/librispeech/conformer_ctc.html b/recipes/librispeech/conformer_ctc.html index b3dc3df78..41f0824a5 100644 --- a/recipes/librispeech/conformer_ctc.html +++ b/recipes/librispeech/conformer_ctc.html @@ -19,7 +19,7 @@ - + @@ -54,7 +54,7 @@
    • Deployment with C++
  • -
  • Transducer
  • +
  • LSTM Transducer
  • TIMIT
  • @@ -1087,7 +1087,7 @@ Please see - +
    diff --git a/recipes/librispeech/index.html b/recipes/librispeech/index.html index 1e8ffe6a2..3cf6bb283 100644 --- a/recipes/librispeech/index.html +++ b/recipes/librispeech/index.html @@ -46,7 +46,7 @@
  • LibriSpeech
  • TIMIT
  • @@ -88,7 +88,7 @@ diff --git a/recipes/librispeech/lstm_pruned_stateless_transducer.html b/recipes/librispeech/lstm_pruned_stateless_transducer.html index 0f2bb88a6..6e59b9a85 100644 --- a/recipes/librispeech/lstm_pruned_stateless_transducer.html +++ b/recipes/librispeech/lstm_pruned_stateless_transducer.html @@ -4,7 +4,7 @@ - Transducer — icefall 0.1 documentation + LSTM Transducer — icefall 0.1 documentation