Prerequisites and Installation
Prerequisites
Spiking-FullSubNet is built on top of PyTorch and provides standard audio signal processing and deep learning tools. To install the PyTorch binaries, we recommend Anaconda or Miniconda as a Python distribution.
Installation
First, create a Conda virtual environment with Python. In our project,
python=3.10is tested.# Create a virtual environment named `spiking-fullsubnet` conda create --name spiking-fullsubnet python=3.10 # Activate the environment conda activate spiking-fullsubnet
The following steps will assume you have activated the
spiking-fullsubnetenvironment.Install Conda dependencies. Some dependencies of Spiking-FullSubNet, e.g., PyTorch and Tensorboard, are recommended to be installed using Conda instead of PyPI. First, we install a CUDA-capable PyTorch. Although
pytorch=2.1.1has been tested, you may also use other versions:# Install PyTorch conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia # Install other Conda dependencies conda install tensorboard joblib matplotlib # (Optional) If you have "mp3" format audio data in your dataset, install ffmpeg first. conda install ffmpeg -c conda-forge
Install PyPI dependencies. Clone the repository and install PyPI dependencies via
pip -r requirements.txt. Checkrequirements.txtfor more details.git clone https://github.com/haoxiangsnr/spiking-fullsubnet.git cd spiking-fullsubnet pip install -r requirements.txt
We integrated all the audio signal processing tools into a package named
audiozen. We will install theaudiozenpackage in editable mode. By installing in editable mode, we can callaudiozenpackage in everywhere of code, e.g, inrecipesandtoolsfolders. In addition, we are able to modify the source code ofaudiozenpackage directly. Any changes to the original package would reflect directly in your conda environment.pip install --editable . # or for short: pip install -e .
Ok, all installations have done. You may speed up the installation by the following tips.
Tip
Use the THU Anaconda mirror site to speed up the Conda installation.
Use the THU PyPi mirror site to speed up the PyPI installation.