-
+
@@ -268,15 +268,22 @@ See .
See .
+## sherpa
+
+[sherpa](https://github.com/k2-fsa/sherpa) uses kaldifeat for streaming feature
+extraction.
+
+See
+
# Installation
-## From conda (Only for Linux + CUDA)
+## From conda (Only for Linux)
Supported versions of Python, PyTorch, and CUDA toolkit are listed below:
-[](/doc/source/images/python-3.6_3.7_3.8-blue.svg)
-[](/doc/source/images/pytorch-1.6.0_1.7.0_1.7.1_1.8.0_1.8.1_1.9.0-green.svg)
-[](/doc/source/images/cuda-10.1_10.2_11.0_11.1-orange.svg)
+[](/doc/source/images/python_ge_3.6-blue.svg)
+[](/doc/source/images/pytorch_ge_1.5.0-green.svg)
+[](/doc/source/images/cuda_ge_10.1-orange.svg)
```bash
conda install -c kaldifeat -c pytorch -c conda-forge kaldifeat python=3.8 cudatoolkit=11.1 pytorch=1.8.1
@@ -284,11 +291,17 @@ conda install -c kaldifeat -c pytorch -c conda-forge kaldifeat python=3.8 cudato
You can select the supported Python version, CUDA toolkit version and PyTorch version as you wish.
-**Note:** If you want a CPU only version or want to install `kaldifeat` on other operating systems,
-e.g., macOS, please use `pip install` or compile `kaldifeat` from source.
+To install a CPU version, use
+
+```bash
+conda install -c kaldifeat -c pytorch cpuonly kaldifeat python=3.8 pytorch=1.8.1
+```
-## From PyPi with pip
+**Note:** If you want to install `kaldifeat` on macOS or Windows, please
+use either `pip install -v kaldifeat` or compile `kaldifeat` from source.
+
+## From PyPi with pip (Support Linux/macOS/Windows)
You need to install PyTorch and CMake first.
CMake 3.11 is known to work. Other CMake versions may also work.
@@ -298,7 +311,7 @@ PyTorch 1.6.0 and above are known to work. Other PyTorch versions may also work.
pip install -v kaldifeat
```
-## From source
+## From source (Support Linux/macOS/Windows)
The following are the commands to compile `kaldifeat` from source.
We assume that you have installed `CMake` and PyTorch.
@@ -321,14 +334,41 @@ python3 -c "import kaldifeat; print(kaldifeat.__version__)"
### How to install a CUDA version
-There are two approaches:
+You need to first install a CUDA version of PyTorch and then install `kaldifeat`.
- - (1) Install using `conda`. It always installs a CUDA version of kaldifeat.
- - (2) Install a CUDA version of PyTorch and then install kaldifeat from source
- or use `pip install kaldifeat`.
+**Note**: You can use a CUDA version of kaldifeat on machines with no GPUs.
### How to install a CPU-only version
-You have to first install a CPU-only version of PyTorch and then install kaldifeat
-from source or use `pip install kaldifeat`.
+You need to first install a CPU version of PyTorch and then install `kaldifeat`.
+
+### How to fix `Caffe2: Cannot find cuDNN library`
+
+```
+ Your installed Caffe2 version uses cuDNN but I cannot find the cuDNN
+ libraries. Please set the proper cuDNN prefixes and / or install cuDNN.
+```
+
+This error happens when you want to install a CUDA version of kaldifeat
+by `pip install kaldifeat` or from source.
+
+You need to first install cuDNN. Assume you have installed cuDNN to the
+path `/path/to/cudnn`. You can fix the error by the following commands.
+
+(1) Fix for installation using `pip install`
+
+```bash
+export KALDIFEAT_CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release -DCUDNN_LIBRARY_PATH=/path/to/cudnn/lib/libcudnn.so -DCUDNN_INCLUDE_PATH=/path/to/cudnn/include"
+pip install --verbose kaldifeat
+```
+
+(2) Fix for installation from source
+
+```bash
+mkdir /some/path
+git clone https://github.com/csukuangfj/kaldifeat.git
+cd kaldifeat
+export KALDIFEAT_CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release -DCUDNN_LIBRARY_PATH=/path/to/cudnn/lib/libcudnn.so -DCUDNN_INCLUDE_PATH=/path/to/cudnn/include"
+python setup.py install
+```
diff --git a/doc/source/images/README.md b/doc/source/images/README.md
new file mode 100644
index 0000000..542998b
--- /dev/null
+++ b/doc/source/images/README.md
@@ -0,0 +1,8 @@
+## File description
+
+ is used to create the following files:
+
+- ./os.svg
+- ./python_ge_3.6-blue.svg
+- ./cuda_ge_10.1-orange.svg
+- ./pytorch_ge_1.5.0-green.svg
diff --git a/doc/source/images/os-green.svg b/doc/source/images/os-green.svg
new file mode 100644
index 0000000..b78017a
--- /dev/null
+++ b/doc/source/images/os-green.svg
@@ -0,0 +1 @@
+
diff --git a/doc/source/images/os.svg b/doc/source/images/os.svg
deleted file mode 100644
index 314bf44..0000000
--- a/doc/source/images/os.svg
+++ /dev/null
@@ -1 +0,0 @@
-