diff --git a/.github/workflows/build_conda_macos_cpu.yml b/.github/workflows/build_conda_macos_cpu.yml
deleted file mode 100644
index 810c413..0000000
--- a/.github/workflows/build_conda_macos_cpu.yml
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 2021 Xiaomi Corp. (author: Fangjun Kuang)
-
-# See ../../LICENSE for clarification regarding multiple authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# refer to https://github.com/actions/starter-workflows/pull/47/files
-
-name: build_conda_macos_cpu
-
-on:
- push:
- tags:
- - '*'
-
-env:
- KALDIFEAT_BUILD_TYPE: Release
-
-jobs:
- generate_build_matrix:
- # see https://github.com/pytorch/pytorch/pull/50633
- runs-on: ubuntu-latest
- outputs:
- matrix: ${{ steps.set-matrix.outputs.matrix }}
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Generating build matrix
- id: set-matrix
- run: |
- # outputting for debugging purposes
- python scripts/github_actions/generate_build_matrix.py
- MATRIX=$(python scripts/github_actions/generate_build_matrix.py)
- echo "::set-output name=matrix::${MATRIX}"
-
- build_conda_macos_cpu:
- needs: generate_build_matrix
- runs-on: macos-10.15
- strategy:
- fail-fast: false
- matrix:
- ${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
-
- steps:
- # refer to https://github.com/actions/checkout
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - name: Display clang version
- run: |
- clang --version
-
- - uses: conda-incubator/setup-miniconda@v2
- with:
- auto-update-conda: true
- python-version: ${{ matrix.python-version }}
- activate-environment: kaldifeat
-
- - name: Display Python version
- shell: bash -l {0}
- run: |
- python3 -c "import sys; print(sys.version)"
- which python3
-
- - name: Install conda dependencies
- shell: bash -l {0}
- run: |
- conda install -y -q anaconda-client
- conda install -y -q conda-build
- conda install -y -q -c pytorch pytorch=${{ matrix.torch }} cpuonly
-
- - name: Display conda info
- shell: bash -l {0}
- run: |
- which conda
- conda env list
- conda info
-
- - name: Build kaldifeat
- shell: bash -l {0}
- env:
- KALDIFEAT_PYTHON_VERSION: ${{ matrix.python-version}}
- KALDIFEAT_TORCH_VERSION: ${{ matrix.torch }}
- KALDIFEAT_CONDA_TOKEN: ${{ secrets.KALDIFEAT_CONDA_TOKEN}}
- KALDIFEAT_IS_GITHUB_ACTIONS: 1
- KALDIFEAT_IS_FOR_CONDA: 1
- run: |
- export KALDIFEAT_BUILD_TYPE=$KALDIFEAT_BUILD_TYPE
- ./scripts/build_conda_cpu.sh
-
- - name: Display generated files
- run: |
- ls -lh /usr/local/miniconda/envs/kaldifeat/conda-bld/osx-64
-
- - name: Upload generated files
- uses: actions/upload-artifact@v2
- with:
- name: cpu-torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-macos-10.15
- path: /usr/local/miniconda/envs/kaldifeat/conda-bld/osx-64/*.tar.bz2
diff --git a/.github/workflows/build_conda_ubuntu_cpu.yml b/.github/workflows/build_conda_ubuntu_cpu.yml
deleted file mode 100644
index f14ce10..0000000
--- a/.github/workflows/build_conda_ubuntu_cpu.yml
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 2021 Xiaomi Corp. (author: Fangjun Kuang)
-
-# See ../../LICENSE for clarification regarding multiple authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# refer to https://github.com/actions/starter-workflows/pull/47/files
-
-name: build_conda_ubuntu_cpu
-
-on:
- push:
- tags:
- - '*'
-
-env:
- KALDIFEAT_BUILD_TYPE: Release
-
-jobs:
- generate_build_matrix:
- # see https://github.com/pytorch/pytorch/pull/50633
- runs-on: ubuntu-latest
- outputs:
- matrix: ${{ steps.set-matrix.outputs.matrix }}
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Generating build matrix
- id: set-matrix
- run: |
- # outputting for debugging purposes
- python scripts/github_actions/generate_build_matrix.py
- MATRIX=$(python scripts/github_actions/generate_build_matrix.py)
- echo "::set-output name=matrix::${MATRIX}"
-
- build_conda_ubuntu_cpu:
- needs: generate_build_matrix
- runs-on: ubuntu-18.04
- strategy:
- fail-fast: false
- matrix:
- ${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
-
- steps:
- # refer to https://github.com/actions/checkout
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - uses: conda-incubator/setup-miniconda@v2
- with:
- auto-update-conda: true
- python-version: ${{ matrix.python-version }}
- activate-environment: kaldifeat
-
- - name: Display Python version
- shell: bash -l {0}
- run: |
- python3 -c "import sys; print(sys.version)"
- which python3
-
- - name: Install conda dependencies
- shell: bash -l {0}
- run: |
- conda install -y -q anaconda-client
- conda install -y -q conda-build
- conda install -y -q -c pytorch pytorch=${{ matrix.torch }} cpuonly
-
- - name: Display conda info
- shell: bash -l {0}
- run: |
- which conda
- conda env list
- conda info
- nproc
-
- - name: Build kaldifeat
- shell: bash -l {0}
- env:
- KALDIFEAT_PYTHON_VERSION: ${{ matrix.python-version}}
- KALDIFEAT_TORCH_VERSION: ${{ matrix.torch }}
- KALDIFEAT_CONDA_TOKEN: ${{ secrets.KALDIFEAT_CONDA_TOKEN}}
- KALDIFEAT_IS_GITHUB_ACTIONS: 1
- KALDIFEAT_IS_FOR_CONDA: 1
- run: |
- export KALDIFEAT_BUILD_TYPE=$KALDIFEAT_BUILD_TYPE
- ./scripts/build_conda_cpu.sh
-
- - name: Display generated files
- run: |
- ls -lh /usr/share/miniconda/envs/kaldifeat/conda-bld/linux-64
-
- - name: Upload generated files
- uses: actions/upload-artifact@v2
- with:
- name: cpu-torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-18.04
- path: /usr/share/miniconda/envs/kaldifeat/conda-bld/linux-64/*.tar.bz2
diff --git a/.github/workflows/build_conda_ubuntu_cuda.yml b/.github/workflows/build_conda_ubuntu_cuda.yml
deleted file mode 100644
index 5c587f6..0000000
--- a/.github/workflows/build_conda_ubuntu_cuda.yml
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 2021 Xiaomi Corp. (author: Fangjun Kuang)
-
-# See ../../LICENSE for clarification regarding multiple authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# refer to https://github.com/actions/starter-workflows/pull/47/files
-
-name: build_conda_ubuntu_cuda
-
-on:
- push:
- tags:
- - '*'
-
-env:
- KALDIFEAT_BUILD_TYPE: Release
-
-jobs:
- generate_build_matrix:
- # see https://github.com/pytorch/pytorch/pull/50633
- runs-on: ubuntu-latest
- outputs:
- matrix: ${{ steps.set-matrix.outputs.matrix }}
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Generating build matrix
- 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)
- echo "::set-output name=matrix::${MATRIX}"
-
- build_conda_ubuntu_cuda:
- needs: generate_build_matrix
- runs-on: ubuntu-18.04
- strategy:
- fail-fast: false
- matrix:
- ${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
-
- steps:
- # refer to https://github.com/actions/checkout
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - name: Install CUDA Toolkit ${{ matrix.cuda }}
- shell: bash -l {0}
- env:
- cuda: ${{ matrix.cuda }}
- run: |
- source ./scripts/github_actions/install_cuda.sh
- echo "CUDA_HOME=${CUDA_HOME}" >> $GITHUB_ENV
- echo "${CUDA_HOME}/bin" >> $GITHUB_PATH
- echo "LD_LIBRARY_PATH=${CUDA_HOME}/lib:${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
-
- - name: Display NVCC version
- shell: bash -l {0}
- run: |
- which nvcc
- nvcc --version
-
- - uses: conda-incubator/setup-miniconda@v2
- with:
- auto-update-conda: true
- python-version: ${{ matrix.python-version }}
- activate-environment: kaldifeat
-
- - name: Display Python version
- shell: bash -l {0}
- run: |
- python3 -c "import sys; print(sys.version)"
- which python3
-
- - name: Install conda dependencies
- shell: bash -l {0}
- run: |
- conda install -y -q anaconda-client
- conda install -y -q conda-build
- conda install -y -q -c pytorch -c conda-forge pytorch=${{ matrix.torch }} cudatoolkit=${{ matrix.cuda }}
-
- - name: Display conda info
- shell: bash -l {0}
- run: |
- which conda
- conda env list
- conda info
- nproc
-
- - name: Download cudnn 8.0
- shell: bash -l {0}
- env:
- cuda: ${{ matrix.cuda }}
- run: |
- ./scripts/github_actions/install_cudnn.sh
-
- - name: Build kaldifeat
- shell: bash -l {0}
- env:
- KALDIFEAT_CUDA_VERSION: ${{ matrix.cuda }}
- KALDIFEAT_PYTHON_VERSION: ${{ matrix.python-version}}
- KALDIFEAT_TORCH_VERSION: ${{ matrix.torch }}
- KALDIFEAT_CONDA_TOKEN: ${{ secrets.KALDIFEAT_CONDA_TOKEN}}
- KALDIFEAT_IS_GITHUB_ACTIONS: 1
- KALDIFEAT_IS_FOR_CONDA: 1
- run: |
- export KALDIFEAT_BUILD_TYPE=$KALDIFEAT_BUILD_TYPE
- ./scripts/build_conda.sh
-
- - name: Display generated files
- run: |
- ls -lh /usr/share/miniconda/envs/kaldifeat/conda-bld/linux-64
-
- - name: Upload generated files
- uses: actions/upload-artifact@v2
- with:
- name: cuda-${{ matrix.cuda }}-torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-18.04
- path: /usr/share/miniconda/envs/kaldifeat/conda-bld/linux-64/*.tar.bz2
diff --git a/.github/workflows/build_conda_windows_cpu.yml b/.github/workflows/build_conda_windows_cpu.yml
deleted file mode 100644
index b95c98c..0000000
--- a/.github/workflows/build_conda_windows_cpu.yml
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright 2021 Xiaomi Corp. (author: Fangjun Kuang)
-
-# See ../../LICENSE for clarification regarding multiple authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# refer to https://github.com/actions/starter-workflows/pull/47/files
-
-name: build_conda_windows_cpu
-
-on:
- push:
- tags:
- - '*'
-
-env:
- KALDIFEAT_BUILD_TYPE: Release
-
-jobs:
- generate_build_matrix:
- # see https://github.com/pytorch/pytorch/pull/50633
- runs-on: ubuntu-latest
- outputs:
- matrix: ${{ steps.set-matrix.outputs.matrix }}
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Generating build matrix
- id: set-matrix
- run: |
- # outputting for debugging purposes
- python scripts/github_actions/generate_build_matrix.py
- MATRIX=$(python scripts/github_actions/generate_build_matrix.py)
- echo "::set-output name=matrix::${MATRIX}"
-
- build_conda_windows_cpu:
- needs: generate_build_matrix
- runs-on: windows-2019
- strategy:
- fail-fast: false
- matrix:
- ${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
-
- steps:
- # refer to https://github.com/actions/checkout
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - uses: conda-incubator/setup-miniconda@v2
- with:
- auto-update-conda: true
- python-version: ${{ matrix.python-version }}
- activate-environment: kaldifeat
-
- - name: Install conda dependencies
- shell: bash -l {0}
- run: |
- conda install -y -q anaconda-client
- conda install -y -q conda-build
- conda install -y -q -c pytorch pytorch=${{ matrix.torch }} cpuonly
-
- - name: Display Python version
- shell: bash -l {0}
- run: |
- python -c "import sys; print(sys.version)"
- which python
-
- - name: Display conda info
- shell: bash -l {0}
- run: |
- conda env list
- conda info
- which conda
- python --version
- which python
- python -m torch.utils.collect_env
-
- - name: Build kaldifeat
- shell: bash -l {0}
- env:
- KALDIFEAT_PYTHON_VERSION: ${{ matrix.python-version}}
- KALDIFEAT_TORCH_VERSION: ${{ matrix.torch }}
- KALDIFEAT_CONDA_TOKEN: ${{ secrets.KALDIFEAT_CONDA_TOKEN}}
- KALDIFEAT_IS_GITHUB_ACTIONS: 1
- KALDIFEAT_IS_FOR_CONDA: 1
- run: |
- export KALDIFEAT_BUILD_TYPE=$KALDIFEAT_BUILD_TYPE
- ./scripts/build_conda_cpu.sh
-
- - name: Display generated files
- shell: bash -l {0}
- run: |
- ls -lh /c/Miniconda/envs/kaldifeat/conda-bld
- ls -lh /c/Miniconda/envs/kaldifeat/conda-bld/*/*
- ls -lh /c/Miniconda/envs/kaldifeat/conda-bld/win-64/*
-
- - name: Upload generated files
- uses: actions/upload-artifact@v2
- with:
- name: cpu-torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-windows-2019
- path: c:/Miniconda/envs/kaldifeat/conda-bld/win-64/*.tar.bz2
diff --git a/.github/workflows/macos-cpu-wheels.yml b/.github/workflows/macos-cpu-wheels.yml
new file mode 100644
index 0000000..655aec6
--- /dev/null
+++ b/.github/workflows/macos-cpu-wheels.yml
@@ -0,0 +1,118 @@
+name: build-wheels-cpu-macos
+
+on:
+ push:
+ tags:
+ - '*'
+ workflow_dispatch:
+
+concurrency:
+ group: build-wheels-cpu-macos-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ generate_build_matrix:
+ # see https://github.com/pytorch/pytorch/pull/50633
+ runs-on: ubuntu-latest
+ outputs:
+ matrix: ${{ steps.set-matrix.outputs.matrix }}
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Generating build matrix
+ id: set-matrix
+ run: |
+ # outputting for debugging purposes
+ python ./scripts/github_actions/generate_build_matrix.py --for-macos
+ MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-macos)
+ echo "::set-output name=matrix::${MATRIX}"
+
+ build_wheels_macos_cpu:
+ needs: generate_build_matrix
+ name: ${{ matrix.torch }} ${{ matrix.python-version }}
+ runs-on: macos-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ ${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: display
+ shell: bash
+ run: |
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ retry ls -lh
+
+ # see https://cibuildwheel.readthedocs.io/en/stable/changelog/
+ # for a list of versions
+ - name: Build wheels
+ uses: pypa/cibuildwheel@v2.11.4
+ env:
+ CIBW_BEFORE_BUILD: pip install torch==${{ matrix.torch}} cmake numpy
+ CIBW_BUILD: ${{ matrix.python-version }}-*
+ CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
+ CIBW_BUILD_VERBOSITY: 3
+
+ - name: Display wheels
+ shell: bash
+ run: |
+
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ ls -lh ./wheelhouse/
+
+ ls -lh ./wheelhouse/*.whl
+
+ - name: Upload Wheel
+ uses: actions/upload-artifact@v2
+ with:
+ name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-macos-latest-cpu
+ path: wheelhouse/*.whl
+
+ # https://huggingface.co/docs/hub/spaces-github-actions
+ - name: Publish to huggingface
+ if: github.repository_owner == 'csukuangfj'
+ shell: bash
+ env:
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
+ run: |
+ git config --global user.email "csukuangfj@gmail.com"
+ git config --global user.name "Fangjun Kuang"
+
+ export GIT_LFS_SKIP_SMUDGE=1
+ git clone https://huggingface.co/csukuangfj/kaldifeat huggingface
+ cur_path=$PWD
+
+ function push_to_huggingface() {
+ cd $cur_path
+ rm -rf huggingface
+ git clone https://huggingface.co/csukuangfj/kaldifeat huggingface
+ cd huggingface
+ git pull
+
+ mkdir -p macos
+ cp -v ../wheelhouse/*.whl ./macos
+ git status
+ git lfs track "*.whl"
+ git add .
+ git commit -m "upload macos-cpu wheel for torch ${{ matrix.torch }} python ${{ matrix.python-version }}"
+ git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/kaldifeat main
+
+ cd ..
+ rm -rf huggingface
+ }
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ retry push_to_huggingface
diff --git a/.github/workflows/nightly-tests-ubuntu-conda-cpu.yml b/.github/workflows/nightly-tests-ubuntu-conda-cpu.yml
deleted file mode 100644
index 317901a..0000000
--- a/.github/workflows/nightly-tests-ubuntu-conda-cpu.yml
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 2021 Xiaomi Corp. (author: Fangjun Kuang)
-
-# See ../../LICENSE for clarification regarding multiple authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-name: Nightly tests ubuntu conda cpu
-
-on:
- schedule:
- # minute (0-59)
- # hour (0-23)
- # day of the month (1-31)
- # month (1-12)
- # day of the week (0-6)
- # nightly build at 23:50 UTC time every day
- - cron: "50 23 * * *"
-
-jobs:
- enable_nightly_build:
- runs-on: ubuntu-latest
- outputs:
- enabled: ${{ steps.set-enabled.outputs.enabled }}
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Set enabled
- id: set-enabled
- run: |
- enabled=$(python scripts/github_actions/run-nightly-build.py)
- echo "enabled: $enabled"
- echo "::set-output name=enabled::${enabled}"
-
- generate_build_matrix:
- needs: enable_nightly_build
- if: needs.enable_nightly_build.outputs.enabled == 'true'
- # see https://github.com/pytorch/pytorch/pull/50633
- runs-on: ubuntu-latest
- outputs:
- matrix: ${{ steps.set-matrix.outputs.matrix }}
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Generating build matrix
- id: set-matrix
- run: |
- # outputting for debugging purposes
- python scripts/github_actions/generate_build_matrix.py --test-only-latest-torch
- MATRIX=$(python scripts/github_actions/generate_build_matrix.py --test-only-latest-torch)
- echo "::set-output name=matrix::${MATRIX}"
-
- run_nightly_tests_ubuntu_conda_cpu:
- needs: generate_build_matrix
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- ${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
-
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - uses: conda-incubator/setup-miniconda@v2
- with:
- auto-update-conda: true
- python-version: ${{ matrix.python-version }}
- activate-environment: kaldifeat
-
- - name: Display Python version
- shell: bash -l {0}
- run: |
- python3 -c "import sys; print(sys.version)"
- which python3
-
- - name: Install kaldifeat and run tests
- shell: bash -l {0}
- run: |
- sudo apt-get update
- sudo apt-get install -y libsndfile1-dev libsndfile1 ffmpeg
-
- conda install -y -c kaldifeat -c pytorch cpuonly pytorch=${{ matrix.torch }} kaldifeat python=${{ matrix.python-version }}
- conda install -y -c conda-forge pysoundfile
-
-
- cd kaldifeat/python/tests
- make test
diff --git a/.github/workflows/nightly-tests-ubuntu-conda-cuda.yml b/.github/workflows/nightly-tests-ubuntu-conda-cuda.yml
deleted file mode 100644
index 9ede567..0000000
--- a/.github/workflows/nightly-tests-ubuntu-conda-cuda.yml
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 2021 Xiaomi Corp. (author: Fangjun Kuang)
-
-# See ../../LICENSE for clarification regarding multiple authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-name: Nightly tests ubuntu conda cuda
-
-on:
- schedule:
- # minute (0-59)
- # hour (0-23)
- # day of the month (1-31)
- # month (1-12)
- # day of the week (0-6)
- # nightly build at 23:50 UTC time every day
- - cron: "50 23 * * *"
-
-jobs:
- enable_nightly_build:
- runs-on: ubuntu-latest
- outputs:
- enabled: ${{ steps.set-enabled.outputs.enabled }}
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Set enabled
- id: set-enabled
- run: |
- enabled=$(python scripts/github_actions/run-nightly-build.py)
- echo "enabled: $enabled"
- echo "::set-output name=enabled::${enabled}"
-
- generate_build_matrix:
- needs: enable_nightly_build
- if: needs.enable_nightly_build.outputs.enabled == 'true'
- # see https://github.com/pytorch/pytorch/pull/50633
- runs-on: ubuntu-latest
- outputs:
- matrix: ${{ steps.set-matrix.outputs.matrix }}
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Generating build matrix
- id: set-matrix
- run: |
- # outputting for debugging purposes
- 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_nightly_tests_ubuntu_conda_cuda:
- needs: generate_build_matrix
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- ${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
-
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - uses: conda-incubator/setup-miniconda@v2
- with:
- auto-update-conda: true
- python-version: ${{ matrix.python-version }}
- activate-environment: kaldifeat
-
- - name: Display Python version
- shell: bash -l {0}
- run: |
- python3 -c "import sys; print(sys.version)"
- which python3
-
- - name: Install kaldifeat and run tests
- shell: bash -l {0}
- run: |
- conda install -y -c kaldifeat -c pytorch -c conda-forge pytorch=${{ matrix.torch }} cudatoolkit=${{ matrix.cuda }} kaldifeat python=${{ matrix.python-version }}
- conda install -y -c conda-forge pysoundfile
-
- cd kaldifeat/python/tests
- make test
diff --git a/.github/workflows/ubuntu-cpu-wheels.yml b/.github/workflows/ubuntu-cpu-wheels.yml
new file mode 100644
index 0000000..69e1b5f
--- /dev/null
+++ b/.github/workflows/ubuntu-cpu-wheels.yml
@@ -0,0 +1,128 @@
+name: build-wheels-cpu-ubuntu
+
+on:
+ push:
+ tags:
+ - '*'
+ workflow_dispatch:
+
+concurrency:
+ group: build-wheels-cpu-ubuntu-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ generate_build_matrix:
+ # see https://github.com/pytorch/pytorch/pull/50633
+ runs-on: ubuntu-latest
+ outputs:
+ matrix: ${{ steps.set-matrix.outputs.matrix }}
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Generating build matrix
+ id: set-matrix
+ run: |
+ # outputting for debugging purposes
+ python ./scripts/github_actions/generate_build_matrix.py
+ MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py)
+ echo "::set-output name=matrix::${MATRIX}"
+
+ build-manylinux-wheels:
+ needs: generate_build_matrix
+ name: ${{ matrix.torch }} ${{ matrix.python-version }}
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ ${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: display
+ shell: bash
+ run: |
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ retry ls -lh
+
+ # see https://github.com/pytorch/test-infra/blob/9e3d392690719fac85bad0c9b67f530e48375ca1/tools/scripts/generate_binary_build_matrix.py
+ # https://github.com/pytorch/builder/tree/main/manywheel
+ # https://github.com/pytorch/builder/pull/476
+ # https://github.com/k2-fsa/k2/issues/733
+ # https://github.com/pytorch/pytorch/pull/50633 (generate build matrix)
+ - name: Run the build process with Docker
+ uses: addnab/docker-run-action@v3
+ with:
+ image: ${{ matrix.image }}
+ options: -v ${{ github.workspace }}:/var/www -e PYTHON_VERSION=${{ matrix.python-version }} -e TORCH_VERSION=${{ matrix.torch }}
+ run: |
+ echo "pwd: $PWD"
+ uname -a
+ id
+ cat /etc/*release
+ gcc --version
+ python3 --version
+ which python3
+ /var/www/scripts/github_actions/build-ubuntu-cpu.sh
+
+ - name: Display wheels
+ shell: bash
+ run: |
+
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ ls -lh ./wheelhouse/
+
+ ls -lh ./wheelhouse/*.whl
+
+ - name: Upload Wheel
+ uses: actions/upload-artifact@v2
+ with:
+ name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu
+ path: wheelhouse/*.whl
+
+ # https://huggingface.co/docs/hub/spaces-github-actions
+ - name: Publish to huggingface
+ if: github.repository_owner == 'csukuangfj'
+ shell: bash
+ env:
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
+ run: |
+ git config --global user.email "csukuangfj@gmail.com"
+ git config --global user.name "Fangjun Kuang"
+
+ export GIT_LFS_SKIP_SMUDGE=1
+ git clone https://huggingface.co/csukuangfj/kaldifeat huggingface
+ cur_path=$PWD
+
+ function push_to_huggingface() {
+ cd $cur_path
+ rm -rf huggingface
+ git clone https://huggingface.co/csukuangfj/kaldifeat huggingface
+ cd huggingface
+ git pull
+
+ mkdir -p ubuntu-cpu
+ cp -v ../wheelhouse/*.whl ./ubuntu-cpu
+ git status
+ git lfs track "*.whl"
+ git add .
+ git commit -m "upload ubuntu-cpu wheel for torch ${{ matrix.torch }} python ${{ matrix.python-version }}"
+ git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/kaldifeat main
+
+ cd ..
+ rm -rf huggingface
+ }
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ retry push_to_huggingface
diff --git a/.github/workflows/ubuntu-cuda-wheels.yml b/.github/workflows/ubuntu-cuda-wheels.yml
new file mode 100644
index 0000000..32458b7
--- /dev/null
+++ b/.github/workflows/ubuntu-cuda-wheels.yml
@@ -0,0 +1,139 @@
+name: build-wheels-cuda-ubuntu
+
+on:
+ push:
+ tags:
+ - '*'
+ workflow_dispatch:
+
+concurrency:
+ group: build-wheels-cuda-ubuntu-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ generate_build_matrix:
+ # see https://github.com/pytorch/pytorch/pull/50633
+ runs-on: ubuntu-latest
+ outputs:
+ matrix: ${{ steps.set-matrix.outputs.matrix }}
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Generating build matrix
+ 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)
+ echo "::set-output name=matrix::${MATRIX}"
+
+ build-manylinux-wheels:
+ needs: generate_build_matrix
+ name: ${{ matrix.torch }} ${{ matrix.python-version }} cuda${{ matrix.cuda }}
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ ${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: display
+ shell: bash
+ run: |
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ retry ls -lh
+
+ # see https://github.com/pytorch/test-infra/blob/9e3d392690719fac85bad0c9b67f530e48375ca1/tools/scripts/generate_binary_build_matrix.py
+ # https://github.com/pytorch/builder/tree/main/manywheel
+ # https://github.com/pytorch/builder/pull/476
+ # https://github.com/k2-fsa/k2/issues/733
+ # https://github.com/pytorch/pytorch/pull/50633 (generate build matrix)
+ - name: Run the build process with Docker
+ uses: addnab/docker-run-action@v3
+ with:
+ image: ${{ matrix.image }}
+ options: -v ${{ github.workspace }}:/var/www -e PYTHON_VERSION=${{ matrix.python-version }} -e TORCH_VERSION=${{ matrix.torch }} -e CUDA_VERSION=${{ matrix.cuda }}
+ run: |
+ echo "pwd: $PWD"
+ uname -a
+ id
+ cat /etc/*release
+ gcc --version
+ python3 --version
+ which python3
+
+ pushd /usr/local
+ rm cuda
+ ln -s cuda-$CUDA_VERSION cuda
+ popd
+ which nvcc
+ nvcc --version
+
+ cp /var/www/scripts/github_actions/install_torch.sh .
+ chmod +x install_torch.sh
+
+ /var/www/scripts/github_actions/build-ubuntu-cuda.sh
+
+ - name: Display wheels
+ shell: bash
+ run: |
+
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ ls -lh ./wheelhouse/
+
+ ls -lh ./wheelhouse/*.whl
+
+ - name: Upload Wheel
+ uses: actions/upload-artifact@v2
+ with:
+ name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cuda
+ path: wheelhouse/*.whl
+
+ # https://huggingface.co/docs/hub/spaces-github-actions
+ - name: Publish to huggingface
+ if: github.repository_owner == 'csukuangfj'
+ shell: bash
+ env:
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
+ run: |
+ git config --global user.email "csukuangfj@gmail.com"
+ git config --global user.name "Fangjun Kuang"
+
+ export GIT_LFS_SKIP_SMUDGE=1
+ git clone https://huggingface.co/csukuangfj/kaldifeat huggingface
+ cur_path=$PWD
+
+ function push_to_huggingface() {
+ cd $cur_path
+ rm -rf huggingface
+ git clone https://huggingface.co/csukuangfj/kaldifeat huggingface
+ cd huggingface
+ git pull
+
+ mkdir -p ubuntu-cuda
+ cp -v ../wheelhouse/*.whl ./ubuntu-cuda
+ git status
+ git lfs track "*.whl"
+ git add .
+ git commit -m "upload ubuntu-cuda wheel for torch ${{ matrix.torch }} python ${{ matrix.python-version }}"
+ git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/kaldifeat main
+
+ cd ..
+ rm -rf huggingface
+ }
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ retry push_to_huggingface
diff --git a/.github/workflows/windows-x64-cpu-wheels.yml b/.github/workflows/windows-x64-cpu-wheels.yml
new file mode 100644
index 0000000..8c2d4af
--- /dev/null
+++ b/.github/workflows/windows-x64-cpu-wheels.yml
@@ -0,0 +1,118 @@
+name: build-wheels-cpu-win64
+
+on:
+ push:
+ tags:
+ - '*'
+ workflow_dispatch:
+
+concurrency:
+ group: build-wheels-cpu-win64-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ generate_build_matrix:
+ # see https://github.com/pytorch/pytorch/pull/50633
+ runs-on: ubuntu-latest
+ outputs:
+ matrix: ${{ steps.set-matrix.outputs.matrix }}
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Generating build matrix
+ id: set-matrix
+ run: |
+ # outputting for debugging purposes
+ python ./scripts/github_actions/generate_build_matrix.py --for-windows
+ MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-windows)
+ echo "::set-output name=matrix::${MATRIX}"
+
+ build_wheels_win64_cpu:
+ needs: generate_build_matrix
+ name: ${{ matrix.torch }} ${{ matrix.python-version }}
+ runs-on: windows-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ ${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: display
+ shell: bash
+ run: |
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ retry ls -lh
+
+ # see https://cibuildwheel.readthedocs.io/en/stable/changelog/
+ # for a list of versions
+ - name: Build wheels
+ uses: pypa/cibuildwheel@v2.11.4
+ env:
+ CIBW_BEFORE_BUILD: pip install torch==${{ matrix.torch}}+cpu -f https://download.pytorch.org/whl/torch_stable.html cmake numpy
+ CIBW_BUILD: ${{ matrix.python-version }}-win_amd64
+ CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: ""
+ CIBW_BUILD_VERBOSITY: 3
+
+ - name: Display wheels
+ shell: bash
+ run: |
+
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ ls -lh ./wheelhouse/
+
+ ls -lh ./wheelhouse/*.whl
+
+ - name: Upload Wheel
+ uses: actions/upload-artifact@v2
+ with:
+ name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-windows-latest-cpu
+ path: wheelhouse/*.whl
+
+ # https://huggingface.co/docs/hub/spaces-github-actions
+ - name: Publish to huggingface
+ if: github.repository_owner == 'csukuangfj'
+ shell: bash
+ env:
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
+ run: |
+ git config --global user.email "csukuangfj@gmail.com"
+ git config --global user.name "Fangjun Kuang"
+
+ export GIT_LFS_SKIP_SMUDGE=1
+ git clone https://huggingface.co/csukuangfj/kaldifeat huggingface
+ cur_path=$PWD
+
+ function push_to_huggingface() {
+ cd $cur_path
+ rm -rf huggingface
+ git clone https://huggingface.co/csukuangfj/kaldifeat huggingface
+ cd huggingface
+ git pull
+
+ mkdir -p windows-cpu
+ cp -v ../wheelhouse/*.whl ./windows-cpu
+ git status
+ git lfs track "*.whl"
+ git add .
+ git commit -m "upload windows-cpu wheel for torch ${{ matrix.torch }} python ${{ matrix.python-version }}"
+ git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/kaldifeat main
+
+ cd ..
+ rm -rf huggingface
+ }
+ function retry() {
+ $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
+ }
+
+ retry push_to_huggingface
diff --git a/doc/source/cpu.html b/doc/source/cpu.html
new file mode 100644
index 0000000..a76a6b7
--- /dev/null
+++ b/doc/source/cpu.html
@@ -0,0 +1,164 @@
+kaldifeat-1.24.dev20230722+cpu.torch2.0.1-cp311-cp311-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.1-cp311-cp311-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.1-cp310-cp310-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.1-cp310-cp310-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.1-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.0-cp311-cp311-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.0-cp310-cp310-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.0-cp310-cp310-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.0-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.0-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch2.0.0-cp38-cp38-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp310-cp310-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp310-cp310-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.1-cp37-cp37m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp310-cp310-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp310-cp310-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp38-cp38-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.13.0-cp37-cp37m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.1-cp310-cp310-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.1-cp310-cp310-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.1-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.1-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.1-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp310-cp310-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp310-cp310-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp38-cp38-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.12.0-cp37-cp37m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.11.0-cp310-cp310-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.11.0-cp310-cp310-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.11.0-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.11.0-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.11.0-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.11.0-cp38-cp38-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.11.0-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.11.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.2-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.2-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.2-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.2-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.2-cp37-cp37m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.2-cp36-cp36m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.2-cp36-cp36m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.1-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.1-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.1-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.1-cp38-cp38-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.1-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.1-cp37-cp37m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.1-cp36-cp36m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.1-cp36-cp36m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.0-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.0-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.0-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.0-cp38-cp38-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.0-cp36-cp36m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.10.0-cp36-cp36m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.1-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.1-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.1-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.1-cp37-cp37m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.1-cp36-cp36m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.1-cp36-cp36m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.0-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.0-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.0-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.0-cp38-cp38-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.0-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.9.0-cp36-cp36m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.1-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.1-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.1-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.1-cp38-cp38-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.1-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.1-cp37-cp37m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.1-cp36-cp36m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.0-cp39-cp39-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.0-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.0-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.0-cp38-cp38-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.0-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.0-cp36-cp36m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.8.0-cp36-cp36m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.1-cp39-cp39-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.1-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.1-cp38-cp38-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.1-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.1-cp37-cp37m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.1-cp36-cp36m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.0-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.0-cp38-cp38-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.0-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.0-cp37-cp37m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.0-cp36-cp36m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.7.0-cp36-cp36m-win_amd64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.6.0-cp38-cp38-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.6.0-cp37-cp37m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.6.0-cp36-cp36m-macosx_10_9_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.6.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cpu.torch1.6.0-cp36-cp36m-win_amd64.whl
diff --git a/doc/source/cuda.html b/doc/source/cuda.html
new file mode 100644
index 0000000..afa4cad
--- /dev/null
+++ b/doc/source/cuda.html
@@ -0,0 +1,128 @@
+kaldifeat-1.24.dev20230722+cuda11.8.torch2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.8.torch2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.8.torch2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.8.torch2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.8.torch2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.8.torch2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.8.torch2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch2.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch1.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch1.13.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch1.13.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch1.13.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch1.13.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.13.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.13.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.13.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.13.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.7.torch1.13.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.13.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.12.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.12.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.12.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.6.torch1.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.5.torch1.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.5.torch1.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.5.torch1.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.5.torch1.11.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.11.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.11.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.3.torch1.10.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.10.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.1.torch1.9.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.9.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.9.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.1.torch1.9.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.9.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.1.torch1.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.1.torch1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.1.torch1.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.1.torch1.8.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.8.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.1.torch1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.1.torch1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.1.torch1.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda11.1.torch1.8.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.8.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.7.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.7.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.7.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.7.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+kaldifeat-1.24.dev20230722+cuda10.2.torch1.6.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
diff --git a/doc/source/index.rst b/doc/source/index.rst
index caa50b5..55b897d 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -12,5 +12,5 @@ kaldifeat
:caption: Contents
intro
- installation
+ installation/index
usage/index
diff --git a/doc/source/installation.rst b/doc/source/installation.rst
deleted file mode 100644
index 5baa217..0000000
--- a/doc/source/installation.rst
+++ /dev/null
@@ -1,167 +0,0 @@
-Installation
-============
-
- - |os_types|
- - |python_versions|
- - |pytorch_versions|
- - |cuda_versions|
-
-.. caution::
-
- `kaldifeat`_ depends on `PyTorch`_. `PyTorch`_ >= 1.5.0 is known to work.
-
- Please first install `PyTorch`_ before you install `kaldifeat`_.
-
-.. hint::
-
- To install a CPU version of `kaldifeat`_, please install a CPU version
- of `PyTorch`_.
-
- To install a CUDA version of `kaldifeat`_, please install a CUDA version
- of `PyTorch`_. CUDA >= 10.1 is known to work.
-
-.. _from source:
-
-Install kaldifeat from source
------------------------------
-
-You have to install ``cmake`` and `PyTorch`_ first.
-
- - ``cmake`` 3.11 is known to work. Other CMake versions may also work.
- - `PyTorch`_ >= 1.5.0 is known to work. Other PyTorch versions may also work.
- - Python >= 3.6
-
-
-The commands to install `kaldifeat`_ from source are:
-
-.. code-block:: bash
-
- git clone https://github.com/csukuangfj/kaldifeat
- cd kaldifeat
- python3 setup.py install
-
-To test that you have installed `kaldifeat`_ successfully, please run:
-
-.. code-block:: bash
-
- python3 -c "import kaldifeat; print(kaldifeat.__version__)"
-
-It should print the version, e.g., ``1.0``.
-
-.. _from PyPI:
-
-Install kaldifeat from PyPI
----------------------------
-
-The command to install `kaldifeat`_ from PyPI is:
-
-.. code-block:: bash
-
- pip install --verbose kaldifeat
-
-To test that you have installed `kaldifeat`_ successfully, please run:
-
-.. code-block:: bash
-
- python3 -c "import kaldifeat; print(kaldifeat.__version__)"
-
-It should print the version, e.g., ``1.0``.
-
-Install kaldifeat from conda (Only for Linux)
----------------------------------------------
-
-.. hint::
-
- Installation using ``conda`` supports only Linux. For macOS and Windows,
- please use either :ref:`from source` or :ref:`from PyPI`.
-
-The command to install `kaldifeat` using ``conda`` is
-
-.. code-block:: bash
-
- conda install -c kaldifeat -c pytorch -c conda-forge kaldifeat python=3.8 cudatoolkit=11.1 pytorch=1.8.1
-
-You can select the supported Python version, CUDA toolkit version and `PyTorch`_ version as you wish.
-
-To install a CPU version of `kaldifeat`, use:
-
-.. code-block:: bash
-
- conda install -c kaldifeat -c pytorch cpuonly kaldifeat python=3.8 pytorch=1.8.1
-
-.. caution::
-
- If you encounter issues about missing GLIBC after installing `kaldifeat`_
- with ``conda``, please consider :ref:`from source` or :ref:`from PyPI`.
- The reason is that the package was built using Ubuntu 18.04 and your system's
- GLIBC is older.
-
-
-.. |os_types| image:: ./images/os-green.svg
- :alt: Supported operating systems
-
-.. |python_versions| image:: ./images/python_ge_3.6-blue.svg
- :alt: Supported python versions
-
-.. |cuda_versions| image:: ./images/cuda_ge_10.1-orange.svg
- :alt: Supported cuda versions
-
-.. |pytorch_versions| image:: ./images/pytorch_ge_1.5.0-green.svg
- :alt: Supported pytorch versions
-
-To test that you have installed `kaldifeat`_ successfully, please run:
-
-.. code-block:: bash
-
- python3 -c "import kaldifeat; print(kaldifeat.__version__)"
-
-It should print the version, e.g., ``1.0``.
-
-FAQs
-----
-
-How to install a CUDA version of kaldifeat
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-You need to first install a CUDA version of `PyTorch`_ and then install `kaldifeat`_.
-
-.. note::
-
- You can use a CUDA version of `kaldifeat`_ on machines with no GPUs.
-
-How to install a CPU version of kaldifeat
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-You need to first install a CPU version of `PyTorch`_ and then install `kaldifeat`_.
-
-How to fix `Caffe2: Cannot find cuDNN library`
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. code-block::
-
- Your installed Caffe2 version uses cuDNN but I cannot find the cuDNN
- libraries. Please set the proper cuDNN prefixes and / or install cuDNN.
-
-You will have such an error 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 using ``one`` of the following
-commands.
-
-(1) Fix for installation using ``pip install``
-
-.. code-block:: 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
-
-.. code-block:: 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/installation/faq.rst b/doc/source/installation/faq.rst
new file mode 100644
index 0000000..a48be51
--- /dev/null
+++ b/doc/source/installation/faq.rst
@@ -0,0 +1,48 @@
+FAQs
+====
+
+How to install a CUDA version of kaldifeat from source
+------------------------------------------------------
+
+You need to first install a CUDA version of `PyTorch`_ and then install `kaldifeat`_.
+
+.. note::
+
+ You can use a CUDA version of `kaldifeat`_ on machines with no GPUs.
+
+How to install a CPU version of kaldifeat from source
+-----------------------------------------------------
+
+You need to first install a CPU version of `PyTorch`_ and then install `kaldifeat`_.
+
+How to fix `Caffe2: Cannot find cuDNN library`
+----------------------------------------------
+
+.. code-block::
+
+ Your installed Caffe2 version uses cuDNN but I cannot find the cuDNN
+ libraries. Please set the proper cuDNN prefixes and / or install cuDNN.
+
+You will have such an error 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 using ``one`` of the following
+commands.
+
+(1) Fix for installation using ``pip install``
+
+.. code-block:: 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
+
+.. code-block:: 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/installation/from_source.rst b/doc/source/installation/from_source.rst
new file mode 100644
index 0000000..145c422
--- /dev/null
+++ b/doc/source/installation/from_source.rst
@@ -0,0 +1,47 @@
+.. _from source:
+
+Install kaldifeat from source
+=============================
+
+You have to install ``cmake`` and `PyTorch`_ first.
+
+ - ``cmake`` 3.11 is known to work. Other CMake versions may also work.
+ - `PyTorch`_ >= 1.5.0 is known to work. Other PyTorch versions may also work.
+ - Python >= 3.6
+ - A compiler that supports C++ 14
+
+
+The commands to install `kaldifeat`_ from source are:
+
+.. code-block:: bash
+
+ git clone https://github.com/csukuangfj/kaldifeat
+ cd kaldifeat
+ python3 setup.py install
+
+To test that you have installed `kaldifeat`_ successfully, please run:
+
+.. code-block:: bash
+
+ python3 -c "import kaldifeat; print(kaldifeat.__version__)"
+
+It should print the version, e.g., ``1.0``.
+
+.. _from PyPI:
+
+Install kaldifeat from PyPI
+---------------------------
+
+The command to install `kaldifeat`_ from PyPI is:
+
+.. code-block:: bash
+
+ pip install --verbose kaldifeat
+
+To test that you have installed `kaldifeat`_ successfully, please run:
+
+.. code-block:: bash
+
+ python3 -c "import kaldifeat; print(kaldifeat.__version__)"
+
+It should print the version, e.g., ``1.0``.
diff --git a/doc/source/installation/from_wheels.rst b/doc/source/installation/from_wheels.rst
new file mode 100644
index 0000000..a019a95
--- /dev/null
+++ b/doc/source/installation/from_wheels.rst
@@ -0,0 +1,7 @@
+From pre-compiled wheels (Recommended)
+=======================================
+
+You can find pre-compiled wheels at
+
+ - CPU wheels: ``_
+ - CUDA wheels: ``_
diff --git a/doc/source/installation/index.rst b/doc/source/installation/index.rst
new file mode 100644
index 0000000..248d9f3
--- /dev/null
+++ b/doc/source/installation/index.rst
@@ -0,0 +1,11 @@
+Installation
+============
+
+.. toctree::
+ :maxdepth: 2
+
+ ./from_wheels.rst
+ ./from_source.rst
+ ./faq.rst
+
+
diff --git a/get_version.py b/get_version.py
new file mode 100755
index 0000000..27c74de
--- /dev/null
+++ b/get_version.py
@@ -0,0 +1,106 @@
+#!/usr/bin/env python3
+
+import datetime
+import os
+import platform
+import re
+import shutil
+
+import torch
+
+
+def is_macos():
+ return platform.system() == "Darwin"
+
+
+def is_windows():
+ return platform.system() == "Windows"
+
+
+def with_cuda():
+ if shutil.which("nvcc") is None:
+ return False
+
+ if is_macos():
+ return False
+
+ return True
+
+
+def get_pytorch_version():
+ # if it is 1.7.1+cuda101, then strip +cuda101
+ return torch.__version__.split("+")[0]
+
+
+def get_cuda_version():
+ from torch.utils import collect_env
+
+ running_cuda_version = collect_env.get_running_cuda_version(collect_env.run)
+ cuda_version = torch.version.cuda
+ if running_cuda_version is not None and cuda_version is not None:
+ assert cuda_version in running_cuda_version, (
+ f"PyTorch is built with CUDA version: {cuda_version}.\n"
+ f"The current running CUDA version is: {running_cuda_version}"
+ )
+ return cuda_version
+
+
+def is_for_pypi():
+ ans = os.environ.get("KALDIFEAT_IS_FOR_PYPI", None)
+ return ans is not None
+
+
+def is_stable():
+ ans = os.environ.get("KALDIFEAT_IS_STABLE", None)
+ return ans is not None
+
+
+def is_for_conda():
+ ans = os.environ.get("KALDIFEAT_IS_FOR_CONDA", None)
+ return ans is not None
+
+
+def get_package_version():
+ # Set a default CUDA version here so that `pip install kaldifeat`
+ # uses the default CUDA version.
+ #
+ default_cuda_version = "10.1" # CUDA 10.1
+
+ if with_cuda():
+ cuda_version = get_cuda_version()
+ if is_for_pypi() and default_cuda_version == cuda_version:
+ cuda_version = ""
+ pytorch_version = ""
+ local_version = ""
+ else:
+ cuda_version = f"+cuda{cuda_version}"
+ pytorch_version = get_pytorch_version()
+ local_version = f"{cuda_version}.torch{pytorch_version}"
+ else:
+ pytorch_version = get_pytorch_version()
+ local_version = f"+cpu.torch{pytorch_version}"
+
+ if is_for_conda():
+ local_version = ""
+
+ if is_for_pypi() and is_macos():
+ local_version = ""
+
+ with open("CMakeLists.txt") as f:
+ content = f.read()
+
+ latest_version = re.search(r"set\(kaldifeat_VERSION (.*)\)", content).group(
+ 1
+ )
+ latest_version = latest_version.strip('"')
+
+ if not is_stable():
+ dt = datetime.datetime.utcnow()
+ package_version = f"{latest_version}.dev{dt.year}{dt.month:02d}{dt.day:02d}{local_version}"
+ else:
+ package_version = f"{latest_version}"
+ return package_version
+
+
+if __name__ == "__main__":
+ print(get_package_version())
diff --git a/pyproject.toml b/pyproject.toml
deleted file mode 100644
index 0d80ed4..0000000
--- a/pyproject.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-[tool.isort]
-profile = "black"
-
-[tool.black]
-line-length = 80
-exclude = '''
-/(
- \.git
- | \.github
-)/
-'''
diff --git a/scripts/github_actions/build-ubuntu-cpu.sh b/scripts/github_actions/build-ubuntu-cpu.sh
new file mode 100755
index 0000000..b4f8af9
--- /dev/null
+++ b/scripts/github_actions/build-ubuntu-cpu.sh
@@ -0,0 +1,104 @@
+#!/usr/bin/env bash
+#
+set -ex
+
+if [ -z $PYTHON_VERSION ]; then
+ echo "Please set the environment variable PYTHON_VERSION"
+ echo "Example: export PYTHON_VERSION=3.8"
+ # Valid values: 3.8, 3.9, 3.10, 3.11
+ exit 1
+fi
+
+if [ -z $TORCH_VERSION ]; then
+ echo "Please set the environment variable TORCH_VERSION"
+ echo "Example: export TORCH_VERSION=1.10.0"
+ exit 1
+fi
+
+echo "Installing ${PYTHON_VERSION}.1"
+
+yum -y install openssl-devel bzip2-devel libffi-devel xz-devel wget redhat-lsb-core
+
+
+if [[ $PYTHON_VERSION == 3.6 ]]; then
+ curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}.1/Python-${PYTHON_VERSION}.1.tgz
+ tar xf Python-${PYTHON_VERSION}.1.tgz
+ pushd Python-${PYTHON_VERSION}.1
+else
+ curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}.9/Python-${PYTHON_VERSION}.1.tgz
+ tar xf Python-${PYTHON_VERSION}.9.tgz
+ pushd Python-${PYTHON_VERSION}.9
+fi
+
+PYTHON_INSTALL_DIR=$PWD/py-${PYTHON_VERSION}
+
+if [[ $PYTHON_VERSION =~ 3.1. ]]; then
+ yum install -y openssl11-devel
+ sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure
+fi
+
+./configure --enable-shared --prefix=$PYTHON_INSTALL_DIR
+make install
+
+popd
+
+export PATH=$PYTHON_INSTALL_DIR/bin:$PATH
+export LD_LIBRARY_PATH=$PYTHON_INSTALL_DIR/lib:$LD_LIBRARY_PATH
+ls -lh $PYTHON_INSTALL_DIR/lib/
+
+nvcc --version || true
+rm -rf /usr/local/cuda*
+nvcc --version || true
+
+python3 --version
+which python3
+
+if [[ $PYTHON_VERSION != 3.6 ]]; then
+ curl -O https://bootstrap.pypa.io/get-pip.py
+ python3 get-pip.py
+fi
+
+python3 -m pip install scikit-build
+python3 -m pip install -U pip cmake
+python3 -m pip install wheel twine typing_extensions
+python3 -m pip install bs4 requests tqdm auditwheel
+
+echo "Installing torch"
+python3 -m pip install -qq torch==$TORCH_VERSION+cpu -f https://download.pytorch.org/whl/torch_stable.html
+
+rm -rf ~/.cache/pip
+yum clean all
+
+cd /var/www
+
+export CMAKE_CUDA_COMPILER_LAUNCHER=
+export KALDIFEAT_CMAKE_ARGS=" -DPYTHON_EXECUTABLE=$PYTHON_INSTALL_DIR/bin/python3 "
+export KALDIFEAT_MAKE_ARGS=" -j "
+
+
+python3 setup.py bdist_wheel
+
+auditwheel --verbose repair \
+ --exclude libc10.so \
+ --exclude libc10_cuda.so \
+ --exclude libcuda.so.1 \
+ --exclude libcudart.so.${CUDA_VERSION} \
+ --exclude libnvToolsExt.so.1 \
+ --exclude libnvrtc.so.${CUDA_VERSION} \
+ --exclude libtorch.so \
+ --exclude libtorch_cpu.so \
+ --exclude libtorch_cuda.so \
+ --exclude libtorch_python.so \
+ \
+ --exclude libcudnn.so.8 \
+ --exclude libcublas.so.11 \
+ --exclude libcublasLt.so.11 \
+ --exclude libcudart.so.11.0 \
+ --exclude libnvrtc.so.11.2 \
+ --exclude libtorch_cuda_cu.so \
+ --exclude libtorch_cuda_cpp.so \
+ --plat manylinux_2_17_x86_64 \
+ -w /var/www/wheelhouse \
+ dist/*.whl
+
+ls -lh /var/www
diff --git a/scripts/github_actions/build-ubuntu-cuda.sh b/scripts/github_actions/build-ubuntu-cuda.sh
new file mode 100755
index 0000000..e812dd0
--- /dev/null
+++ b/scripts/github_actions/build-ubuntu-cuda.sh
@@ -0,0 +1,101 @@
+#!/usr/bin/env bash
+#
+set -ex
+
+if [ -z $PYTHON_VERSION ]; then
+ echo "Please set the environment variable PYTHON_VERSION"
+ echo "Example: export PYTHON_VERSION=3.8"
+ # Valid values: 3.6, 3.7, 3.8, 3.9, 3.10, 3.11
+ exit 1
+fi
+
+if [ -z $TORCH_VERSION ]; then
+ echo "Please set the environment variable TORCH_VERSION"
+ echo "Example: export TORCH_VERSION=1.10.0"
+ exit 1
+fi
+
+if [ -z $CUDA_VERSION ]; then
+ echo "Please set the environment variable CUDA_VERSION"
+ echo "Example: export CUDA_VERSION=10.2"
+ # valid values: 10.2, 11.1, 11.3, 11.6, 11.7, 11.8
+ exit 1
+fi
+
+
+yum -y install openssl-devel bzip2-devel libffi-devel xz-devel wget redhat-lsb-core
+
+
+echo "Installing ${PYTHON_VERSION}.3"
+curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}.3/Python-${PYTHON_VERSION}.3.tgz
+tar xf Python-${PYTHON_VERSION}.3.tgz
+pushd Python-${PYTHON_VERSION}.3
+
+PYTHON_INSTALL_DIR=$PWD/py-${PYTHON_VERSION}
+
+if [[ $PYTHON_VERSION =~ 3.1. ]]; then
+ yum install -y openssl11-devel
+ sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure
+fi
+
+./configure --enable-shared --prefix=$PYTHON_INSTALL_DIR
+make install
+
+popd
+
+export PATH=$PYTHON_INSTALL_DIR/bin:$PATH
+export LD_LIBRARY_PATH=$PYTHON_INSTALL_DIR/lib:$LD_LIBRARY_PATH
+ls -lh $PYTHON_INSTALL_DIR/lib/
+
+python3 --version
+which python3
+
+if [[ $PYTHON_VERSION != 3.6 ]]; then
+ curl -O https://bootstrap.pypa.io/get-pip.py
+ python3 get-pip.py
+fi
+
+python3 -m pip install scikit-build
+python3 -m pip install -U pip cmake
+python3 -m pip install wheel twine typing_extensions
+python3 -m pip install bs4 requests tqdm auditwheel
+
+echo "Installing torch"
+./install_torch.sh
+
+rm -rf ~/.cache/pip
+yum clean all
+
+cd /var/www
+
+export CMAKE_CUDA_COMPILER_LAUNCHER=
+export KALDIFEAT_CMAKE_ARGS=" -DPYTHON_EXECUTABLE=$PYTHON_INSTALL_DIR/bin/python3 "
+export KALDIFEAT_MAKE_ARGS=" -j2 "
+
+
+python3 setup.py bdist_wheel
+
+auditwheel --verbose repair \
+ --exclude libc10.so \
+ --exclude libc10_cuda.so \
+ --exclude libcuda.so.1 \
+ --exclude libcudart.so.${CUDA_VERSION} \
+ --exclude libnvToolsExt.so.1 \
+ --exclude libnvrtc.so.${CUDA_VERSION} \
+ --exclude libtorch.so \
+ --exclude libtorch_cpu.so \
+ --exclude libtorch_cuda.so \
+ --exclude libtorch_python.so \
+ \
+ --exclude libcudnn.so.8 \
+ --exclude libcublas.so.11 \
+ --exclude libcublasLt.so.11 \
+ --exclude libcudart.so.11.0 \
+ --exclude libnvrtc.so.11.2 \
+ --exclude libtorch_cuda_cu.so \
+ --exclude libtorch_cuda_cpp.so \
+ --plat manylinux_2_17_x86_64 \
+ -w /var/www/wheelhouse \
+ dist/*.whl
+
+ls -lh /var/www
diff --git a/scripts/github_actions/generate_build_matrix.py b/scripts/github_actions/generate_build_matrix.py
index 8e1c197..e135c57 100755
--- a/scripts/github_actions/generate_build_matrix.py
+++ b/scripts/github_actions/generate_build_matrix.py
@@ -21,6 +21,13 @@ def get_args():
help="True for windows",
)
+ parser.add_argument(
+ "--for-macos",
+ action="store_true",
+ default=False,
+ help="True for macOS",
+ )
+
parser.add_argument(
"--test-only-latest-torch",
action="store_true",
@@ -31,7 +38,7 @@ def get_args():
return parser.parse_args()
-def generate_build_matrix(enable_cuda, for_windows, test_only_latest_torch):
+def generate_build_matrix(enable_cuda, for_windows, for_macos, test_only_latest_torch):
matrix = {
# 1.5.x is removed because there are compilation errors.
# See
@@ -48,9 +55,7 @@ def generate_build_matrix(enable_cuda, for_windows, test_only_latest_torch):
# },
"1.6.0": {
"python-version": ["3.6", "3.7", "3.8"],
- "cuda": ["10.1", "10.2"]
- if not for_windows
- else ["10.1.243", "10.2.89"],
+ "cuda": ["10.1", "10.2"] if not for_windows else ["10.1.243", "10.2.89"],
},
"1.7.0": {
"python-version": ["3.6", "3.7", "3.8"],
@@ -78,15 +83,11 @@ def generate_build_matrix(enable_cuda, for_windows, test_only_latest_torch):
},
"1.9.0": {
"python-version": ["3.6", "3.7", "3.8", "3.9"],
- "cuda": ["10.2", "11.1"]
- if not for_windows
- else ["10.2.89", "11.1.1"],
+ "cuda": ["10.2", "11.1"] if not for_windows else ["10.2.89", "11.1.1"],
},
"1.9.1": {
"python-version": ["3.6", "3.7", "3.8", "3.9"],
- "cuda": ["10.2", "11.1"]
- if not for_windows
- else ["10.2.89", "11.1.1"],
+ "cuda": ["10.2", "11.1"] if not for_windows else ["10.2.89", "11.1.1"],
},
"1.10.0": {
"python-version": ["3.6", "3.7", "3.8", "3.9"],
@@ -128,11 +129,30 @@ def generate_build_matrix(enable_cuda, for_windows, test_only_latest_torch):
"python-version": ["3.7", "3.8", "3.9", "3.10", "3.11"],
"cuda": ["11.6", "11.7"], # default 11.7
},
+ "1.13.1": {
+ "python-version": ["3.7", "3.8", "3.9", "3.10", "3.11"],
+ "cuda": ["11.6", "11.7"], # default 11.7
+ },
+ "2.0.0": {
+ "python-version": ["3.8", "3.9", "3.10", "3.11"],
+ "cuda": ["11.7", "11.8"], # default 11.7
+ },
+ "2.0.1": {
+ "python-version": ["3.8", "3.9", "3.10", "3.11"],
+ "cuda": ["11.7", "11.8"], # default 11.7
+ },
}
if test_only_latest_torch:
- latest = "1.13.0"
+ latest = "2.0.1"
matrix = {latest: matrix[latest]}
+ if for_windows or for_macos:
+ if "1.13.0" in matrix:
+ matrix["1.13.0"]["python-version"].remove("3.11")
+
+ if "1.13.1" in matrix:
+ matrix["1.13.1"]["python-version"].remove("3.11")
+
ans = []
for torch, python_cuda in matrix.items():
python_versions = python_cuda["python-version"]
@@ -140,10 +160,30 @@ def generate_build_matrix(enable_cuda, for_windows, test_only_latest_torch):
if enable_cuda:
for p in python_versions:
for c in cuda_versions:
- ans.append({"torch": torch, "python-version": p, "cuda": c})
+ if c == "10.1":
+ # no docker image for cuda 10.1
+ continue
+ ans.append(
+ {
+ "torch": torch,
+ "python-version": p,
+ "cuda": c,
+ "image": f"pytorch/manylinux-builder:cuda{c}",
+ }
+ )
else:
for p in python_versions:
- ans.append({"torch": torch, "python-version": p})
+ if for_windows or for_macos:
+ p = "cp" + "".join(p.split("."))
+ ans.append({"torch": torch, "python-version": p})
+ else:
+ ans.append(
+ {
+ "torch": torch,
+ "python-version": p,
+ "image": f"pytorch/manylinux-builder:cuda10.2",
+ }
+ )
print(json.dumps({"include": ans}))
@@ -153,6 +193,7 @@ def main():
generate_build_matrix(
enable_cuda=args.enable_cuda,
for_windows=args.for_windows,
+ for_macos=args.for_macos,
test_only_latest_torch=args.test_only_latest_torch,
)
diff --git a/scripts/github_actions/install_torch.sh b/scripts/github_actions/install_torch.sh
index 9f0be7c..7ba7485 100755
--- a/scripts/github_actions/install_torch.sh
+++ b/scripts/github_actions/install_torch.sh
@@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+torch=$TORCH_VERSION
+cuda=$CUDA_VERSION
case ${torch} in
1.5.*)
case ${cuda} in
@@ -155,6 +157,18 @@ case ${torch} in
;;
esac
;;
+ 2.0.*)
+ case ${cuda} in
+ 11.7)
+ package="torch==${torch}+cu117"
+ url=https://download.pytorch.org/whl/torch_stable.html
+ ;;
+ 11.8)
+ package="torch==${torch}+cu118"
+ url=https://download.pytorch.org/whl/torch_stable.html
+ ;;
+ esac
+ ;;
*)
echo "Unsupported PyTorch version: ${torch}"
exit 1
@@ -170,3 +184,5 @@ if [ x"${url}" == "x" ]; then
else
retry python3 -m pip install -q $package -f $url
fi
+
+rm -rfv ~/.cache/pip
diff --git a/setup.py b/setup.py
index d69fb87..2271dd0 100644
--- a/setup.py
+++ b/setup.py
@@ -7,6 +7,9 @@ import re
import setuptools
from cmake.cmake_extension import BuildExtension, bdist_wheel, cmake_extension
+import get_version
+
+get_package_version = get_version.get_package_version
def read_long_description():
@@ -15,15 +18,6 @@ def read_long_description():
return readme
-def get_package_version():
- with open("CMakeLists.txt") as f:
- content = f.read()
-
- match = re.search(r"set\(kaldifeat_VERSION (.*)\)", content)
- latest_version = match.group(1).strip('"')
- return latest_version
-
-
package_name = "kaldifeat"
with open("kaldifeat/python/kaldifeat/__init__.py", "a") as f: