Skip to content

YiNakaD/CLAP_MIA

Repository files navigation

CLAP Model Training

1. Install necessary libraries:

librosa
soundfile
accelerate
ffmpeg
torchaudio
transformers==4.45.1

2. Data Processing(For example, using the LibriSpeech dataset):

2.1.1 Download the LibriSpeech dataset from LibriSpeech.
2.1.2 Extract the dataset to the data folder.
2.1.3 Use data/Librispeech_process.ipynb to preprocess audio data.

3. Model Training:

The model will be saved in checkpoints/model.

By default, the pre-trained model laion/clap-htsat-unfused is used.

python train.py

Note: Please remember to modify data path and other parameters in train.py before running.

Detection

1. Install necessary libraries:

cd local
pip install -r requirements.txt

2. Generate gibberish:

python generate.py

3. Optimize audios:

python clap_opt_1_minut.py

4. Detect:

The sample code is in local/vote.py.

cd local
python vote.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published