Installation Guide
Prerequisites
Before installing the audio-similarity library, ensure you have:
Python 3.10 or later
conda package manager
(Optional) CUDA-capable GPU for faster processing
Basic Installation
The recommended way to install is using conda:
# Create a new conda environment
conda create -n audio_sim python=3.10
conda activate audio_sim
# Install PyTorch ecosystem
conda install -c pytorch pytorch torchaudio
# Install FAISS
conda install -c conda-forge faiss
# Install the package
pip install anirudhp-audio-similarity
Installation from Source
For development or the latest features, install from source:
# Clone the repository
git clone https://github.com/AnirudhPraveen/audio-similarity.git
cd audio-similarity
# Create conda environment
conda create -n audio_sim python=3.10
conda activate audio_sim
# Install dependencies
conda install -c pytorch pytorch torchaudio
conda install -c conda-forge faiss
# Install in development mode
pip install -e .
Verify Installation
You can verify your installation by running:
from anirudhp-audio_similarity import AudioSimilaritySearch
# Initialize the searcher
searcher = AudioSimilaritySearch()
print("Installation successful!")
Troubleshooting
Common Issues
FAISS Installation Issues
If you encounter issues with FAISS, try:
conda install -c conda-forge faiss-cpu
PyTorch/Torchaudio Issues
For M1/M2 Macs:
pip3 install --pre torch torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
Import Errors
Make sure you’re in the correct conda environment:
conda activate audio_sim
Getting Help
If you encounter any issues:
Check the GitHub Issues