Skip to content

Instantly share code, notes, and snippets.

@KarthikMAM
Created March 28, 2017 08:13
Show Gist options
  • Select an option

  • Save KarthikMAM/d8ebde4db84a72b083df0e14242edb1a to your computer and use it in GitHub Desktop.

Select an option

Save KarthikMAM/d8ebde4db84a72b083df0e14242edb1a to your computer and use it in GitHub Desktop.

Revisions

  1. KarthikMAM created this gist Mar 28, 2017.
    20 changes: 20 additions & 0 deletions gridcorpus.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    #preparing for download
    mkdir "gridcorpus"
    cd "gridcorpus"
    mkdir "raw" "audio" "video"
    cd "raw" && mkdir "audio" "video"

    for i in `seq $1 $2`
    do
    printf "\n\n------------------------- Downloading $i th speaker -------------------------\n\n"

    #download the audio of the ith speaker
    cd "audio" && curl "http://spandh.dcs.shef.ac.uk/gridcorpus/s$i/audio/s$i.tar" > "s$i.tar" && cd ..
    cd "video" && curl "http://spandh.dcs.shef.ac.uk/gridcorpus/s$i/video/s$i.mpg_vcd.zip" > "s$i.zip" && cd ..

    if (( $3 == "y" ))
    then
    unzip -q "video/s$i.zip" -d "../video"
    tar -xf "audio/s$i.tar" -C "../audio"
    fi
    done