-
Notifications
You must be signed in to change notification settings - Fork 6
/
run_toy.sh
executable file
·49 lines (38 loc) · 2.01 KB
/
run_toy.sh
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
48
49
#!/bin/bash
# Copyright 2012 Vassil Panayotov <[email protected]>
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
# WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
# MERCHANTABLITY OR NON-INFRINGEMENT.
# See the Apache 2 License for the specific language governing permissions and
# limitations under the License.
# A top-level script to guide the process of building the
# toy WFST cascade. Run _after_ the training is completed,
# (i.e. start after './run.sh' is done)
if [ -f path.sh ]; then . path.sh; fi
mkdir -p data_toy
steps/prepare_toy_graphs.sh data_toy/pictures/graphs
# Visualize the stages in a training graph's composition (monophone and triphone)
steps/visualize-train-graphs.sh data_toy/train/mono data_toy/pictures/train/mono mono
steps/visualize-train-graphs.sh data_toy/train/tri1 data_toy/pictures/train/tri1 tri1
# Visualization of the alignments for some utterance during some training passes
steps/visualize-train-ali.sh data_toy/pictures/train/mono mono "0 1 5 10 20"
steps/visualize-train-ali.sh data_toy/pictures/train/tri1 tri1 "5 10 20"
# Draw some phonetic trees
steps/visualize-trees.sh data_toy/pictures/train/mono mono "1/k"
steps/visualize-trees.sh data_toy/pictures/train/tri1 tri1 "0/ax/k/ch"
# Visualize the decoding graphs/alignments
# (the features were extracted using the default parameters of
# "wave2feat" tool from SphinxTrain)
# Prepare the features
echo "toy data_prep/toy.mfcc" > data_toy/sphinx_test.scp
pack-sphinx-feats scp:data_toy/sphinx_test.scp ark,scp:mfcc/toy.ark,data_toy/test.scp
# Render the results
steps/visualize-decode-ali.sh data_toy/pictures/decode/mono mono
steps/visualize-decode-ali.sh data_toy/pictures/decode/tri1 tri1