Skip to content

Commit

Permalink
Fix problem with new perl
Browse files Browse the repository at this point in the history
See for details https://sourceforge.net/p/cmusphinx/discussion/help/thread/2b11d6b0



git-svn-id: svn+ssh://svn.code.sf.net/p/cmusphinx/code/trunk/sphinxtrain@13271 94700074-3cef-4d97-a70e-9c8c206c02f5
  • Loading branch information
nshmyrev committed Jun 7, 2017
1 parent 09ea4d5 commit eb8bfba
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion scripts/000.comp_feat/make_feats.pl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
use File::Path;

use lib catdir(dirname($0), updir(), 'lib');
use SphinxTrain::Config cfg => 'etc/sphinx_train.cfg';
use SphinxTrain::Config;
use SphinxTrain::Util;

#************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion scripts/000.comp_feat/slave_feat.pl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
use File::Spec::Functions;

use lib catdir(dirname($0), updir(), 'lib');
use SphinxTrain::Config cfg => 'etc/sphinx_train.cfg';
use SphinxTrain::Config;
use SphinxTrain::Util;

mkdir ($ST::CFG_LOG_DIR,0755);
Expand Down
2 changes: 1 addition & 1 deletion scripts/80.mllr_adapt/mllr_solve.pl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
use File::Path;

use lib catdir(dirname($0), updir(), 'lib');
use SphinxTrain::Config cfg => 'etc/sphinx_train.cfg';
use SphinxTrain::Config;
use SphinxTrain::Util;

$| = 1; # Turn on autoflushing
Expand Down
2 changes: 1 addition & 1 deletion scripts/80.mllr_adapt/slave_adapt.pl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
use File::Path;

use lib catdir(dirname($0), updir(), 'lib');
use SphinxTrain::Config cfg => 'etc/sphinx_train.cfg';
use SphinxTrain::Config;
use SphinxTrain::Util;

# Assume that decoding has already been run. Now create
Expand Down
2 changes: 1 addition & 1 deletion scripts/decode/psdecode.pl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
use File::Spec::Functions;

use lib catdir(dirname($0), updir(), 'lib');
use SphinxTrain::Config cfg => 'etc/sphinx_train.cfg';
use SphinxTrain::Config;
use SphinxTrain::Util;

#************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion scripts/decode/slave.pl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
use File::Spec::Functions;

use lib catdir(dirname($0), updir(), 'lib');
use SphinxTrain::Config cfg => 'etc/sphinx_train.cfg';
use SphinxTrain::Config;
use SphinxTrain::Util;

#************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion scripts/decode/verify_dec.pl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
use File::Spec::Functions;

use lib catdir(dirname($0), updir(), 'lib');
use SphinxTrain::Config cfg => 'etc/sphinx_train.cfg';
use SphinxTrain::Config;
use SphinxTrain::Util;

$| = 1; # Turn on autoflushing
Expand Down
4 changes: 2 additions & 2 deletions scripts/lib/SphinxTrain/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ sub import {
} else {
$ST::CFG_FILE = $args{-cfg} if (defined($args{-cfg}));
$ST::CFG_FILE = $args{cfg} if (defined($args{cfg}));
$ST::CFG_FILE = "etc/sphinx_train.cfg" unless defined $ST::CFG_FILE;
$ST::CFG_FILE = "./etc/sphinx_train.cfg" unless defined $ST::CFG_FILE;
}

if (-r $ST::CFG_FILE) {
Expand Down Expand Up @@ -78,7 +78,7 @@ SphinxTrain::Config - Configuration management for Sphinx Training
use SphinxTrain::Config;
# -cfg specifies the default configuration if nothing was passed on the command-line
use SphinxTrain::Config -cfg => "etc/sphinx_train.cfg";
use SphinxTrain::Config -cfg => "./etc/sphinx_train.cfg";
# -ns specifies the namespace to load the configuration file in
use SphinxTrain::Config -pkg => 'ST';
# $ST::CFG_FOO is now defined
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/SphinxTrain/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use File::Basename;
use File::Spec;
use Queue;

die "Configuration (e.g. etc/sphinx_train.cfg) not defined\n" unless defined ($ST::CFG_DONE);
die "Configuration (e.g. ./etc/sphinx_train.cfg) not defined\n" unless defined ($ST::CFG_DONE);

$ST::CFG_OKAY_COLOR = '00D000';
$ST::CFG_WARNING_COLOR = '555500';
Expand Down
2 changes: 1 addition & 1 deletion scripts/sphinxtrain
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def setup(task):

print("Setting up the database " + task)

out_cfg = open("etc/sphinx_train.cfg", "w")
out_cfg = open("./etc/sphinx_train.cfg", "w")
for line in open(sphinxpath + "/etc/sphinx_train.cfg", "r"):
line = line.replace("___DB_NAME___", task)
line = line.replace("___BASE_DIR___", training_basedir)
Expand Down

0 comments on commit eb8bfba

Please sign in to comment.