Skip to content

Commit

Permalink
trunk: standardizing all perl and python scripts to start with a sheb…
Browse files Browse the repository at this point in the history
…ang /usr/bin/env perl|python, and to be executable. Minor script change to train_mono.sh to print better info in case of error.

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@5110 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
  • Loading branch information
danpovey committed Jun 2, 2015
1 parent 26e5d78 commit af390b6
Show file tree
Hide file tree
Showing 403 changed files with 404 additions and 375 deletions.
2 changes: 1 addition & 1 deletion egs/ami/s5/local/ami_split_segments.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright 2014 University of Edinburgh (Author: Pawel Swietojanski)

Expand Down
2 changes: 1 addition & 1 deletion egs/ami/s5/local/convert2stm.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright 2012 Johns Hopkins University (Author: Daniel Povey). Apache 2.0.
# 2013 University of Edinburgh (Author: Pawel Swietojanski)
Expand Down
2 changes: 1 addition & 1 deletion egs/ami/s5/local/fisher_map_words.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl -w

# Copyright 2013 Arnab Ghoshal

Expand Down
2 changes: 1 addition & 1 deletion egs/aspire/s5/local/fisher_fix_speakerid.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl -w

# Author: Peng Qi ([email protected])
# This script maps Switchboard speaker IDs to the true physical speakers
Expand Down
1 change: 1 addition & 0 deletions egs/aspire/s5/local/multi_condition/corrupt.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# Copyright 2014 Johns Hopkins University (Authors: Vijayaditya Peddinti). Apache 2.0.

# corrupts the wave files supplied via input pipe with the specified
Expand Down
1 change: 1 addition & 0 deletions egs/aspire/s5/local/multi_condition/create_uniform_segments.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# Copyright 2014 Johns Hopkins University (Authors: Daniel Povey, Vijayaditya Peddinti). Apache 2.0.

# creates a segments file in the provided data directory
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# Copyright 2014 Johns Hopkins University (Authors: Vijayaditya Peddinti). Apache 2.0.

# script to generate the file_patterns of the AIR database
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# Copyright 2014 Johns Hopkins University (Authors: Vijayaditya Peddinti). Apache 2.0.
# script to generate multicondition training data / dev data / test data
import argparse, glob, math, os, random, scipy.io.wavfile, sys
Expand Down
1 change: 1 addition & 0 deletions egs/aspire/s5/local/multi_condition/normalize_wavs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# Copyright 2014 Johns Hopkins University (Authors: Vijayaditya Peddinti). Apache 2.0.

# normalizes the wave files provided in input file list with a common scaling factor
Expand Down
1 change: 1 addition & 0 deletions egs/aspire/s5/local/multi_condition/read_rir.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# Copyright 2014 Johns Hopkins University (Authors: Vijayaditya Peddinti). Apache 2.0.

# script to read rir files from rwcp/air/reverb2014 databases
Expand Down
1 change: 1 addition & 0 deletions egs/aspire/s5/local/multi_condition/resolve_ctm_overlaps.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# Copyright 2014 Johns Hopkins University (Authors: Daniel Povey, Vijayaditya Peddinti). Apache 2.0.

# Script to combine ctms for uniformly segmented, with overlaps
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/aurora2flist.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright 2010-2011 Microsoft Corporation

Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/cstr_ndx2flist.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright 2010-2011 Microsoft Corporation

Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/add_counts.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl


# Add counts to an oovlist.
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/count_rules.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This program takes the output of score_prons.pl and collates
# it for each (rule, destress) pair so that we get the
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/filter_dict.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl


# This program reads and writes either a dictionary or just a list
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/find_acronyms.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Reads a dictionary, and prints out a list of words that seem to be pronounced
# as acronyms (not including plurals of acronyms, just acronyms). Uses
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/get_acronym_prons.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Reads a dictionary (for prons of letters), and an OOV list,
# and puts out candidate pronunciations of words in that list
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/get_candidate_prons.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This script takes three command-line arguments (typically files, or "-"):
# the suffix rules (as output by get_rules.pl), the rule-hierarchy
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/get_rule_hierarchy.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

