Skip to content
Snippets Groups Projects
Commit 56773369 authored by Stefan Kombrink's avatar Stefan Kombrink
Browse files

modified decode_tri1 to generate lattices

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@261 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent e28d815d
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# Copyright 2010-2011 Microsoft Corporation
# 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.
# This script does the decoding of a single batch of test data (on one core).
# It requires arguments. It takes the graphdir and decoding directory,
# and the job number which can actually be any string (even ""); it expects
# a file $decode_dir/test${job_number}.scp to exist, and puts its output in
# $decode_dir/${job_number}.tra
if [ $# != 3 ]; then
echo "Usage: scripts/decode_tri1.sh <graph> <decode-dir> <job-number>"
exit 1;
fi
. path.sh || exit 1;
acwt=0.0625
beam=13.0
max_active=7000
model=exp/tri1/final.mdl
graph=$1
dir=$2
job=$3
scp=$dir/$job.scp
feats="ark:add-deltas --print-args=false scp:$scp ark:- |"
filenames="$scp $model $graph data/words.txt"
for file in $filenames; do
if [ ! -f $file ] ; then
echo "No such file $file";
exit 1;
fi
done
echo running on `hostname` > $dir/decode${job}.log
gmm-latgen-simple --beam=$beam --acoustic-scale=$acwt --word-symbol-table=data/words.txt $model $graph "$feats" ark,t:$dir/$job.lats ark,t:$dir/$job.tra ark,t:$dir/$job.ali 2>>$dir/decode${job}.log
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment