Changeset 35887 for main/trunk


Ignore:
Timestamp:
2022-01-06T09:31:45+13:00 (2 years ago)
Author:
davidb
Message:

Changed so different stages can be run; small version that targets just 2015

Location:
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/07b-GENERATE-ESSENTIA-FEATURES-DATA.sh

    r35871 r35887  
    44
    55prep_dir=essentia-audio-features
     6
     7
     8stages_to_run="scrape_contestants|download_audio|compute_audio_features"
     9
     10if [ $# -ge 1 ] ; then
     11    stages_to_run=$1; shift
     12fi
     13
     14run_scrape=`echo $stages_to_run   | grep scrape_contestants     | wc -l`
     15run_download=`echo $stages_to_run | grep download_audio         | wc -l`
     16run_compute=`echo $stages_to_run  | grep compute_audio_features | wc -l`
    617
    718
     
    7283
    7384
    74 #echo ""
    75 #echo "*** Patching $prep_dir/audio_features.py"
    76 #echo "***    streaming_extractor_music => essentia_streaming_extractor_music"
    77 #sed -i "s/'streaming_extractor_music'/'essentia_streaming_extractor_music'/g" $prep_dir/audio_features.py
    78 #
    79 #sed -i "s/ streaming_extractor_music / essentia_streaming_extractor_music /g" $prep_dir/audio_features.py
    80 #
    81 #echo ""
     85# Get geckodriver on PATH
     86export PATH=$PWD:$PATH
     87       
     88if [ $run_scrape = "1" ] ; then
     89    cd "$prep_dir" \
     90    && python3 ./main.py $* \
     91    && cd ..
     92fi
    8293
     94if [ $? = 0 ] && [ $run_download = "1" ] ; then
     95    wget --no-check-certificate -nc -O "$prep_dir/contestants.csv" \
     96     https://github.com/Spijkervet/eurovision_dataset/releases/download/2020.0/contestants.csv \
    8397
    84 echo "***"
    85 echo "* To download from YouTube and convert entries to MP3 files:"
    86 echo "*"
    87 echo "*     sh ./run.sh audio"
     98    cd "$prep_dir" \
     99    && python3 ./audio.py $* \
     100    && cd ..
     101fi
    88102
    89 echo "*"
    90 
    91 echo "* To generate Essentia audio features from MP3 files:"
    92 echo "*"
    93 echo "*     python3 ./audio_features26.py"
    94 echo "***"
     103if [ $? = 0 ] && [ $run_compute = "1" ] ; then
     104    cd "$prep_dir" \
     105    && python3 ./audio_features26.py \
     106    && cd ..
     107fi
    95108
    96109
    97110
     111
Note: See TracChangeset for help on using the changeset viewer.