Blame view

egs/fisher_swbd/s5/local/swbd1_data_download.sh 1.33 KB
8dcb6dfcb   Yannick Estève   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  #!/bin/bash
  
  # Switchboard-1 training data preparation customized for Edinburgh
  # Author:  Arnab Ghoshal (Jan 2013)
  
  # To be run from one directory above this script.
  
  ## The input is some directory containing the switchboard-1 release 2
  ## corpus (LDC97S62).  Note: we don't make many assumptions about how
  ## you unpacked this.  We are just doing a "find" command to locate
  ## the .sph files.
  
  . ./path.sh
  
  #check existing directories
  if [ $# != 1 ]; then
    echo "Usage: swbd1_data_download.sh /path/to/SWBD"
    exit 1; 
  fi 
  
  SWBD_DIR=$1
  
  dir=data/local/train_swbd
  mkdir -p $dir
  
  # Audio data directory check
  if [ ! -d $SWBD_DIR ]; then
    echo "Error: run.sh requires a directory argument"
    exit 1; 
  fi  
  
  # Trans directory check
  if [ ! -d $SWBD_DIR/transcriptions/swb_ms98_transcriptions ]; then
    ( 
      cd $dir;
      if [ ! -d swb_ms98_transcriptions ]; then
        echo " *** Downloading trascriptions and dictionary ***" 
        wget http://www.openslr.org/resources/5/switchboard_word_alignments.tar.gz ||
        wget http://www.isip.piconepress.com/projects/switchboard/releases/switchboard_word_alignments.tar.gz
        tar -xf switchboard_word_alignments.tar.gz
      fi
    )
  else
    echo "Directory with transcriptions exists, skipping downloading"
    [ -f $dir/swb_ms98_transcriptions ] \
      || ln -sf $SWBD_DIR/transcriptions/swb_ms98_transcriptions $dir/
  fi