-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7864d43
Showing
907 changed files
with
299,003 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: eeb410131c31d1c4293c5eb892dfafc5 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)' |
Oops, something went wrong.