Skip to content

Commit

Permalink
deploy: e24568e
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Oct 13, 2024
0 parents commit 2b8b5fd
Show file tree
Hide file tree
Showing 790 changed files with 246,463 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 02fb259b3c10616edf9e48803ed39b3a
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added .nojekyll
Empty file.
Binary file added _images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/2023-01-09-fp32-decoding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/2023-01-09-int8-decoding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-an-account-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-an-account-21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-an-account-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-an-account-31.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-an-account-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-an-account-41.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-an-account-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-an-account-51.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-an-account.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-an-account1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-framework-to-your-project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/add-other.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/after-finishing-build.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/after-finishing-build1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/analyze-apk-result.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/analyze-apk-result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/analyze-apk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/analyze-apk1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/android-studio-version.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/android-studio-version1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/arecord.jpg
Binary file added _images/build-make-project.png
Binary file added _images/build-make-project1.png
Binary file added _images/client-1.jpg
Binary file added _images/client-2.jpg
Binary file added _images/client-3.jpg
Binary file added _images/client-4.jpg
Binary file added _images/client-5.jpg
Binary file added _images/context_graph.png
1 change: 1 addition & 0 deletions _images/cuda_ge_10.1-orange.svg
Binary file added _images/emformer-streaming-asr-web-client.png
Binary file added _images/error-no-model.png
Binary file added _images/error-no-model1.png
Binary file added _images/header-search-path.png
Binary file added _images/hf-space.png
Binary file added _images/hugging-face-sherpa-2.png
Binary file added _images/hugging-face-sherpa-3.png
Binary file added _images/hugging-face-sherpa.png
Binary file added _images/link-libc++.png
Binary file added _images/linux-x64.jpg
Binary file added _images/lscpu.jpg
Binary file added _images/lscpu2.jpg
Binary file added _images/lscpu21.jpg
Binary file added _images/macos-x64.jpg
Binary file added _images/microphone-alsa.jpg
Binary file added _images/ndk-tools.png
Binary file added _images/ndk-tools1.png
Binary file added _images/open-sherpa-ncnn.png
Binary file added _images/open-sherpa-onnx.png
1 change: 1 addition & 0 deletions _images/os-brightgreen.svg
Binary file added _images/pre-trained-model-1.png
Binary file added _images/pre-trained-model-11.png
Binary file added _images/pre-trained-model-2022-12-06.png
Binary file added _images/pre-trained-model-2023-02-20.png
Binary file added _images/pub-dev.png
1 change: 1 addition & 0 deletions _images/python_ge_3.7-blue.svg
1 change: 1 addition & 0 deletions _images/pytorch_ge_1.6.0-blueviolet.svg
Binary file added _images/qq-group-for-next-gen-kaldi.jpg
Binary file added _images/raspberrypi_3b_shot_1.png
Binary file added _images/raspberrypi_3b_shot_2.png
Binary file added _images/raspberrypi_3b_shot_4.png
Binary file added _images/raspberrypi_3b_shot_5.png
Binary file added _images/rtf-1-thread.jpg
Binary file added _images/rtf-2-threads.jpg
Binary file added _images/rtf-2-threads1.jpg
Binary file added _images/rtf-4-threads.jpg
Binary file added _images/rtf-4-threads1.jpg
Binary file added _images/rtf-6-threads.jpg
Binary file added _images/rtf.jpg
Binary file added _images/rule1.png
Binary file added _images/rule2.png
Binary file added _images/rule3.png
Binary file added _images/run-2.png
Binary file added _images/run-21.png
Binary file added _images/run-3.png
Binary file added _images/run-31.png
Binary file added _images/run-4.jpg
Binary file added _images/run-4.png
Binary file added _images/run-5.jpg
Binary file added _images/run-5.png
Binary file added _images/run-6.jpg
Binary file added _images/run-7.jpg
Binary file added _images/run-the-project.png
Binary file added _images/run-the-project1.png
Binary file added _images/run.png
Binary file added _images/run1.png
Binary file added _images/select-device-2.png
Binary file added _images/select-device-21.png
Binary file added _images/select-device.png
Binary file added _images/select-device1.png
Binary file added _images/select-product-build.png
Binary file added _images/select-product-build1.png
Binary file added _images/select-sdk-manager.png
Binary file added _images/select-sdk-manager1.png
Binary file added _images/sense-voice-hf-space.jpg
Binary file added _images/set-bridging-header.png
Binary file added _images/set-framework-search-path.png
Binary file added _images/so-libs-for-arm64-v8a.jpg
Binary file added _images/so-libs-for-arm64-v8a.png
Binary file added _images/so-libs-for-armeabi-v7a.png
Binary file added _images/so-libs-for-armv7a-eabi.jpg
Binary file added _images/so-libs-for-x86-64.jpg
Binary file added _images/so-libs-for-x86-64.png
Binary file added _images/so-libs-for-x86.jpg
Binary file added _images/start-android-studio.png
Binary file added _images/start-android-studio1.png
Binary file added _images/start-xcode-for-sherpa-ncnn.png
Binary file added _images/start-xcode-for-sherpa-onnx.png
Binary file added _images/step-to-add-pre-trained-model-1.png
Binary file added _images/step-to-add-pre-trained-model-11.png
Binary file added _images/step-to-add-pre-trained-model-2.png
Binary file added _images/step-to-add-pre-trained-model-21.png
Binary file added _images/step-to-add-pre-trained-model-3.png
Binary file added _images/step-to-add-pre-trained-model-31.png
Binary file added _images/step-to-add-pre-trained-model-4.png
Binary file added _images/step-to-add-pre-trained-model-41.png
Binary file added _images/streaming-1.png
Binary file added _images/streaming-2.png
Binary file added _images/utf8-setting.jpg
Binary file added _images/visit.png
Binary file added _images/visit2.png
Binary file added _images/wasm-asr-sherpa-onnx-1.png
Binary file added _images/wasm-asr-sherpa-onnx-2.png
Binary file added _images/wasm-hf-en.png
Binary file added _images/wasm-hf-en1.png
Binary file added _images/wasm-hf-tts-de.png
Binary file added _images/wasm-hf-tts-en.png
Binary file added _images/wasm-hf-zh-en-paraformer.png
Binary file added _images/wasm-hf-zh-en-zipformer.png
Binary file added _images/wasm-hf-zh-en.png
Binary file added _images/wasm-hf-zh-yue-en-paraformer.png
Binary file added _images/wasm-sherpa-ncnn-1.png
Binary file added _images/wasm-sherpa-ncnn-2.png
Binary file added _images/wasm-sherpa-onnx-tts-1.png
Binary file added _images/wasm-sherpa-onnx-tts-2.png
Binary file added _images/wechat-group-for-next-gen-kaldi.jpg
Binary file added _images/wechat-group-for-next-gen-kaldi1.jpg
Binary file added _images/wenet-models-onnx-list.jpg
Binary file added _images/whisper-colab.png
Binary file added _images/whisper-hf.png
Binary file added _images/windows-x64.jpg
Binary file added _images/xcode-settings.png
Binary file added _images/xcode-settings1.png
86 changes: 86 additions & 0 deletions _sources/cpp/installation/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
.. _cpp_installation:

