зеркало из https://github.com/mozilla/DeepSpeech.git
32 строки
787 B
ReStructuredText
32 строки
787 B
ReStructuredText
.. _py-api-example:
|
|
|
|
Python API Usage example
|
|
========================
|
|
|
|
Examples are from `native_client/python/client.py`.
|
|
|
|
Creating a model instance and loading model
|
|
-------------------------------------------
|
|
|
|
.. literalinclude:: ../native_client/python/client.py
|
|
:language: python
|
|
:linenos:
|
|
:lineno-match:
|
|
:start-after: sphinx-doc: python_ref_model_start
|
|
:end-before: sphinx-doc: python_ref_model_stop
|
|
|
|
Performing inference
|
|
--------------------
|
|
|
|
.. literalinclude:: ../native_client/python/client.py
|
|
:language: python
|
|
:linenos:
|
|
:lineno-match:
|
|
:start-after: sphinx-doc: python_ref_inference_start
|
|
:end-before: sphinx-doc: python_ref_inference_stop
|
|
|
|
Full source code
|
|
----------------
|
|
|
|
See :download:`Full source code<../native_client/python/client.py>`.
|