Skip to content

Commit

Permalink
Add colab notebooks for Android build (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Dec 24, 2023
1 parent 009ade8 commit 4e13304
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/source/ncnn/android/build-sherpa-ncnn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Android ABIs:
- ``arm64-v8a``
- ``armeabi-v7a``
- ``x86_64``
- ``x86``

.. caution::

Expand All @@ -139,6 +140,18 @@ Android ABIs:

`<https://github.com/k2-fsa/sherpa-ncnn/releases>`_

.. hint::

We provide a colab notebook
|build sherpa-ncnn for android colab notebook|
for you to try this section step by step.

If you are using Windows or you don't want to setup your local environment
to build the C++ libraries, please use the above colab notebook.

.. |build sherpa-ncnn for android colab notebook| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://github.com/k2-fsa/colab/blob/master/sherpa-ncnn/build_sherpa_ncnn_for_android.ipynb

Build for arm64-v8a
^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -244,6 +257,14 @@ You should see the following screen shot after running the above copy ``cp`` com
:alt: Generated shared libraries for x86_64
:width: 600

Build for x86
^^^^^^^^^^^^^

.. code-block:: bash
cd sherpa-ncnn # Go to the root repo
./build-android-x86.sh
Download pre-trained models
---------------------------

Expand Down
29 changes: 29 additions & 0 deletions docs/source/onnx/android/build-sherpa-onnx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ Android ABIs:
- ``arm64-v8a``
- ``armv7-eabi``
- ``x86_64``
- ``x86``

.. caution::

Expand All @@ -160,6 +161,26 @@ Android ABIs:

If you want to test the app on an emulator, you probably need ``x86_64``.

.. hint::

Building scripts for this section are for macOS and Linux. If you are
using Windows or if you don't want to build the shared libraries by yourself,
you can download pre-compiled shared libraries for this section by visiting

`<https://github.com/k2-fsa/sherpa-onnx/releases>`_

.. hint::

We provide a colab notebook
|build sherpa-onnx for android colab notebook|
for you to try this section step by step.

If you are using Windows or you don't want to setup your local environment
to build the C++ libraries, please use the above colab notebook.

.. |build sherpa-onnx for android colab notebook| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://github.com/k2-fsa/colab/blob/master/sherpa-onnx/build_sherpa_onnx_for_android.ipynb

Build for arm64-v8a
^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -260,6 +281,14 @@ You should see the following screen shot after running the above copy ``cp`` com
:alt: Generated shared libraries for x86_64
:width: 600

Build for x86
^^^^^^^^^^^^^

.. code-block:: bash
cd sherpa-onnx # Go to the root repo
./build-android-x86.sh
Download pre-trained models
---------------------------

Expand Down

0 comments on commit 4e13304

Please sign in to comment.