Installation
============

Before installing `sherpa`_, we assume you have installed:

- `PyTorch`_
- `k2`_
- `kaldifeat`_

You can use the following commands to install `sherpa`_:

.. code-block:: bash
git clone http://github.com/k2-fsa/sherpa
cd sherpa
python3 setup.py bdist_wheel
ls -lh dist
pip install ./dist/k2_sherpa*.whl
.. caution::

Please don't use ``python3 setup.py install``. Otherwise, you won't get
`sherpa`_ related binaries installed, such as ``sherpa-offline`` and
``sherpa-online``.

To uninstall `sherpa`_, please use

.. code-block:: bash
pip uninstall k2-sherpa
To test that you have installed `sherpa`_ successfully, you can run the
following commands:

.. code-block:: bash
sherpa-version
sherpa-offline --help
sherpa-online --help
sherpa-online-microphone --help
sherpa-offline-websocket-server --help
sherpa-offline-websocket-client --help
sherpa-online-websocket-server --help
sherpa-online-websocket-client --help
sherpa-online-websocket-client-microphone --help
If you have any issues about the installation, please create an issue
at the following address:

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

.. hint::

If you have a `WeChat <https://www.wechat.com/>`_ account, you can scan
the following QR code to join the WeChat group of next-gen Kaldi to get
help.