#This reads in rules, of the form put out by get_rules.pl, e.g.:
# ERT,,ER0 T,
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/get_rules.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This program creates suggested suffix rules from a dictionary.
# It outputs quadruples of the form:
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/limit_candidate_prons.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This program enforces the rule that
# if a "more specific" rule applies, we cannot use the more general rule.
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/reverse_candidates.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This takes the output of e.g. get_candidate_prons.pl or limit_candidate_prons.pl,
# which is 7-tuples, one per line, of the form:
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/reverse_dict.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Used in conjunction with get_rules.pl
# example input line: XANTHE Z AE1 N DH
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/score_prons.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This program takes candidate prons from "get_candidate_prons.pl" or
# "limit_candidate_prons.pl", and a reference dictionary covering those words,
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/score_rules.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This program takes the output of count_rules.pl, which is tuples
# of the form
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/dict/select_candidate_prons.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This takes the output of e.g. get_candidate_prons.pl or limit_candidate_prons.pl
# or reverse_candidates.pl, which is 7-tuples, one per line, of the form:
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/find_transcripts.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Copyright 2010-2011 Microsoft Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/flist2scp.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Copyright 2010-2011 Microsoft Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/flist2scp_12.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Copyright 2010-2011 Microsoft Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/ndx2flist.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Copyright 2010-2011 Microsoft Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion egs/aurora4/s5/local/normalize_transcript.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Copyright 2010-2011 Microsoft Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions egs/babel/s5/conf/bnf/config_full.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
#################################################
## PTDNN - Python Toolkit for Deep Neural Network
## Author: Yajie Miao
Expand Down
1 change: 1 addition & 0 deletions egs/babel/s5/conf/bnf/config_limited.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
#################################################
## PTDNN - Python Toolkit for Deep Neural Network
## Author: Yajie Miao
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/annotated_kwlist_to_KWs.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright 2012 Johns Hopkins University (Author: Guoguo Chen)
# Apache 2.0.
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/augment_original_stm.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl -w
# Copyright 2012 Johns Hopkins University (Author: Jan Trmal)
# Apache 2.0.

Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/build_edit_distance_fst.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright 2012 Johns Hopkins University (Author: Guoguo Chen)
# Apache 2.0.
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/count_to_logprob.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright 2012 Johns Hopkins University (Author: Guoguo Chen)
# Apache 2.0.
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/cstr_ndx2flist.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright 2010-2011 Microsoft Corporation

Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/add_counts.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl


# Add counts to an oovlist.
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/count_rules.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This program takes the output of score_prons.pl and collates
# it for each (rule, destress) pair so that we get the
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/filter_dict.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl


# This program reads and writes either a dictionary or just a list
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/find_acronyms.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Reads a dictionary, and prints out a list of words that seem to be pronounced
# as acronyms (not including plurals of acronyms, just acronyms). Uses
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/get_acronym_prons.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Reads a dictionary (for prons of letters), and an OOV list,
# and puts out candidate pronunciations of words in that list
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/get_candidate_prons.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This script takes three command-line arguments (typically files, or "-"):
# the suffix rules (as output by get_rules.pl), the rule-hierarchy
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/get_rule_hierarchy.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

#This reads in rules, of the form put out by get_rules.pl, e.g.:
# ERT,,ER0 T,
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/get_rules.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This program creates suggested suffix rules from a dictionary.
# It outputs quadruples of the form:
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/limit_candidate_prons.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This program enforces the rule that
# if a "more specific" rule applies, we cannot use the more general rule.
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/reverse_candidates.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This takes the output of e.g. get_candidate_prons.pl or limit_candidate_prons.pl,
# which is 7-tuples, one per line, of the form:
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/reverse_dict.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Used in conjunction with get_rules.pl
# example input line: XANTHE Z AE1 N DH
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/score_prons.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This program takes candidate prons from "get_candidate_prons.pl" or
# "limit_candidate_prons.pl", and a reference dictionary covering those words,
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/score_rules.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This program takes the output of count_rules.pl, which is tuples
# of the form
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/dict/select_candidate_prons.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# This takes the output of e.g. get_candidate_prons.pl or limit_candidate_prons.pl
# or reverse_candidates.pl, which is 7-tuples, one per line, of the form:
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/extract_oov_words.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Copyright 2012 Johns Hopkins University (Author: Yenda Trmal)
# Apache 2.0.

Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/filter_keywords.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

use strict;
use warnings;
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/find_transcripts.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Copyright 2010-2011 Microsoft Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/fix_kwslist.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright 2012 Johns Hopkins University (Author: Guoguo Chen, Jan Trmal)
# Apache 2.0.
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/flist2scp.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Copyright 2010-2011 Microsoft Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/gridsearch.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#!/usr/bin/env perl

use warnings;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/gridsearch2.pl
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#!/usr/bin/env perl

use warnings;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/kwords2indices.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Copyright 2012 Johns Hopkins University (Author: Yenda Trmal)
# Apache 2.0.

Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/kws_oracle_threshold.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright 2012 Johns Hopkins University (Author: Guoguo Chen)
# Apache 2.0.
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/make_lexicon_fst_special.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl -w
# Copyright 2012 Johns Hopkins University (author: Daniel Povey)

# makes lexicon FST -- special version only for use in keyword search
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/naive_comb.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright 2012 Johns Hopkins University (Author: Guoguo Chen)
# Apache 2.0.
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/ndx2flist.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Copyright 2010-2011 Microsoft Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/normalize_transcript.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Copyright 2010-2011 Microsoft Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/prepare_acoustic_training_data.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
use Getopt::Long;

########################################################################
Expand Down
2 changes: 1 addition & 1 deletion egs/babel/s5/local/prepare_lexicon.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
use Getopt::Long;
use Data::Dumper;

Expand Down
Loading

0 comments on commit af390b6

Please sign in to comment.