From e64fb3ac19603e406c5c82ac6d4e5aa1fcb711a5 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Wed, 13 Dec 2023 14:34:04 +0800 Subject: [PATCH] Update the android doc for sherpa-onnx to include tts (#517) --- .../source/onnx/android/build-sherpa-onnx.rst | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/source/onnx/android/build-sherpa-onnx.rst b/docs/source/onnx/android/build-sherpa-onnx.rst index 1bd594547..4e691ba89 100644 --- a/docs/source/onnx/android/build-sherpa-onnx.rst +++ b/docs/source/onnx/android/build-sherpa-onnx.rst @@ -3,6 +3,41 @@ Build sherpa-onnx for Android ============================= +You can use this section for both ``speech-to-text`` (STT, ASR) +and ``text-to-speech`` (TTS). + +.. hint:: + + The build scripts mentioned in this section run on both Linux and macOS. + + If you are using Windows or if you don't want to build the shared libraries, + you can download pre-built shared libraries by visiting the release page + ``_ + + For instance, for the relase ``v1.9.0``, you can visit + ``_ + and download the file ``sherpa-onnx-v1.9.0-android.tar.bz2`` + using the following command: + + .. code-block:: bash + + wget https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.9.0/sherpa-onnx-v1.9.0-android.tar.bz2 + + Please always use the latest release. + +.. hint:: + + This section is originally written for speech-to-text. However, it is + also applicable to other folders in ``_. + + For instance, you can replace ``SherpaOnnx`` in this section with + + - ``SherpaOnnx2Pass`` + - ``SherpaOnnxTts`` (this is for text-to-speech) + - ``SherpaOnnxVad`` + - ``SherpaOnnxVadAsr`` + + Install Android Studio ---------------------- @@ -156,6 +191,12 @@ You should see the following screen shot after running the above copy ``cp`` com :alt: Generated shared libraries for arm64-v8a :width: 600 +.. hint:: + + You may see more files than it is shown in the screenshot. That is totally fine + since we are extending `sherpa-onnx`_. The first thing to remember is to always + use the wildcard ``lib*.so`` in the ``cp`` command. + Build for armv7-eabi ^^^^^^^^^^^^^^^^^^^^ @@ -337,6 +378,10 @@ libraries, is only ``5.4 MB``. Please refer to ``_ for a custom build to reduce the file size of ``libonnxruntime.so``. + Note that we are constantly updating the version of ``onnxruntime``. By + the time you are reading this section, we may be using the latest version + of ``onnxruntime``. + .. hint:: We recommend you to use `sherpa-ncnn`_. Please see