C API Usage example
===================

Examples are from `native_client/client.cc`.

Creating a model instance and loading model
-------------------------------------------

.. literalinclude:: ../native_client/client.cc
   :language: c
   :start-after: sphinx-doc: c_ref_model_1_start
   :end-before: sphinx-doc: c_ref_model_1_stop

.. literalinclude:: ../native_client/client.cc
   :language: c
   :start-after: sphinx-doc: c_ref_model_2_start
   :end-before: sphinx-doc: c_ref_model_2_stop

Transcribing audio with the loaded model
----------------------------------------

.. literalinclude:: ../native_client/client.cc
   :language: c
   :linenos:
   :lineno-match:
   :start-after: sphinx-doc: c_ref_inference_start
   :end-before: sphinx-doc: c_ref_inference_stop

Full source code
----------------

See :download:`Full source code<../native_client/client.cc>`.
