Blame view

egs/chime1/s5/local/chime1_prepare_grammar.sh 746 Bytes
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
  #!/bin/bash
  
  # Copyright 2015  University of Sheffield (Author: Ning Ma)
  # Apache 2.0.
  #
  # Scripts for preparing grammar for the GRID corpus (or CHiME 1)
  
  echo "Preparing grammar for test"
  
  . ./config.sh # Needed for REC_ROOT and WAV_ROOT
  
  # Setup relevant folders
  lang="$REC_ROOT/data/lang"
  utils="utils"
  
  # Create FST grammar for the GRID
  grammar_cmd="local/create_chime1_grammar.pl"
  
  $grammar_cmd | fstcompile --isymbols=$lang/words.txt --osymbols=$lang/words.txt \
    --keep_isymbols=false --keep_osymbols=false | fstarcsort --sort_type=ilabel \
    > $lang/G.fst || exit 1
  
  # Draw the FST
  #echo "fstdraw --isymbols=$lang/words.txt --osymbols=$lang/words.txt $lang/G.fst | dot -Tps > local/G.ps"
  
  echo "--> Grammar preparation succeeded"
  exit 0