mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-12 11:32:17 +00:00
Update readme.
This commit is contained in:
parent
7563aba767
commit
6e87bb8085
@ -17,10 +17,6 @@
|
||||
name: Nightly tests ubuntu conda cpu
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- nightly-test-2
|
||||
|
||||
schedule:
|
||||
# minute (0-59)
|
||||
# hour (0-23)
|
||||
|
@ -17,10 +17,6 @@
|
||||
name: Nightly tests ubuntu conda cuda
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- nightly-test-2
|
||||
|
||||
schedule:
|
||||
# minute (0-59)
|
||||
# hour (0-23)
|
||||
|
@ -48,7 +48,7 @@ jobs:
|
||||
needs: generate_build_matrix
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
fail-fast: true
|
||||
fail-fast: false
|
||||
matrix:
|
||||
${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
|
||||
|
||||
|
@ -17,10 +17,6 @@
|
||||
name: Nightly tests windows pip cuda
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- nightly-test
|
||||
|
||||
schedule:
|
||||
# minute (0-59)
|
||||
# hour (0-23)
|
||||
|
4
.github/workflows/run-tests-ubuntu-cuda.yml
vendored
4
.github/workflows/run-tests-ubuntu-cuda.yml
vendored
@ -39,8 +39,8 @@ jobs:
|
||||
id: set-matrix
|
||||
run: |
|
||||
# outputting for debugging purposes
|
||||
python scripts/github_actions/generate_build_matrix.py --enable-cuda
|
||||
MATRIX=$(python scripts/github_actions/generate_build_matrix.py --enable-cuda)
|
||||
python scripts/github_actions/generate_build_matrix.py --enable-cuda --test-only-latest-torch
|
||||
MATRIX=$(python scripts/github_actions/generate_build_matrix.py --enable-cuda --test-only-latest-torch)
|
||||
echo "::set-output name=matrix::${MATRIX}"
|
||||
|
||||
run_tests_ubuntu_cuda:
|
||||
|
5
.github/workflows/run-tests-windows-cuda.yml
vendored
5
.github/workflows/run-tests-windows-cuda.yml
vendored
@ -20,7 +20,6 @@ name: Run tests windows cuda
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- nightly-test
|
||||
- master
|
||||
|
||||
pull_request:
|
||||
@ -41,8 +40,8 @@ jobs:
|
||||
id: set-matrix
|
||||
run: |
|
||||
# outputting for debugging purposes
|
||||
python scripts/github_actions/generate_build_matrix.py --enable-cuda --for-windows
|
||||
MATRIX=$(python scripts/github_actions/generate_build_matrix.py --enable-cuda --for-windows)
|
||||
python scripts/github_actions/generate_build_matrix.py --enable-cuda --for-windows --test-only-latest-torch
|
||||
MATRIX=$(python scripts/github_actions/generate_build_matrix.py --enable-cuda --for-windows --test-only-latest-torch)
|
||||
echo "::set-output name=matrix::${MATRIX}"
|
||||
|
||||
run_tests_windows_cuda:
|
||||
|
70
README.md
70
README.md
@ -1,7 +1,7 @@
|
||||
# kaldifeat
|
||||
|
||||
<div align="center">
|
||||
<img src="/doc/source/images/os.svg">
|
||||
<img src="/doc/source/images/os-green.svg">
|
||||
<img src="/doc/source/images/python_ge_3.6-blue.svg">
|
||||
<img src="/doc/source/images/pytorch_ge_1.5.0-green.svg">
|
||||
<img src="/doc/source/images/cuda_ge_10.1-orange.svg">
|
||||
@ -268,15 +268,22 @@ See <https://github.com/k2-fsa/k2/blob/v2.0-pre/k2/torch/csrc/features.cu>.
|
||||
|
||||
See <https://github.com/lhotse-speech/lhotse/blob/master/lhotse/features/kaldifeat.py>.
|
||||
|
||||
## sherpa
|
||||
|
||||
[sherpa](https://github.com/k2-fsa/sherpa) uses kaldifeat for streaming feature
|
||||
extraction.
|
||||
|
||||
See <https://github.com/k2-fsa/sherpa/blob/master/sherpa/bin/pruned_stateless_emformer_rnnt2/decode.py>
|
||||
|
||||
# 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
|
||||
```
|
||||
|
8
doc/source/images/README.md
Normal file
8
doc/source/images/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
## File description
|
||||
|
||||
<https://shields.io/> 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
|
1
doc/source/images/os-green.svg
Normal file
1
doc/source/images/os-green.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="176" height="20" role="img" aria-label="os: Linux | macOS | Windows"><title>os: Linux | macOS | Windows</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="176" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="23" height="20" fill="#555"/><rect x="23" width="153" height="20" fill="#97ca00"/><rect width="176" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="125" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="130">os</text><text x="125" y="140" transform="scale(.1)" fill="#fff" textLength="130">os</text><text aria-hidden="true" x="985" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="1430">Linux | macOS | Windows</text><text x="985" y="140" transform="scale(.1)" fill="#fff" textLength="1430">Linux | macOS | Windows</text></g></svg>
|
After Width: | Height: | Size: 1.2 KiB |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="118" height="20" role="img" aria-label="OS: Linux | macOS"><title>OS: Linux | macOS</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="118" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="27" height="20" fill="#555"/><rect x="27" width="91" height="20" fill="#4c1"/><rect width="118" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="145" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="170">OS</text><text x="145" y="140" transform="scale(.1)" fill="#fff" textLength="170">OS</text><text aria-hidden="true" x="715" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="810">Linux | macOS</text><text x="715" y="140" transform="scale(.1)" fill="#fff" textLength="810">Linux | macOS</text></g></svg>
|
Before Width: | Height: | Size: 1.1 KiB |
Loading…
x
Reference in New Issue
Block a user