deploy: e916027bfe2b92e9ecab2d2ae90f75acbc89dd4c

This commit is contained in:
csukuangfj 2023-02-09 02:34:21 +00:00
parent 9f96cbe02f
commit e51585b710
3 changed files with 13 additions and 11 deletions

View File

@ -1,20 +1,21 @@
Export to ONNX Export to ONNX
============== ==============
In this section, we describe how to export the following models to ONNX. In this section, we describe how to export models to `ONNX`_.
In each recipe, there is a file called ``export-onnx.py``, which is used In each recipe, there is a file called ``export-onnx.py``, which is used
to export trained models to ONNX. to export trained models to `ONNX`_.
There is also a file named ``onnx_pretrained.py``, which you can use There is also a file named ``onnx_pretrained.py``, which you can use
the exported ONNX model in Python to decode sound files. the exported `ONNX`_ model in Python with `onnxruntime`_ to decode sound files.
Example Example
======= =======
In the following, we demonstrate how to export a streaming Zipformer pre-trained In the following, we demonstrate how to export a streaming Zipformer pre-trained
model from `<python3 ./python-api-examples/speech-recognition-from-microphone.py>`_ model from
to ONNX. `<https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11>`_
to `ONNX`_.
Download the pre-trained model Download the pre-trained model
------------------------------ ------------------------------

View File

@ -95,17 +95,18 @@
<section id="export-to-onnx"> <section id="export-to-onnx">
<h1>Export to ONNX<a class="headerlink" href="#export-to-onnx" title="Permalink to this heading"></a></h1> <h1>Export to ONNX<a class="headerlink" href="#export-to-onnx" title="Permalink to this heading"></a></h1>
<p>In this section, we describe how to export the following models to ONNX.</p> <p>In this section, we describe how to export models to <a class="reference external" href="https://github.com/onnx/onnx">ONNX</a>.</p>
<p>In each recipe, there is a file called <code class="docutils literal notranslate"><span class="pre">export-onnx.py</span></code>, which is used <p>In each recipe, there is a file called <code class="docutils literal notranslate"><span class="pre">export-onnx.py</span></code>, which is used
to export trained models to ONNX.</p> to export trained models to <a class="reference external" href="https://github.com/onnx/onnx">ONNX</a>.</p>
<p>There is also a file named <code class="docutils literal notranslate"><span class="pre">onnx_pretrained.py</span></code>, which you can use <p>There is also a file named <code class="docutils literal notranslate"><span class="pre">onnx_pretrained.py</span></code>, which you can use
the exported ONNX model in Python to decode sound files.</p> the exported <a class="reference external" href="https://github.com/onnx/onnx">ONNX</a> model in Python with <a class="reference external" href="https://github.com/microsoft/onnxruntime">onnxruntime</a> to decode sound files.</p>
</section> </section>
<section id="example"> <section id="example">
<h1>Example<a class="headerlink" href="#example" title="Permalink to this heading"></a></h1> <h1>Example<a class="headerlink" href="#example" title="Permalink to this heading"></a></h1>
<p>In the following, we demonstrate how to export a streaming Zipformer pre-trained <p>In the following, we demonstrate how to export a streaming Zipformer pre-trained
model from <a class="reference external" href="python3./python-api-examples/speech-recognition-from-microphone.py">python3./python-api-examples/speech-recognition-from-microphone.py</a> model from
to ONNX.</p> <a class="reference external" href="https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11">https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11</a>
to <a class="reference external" href="https://github.com/onnx/onnx">ONNX</a>.</p>
<section id="download-the-pre-trained-model"> <section id="download-the-pre-trained-model">
<h2>Download the pre-trained model<a class="headerlink" href="#download-the-pre-trained-model" title="Permalink to this heading"></a></h2> <h2>Download the pre-trained model<a class="headerlink" href="#download-the-pre-trained-model" title="Permalink to this heading"></a></h2>
<div class="admonition hint"> <div class="admonition hint">

File diff suppressed because one or more lines are too long