.. image:: pic/wechat-group-for-next-gen-kaldi.jpg
:width: 200
:align: center
:alt: WeChat group of next-gen Kaldi


Installation for advanced users/developers
------------------------------------------

As an advanced user/developer, you can use the following method to
install `sherpa`_:


.. code-block:: bash
git clone http://github.com/k2-fsa/sherpa
cd sherpa
mkdir build
cd build
cmake ..
make -j
export PATH=$PWD/bin:$PATH
export PYTHONPATH=$PWD/lib:$PWD/../sherpa/python:$PYTHONPATH
76 changes: 76 additions & 0 deletions _sources/cpp/offline_asr/api.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
C++ APIs
========

We provide C++ APIs for non-streaming ASR
in
`a single header file <https://github.com/k2-fsa/sherpa/blob/master/sherpa/cpp_api/offline_recognizer.h>`_.

`<https://github.com/k2-fsa/sherpa-torch-cpp-makefile-example>`_
gives an example of how to use the APIs to decode wave files.

.. hint::

You can find more examples in
`<https://github.com/k2-fsa/sherpa/tree/master/sherpa/cpp_api>`_

The content of the `Makefile <https://github.com/k2-fsa/sherpa-torch-cpp-makefile-example/blob/master/Makefile>`_
from the above repository is given below:

.. code-block:: makefile
sherpa_install_dir := $(shell python3 -c 'import os; import sherpa; print(os.path.dirname(sherpa.__file__))')
sherpa_cxx_flags := $(shell python3 -c 'import os; import sherpa; print(sherpa.cxx_flags)')
$(info sherpa_install_dir: $(sherpa_install_dir))
$(info sherpa_cxx_flags: $(sherpa_cxx_flags))
CXXFLAGS := -I$(sherpa_install_dir)/include
CXXFLAGS += -Wl,-rpath,$(sherpa_install_dir)/lib
CXXFLAGS += $(sherpa_cxx_flags)
CXXFLAGS += -std=c++14
LDFLAGS := -L $(sherpa_install_dir)/lib -lsherpa_offline_recognizer
$(info CXXFLAGS: $(CXXFLAGS))
$(info LDFLAGS: $(LDFLAGS))
test_decode_files: test_decode_files.cc
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS)
.PHONY: clean
clean:
$(RM) test_decode_files
Basically, you only need to specify the following stuff to use the non-streaming
ASR APIs:

- The path to find the header file. You provide:

.. code-block:: makefile
CXXFLAGS := -I$(sherpa_install_dir)/include
- The library to link to. You provide:

.. code-block:: makefile
LDFLAGS := -L $(sherpa_install_dir)/lib -lsherpa_offline_recognizer
- The CXX flags used to compile ``sherpa``. You provide:

.. code-block:: makefile
CXXFLAGS += $(sherpa_cxx_flags)
.. hint::

This one is important. For instance, if ``sherpa`` was compiled with
``-D_GLIBCXX_USE_CXX11_ABI=0`` on Linux, you will get link errors like
the below one if you don't use this option in your project.

.. code-block::
test_decode_files.cc:(.text+0x149): undefined reference to
`sherpa::OfflineRecognizer::OfflineRecognizer(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, sherpa::DecodingOptions const&, bool, float)'
Loading

0 comments on commit 2b8b5fd

Please sign in to comment.