# christian
experiments ...

## Scripts

Analysis of audio files with basic features. 


Calling `analyze.py` with `--analyze` will create a `.csv` file with all the statistics of files in the directory.

```Bash
python scripts/analyze.py --analyze /app/suno/data/audio_2ch_48khz/val/v2/deezer
python scripts/analyze.py --analyze /app/suno/data/audio_2ch_48khz/val/v2/pond5_music
python scripts/analyze.py --analyze /app/suno/christian/suno_generations
```

We can plot the results on histograms using `--plot`

```Bash
python scripts/analyze.py --plot \
outputs/deezer_stats.csv \
outputs/pond5_music_stats.csv  \
outputs/suno_generations_stats.csv
```

In order to analyze Suno generations we can use `grab.py` to get some random generations. 

```Bash
python scripts/grab.py --output_dir /app/suno/christian/suno_generations --num 1000
```

This will require setting the database password as an env variable.
```Bash
export PGPASSWORD=pass
```

Post-processing can be tested with `postprocess.py`

```Bash
python scripts/postprocess.py --input_dir /app/suno/christian/suno_generations
```