Commit 561670accdc5aa799e7d2ba3ce3fa2f825a656fa

Authored by Jean-François Rey
1 parent 7e99f07935
Exists in master

remove output redirections

Showing 5 changed files with 66 additions and 73 deletions Side-by-side Diff

main_tools/ConfPass.sh
... ... @@ -84,9 +84,6 @@
84 84 then
85 85 set -x
86 86 echo -e "## Mode DEBUG ON ##"
87   - REDIRECTION_OUTPUT=""
88   - else
89   - REDIRECTION_OUTPUT=" 2> /dev/null"
90 87 fi
91 88  
92 89 # mode verbose enable
... ... @@ -114,6 +111,8 @@
114 111 exit 1
115 112 fi
116 113  
  114 +print_info "[${BASENAME}] => Conf Pass start | $(date +'%d/%m/%y %H:%M:%S')" 1
  115 +
117 116 #-------------#
118 117 # GLOBAL VARS #
119 118 #-------------#
... ... @@ -216,7 +215,7 @@
216 215 if [ $pourcentageres -lt 85 ]
217 216 then
218 217 print_info "[${BASENAME}] Calcul Confidence $INPUT_DIR $RES_NAME" 1
219   - $MAIN_SCRIPT_PATH/ConfidenceMeasure.sh $INPUT_DIR $RES_NAME $REDIRECTION_OUTPUT
  218 + $MAIN_SCRIPT_PATH/ConfidenceMeasure.sh $INPUT_DIR $RES_NAME
220 219  
221 220 else
222 221 print_info "[${BASENAME}] Skipping Confidence Calcul $INPUT_DIR/$RES_NAME" 1
... ... @@ -242,8 +241,8 @@
242 241 # create USF configuration file
243 242 echo -e "name $AUTHOR\nfileName $BASENAME\nfileExt wav\nsegFile $OUTPUT_DIR/$BASENAME.seg" > $OUTPUT_DIR/$BASENAME.usf_cfg
244 243 # create USF file
245   -print_info "$SCRIPT_PATH/res2out.pl --dir $RES_CONF_DIR --format USF --ignore $RULES/asupp --out $USF_FILE.tmp --usf_config $OUTPUT_DIR/$BASENAME.usf_cfg $REDIRECTION_OUTPUT" 3
246   -$SCRIPT_PATH/res2out.pl --dir $RES_CONF_DIR --format USF --ignore $RULES/asupp --out $USF_FILE.tmp --usf_config $OUTPUT_DIR/$BASENAME.usf_cfg $REDIRECTION_OUTPUT
  244 +print_info "$SCRIPT_PATH/res2out.pl --dir $RES_CONF_DIR --format USF --ignore $RULES/asupp --out $USF_FILE.tmp --usf_config $OUTPUT_DIR/$BASENAME.usf_cfg" 3
  245 +$SCRIPT_PATH/res2out.pl --dir $RES_CONF_DIR --format USF --ignore $RULES/asupp --out $USF_FILE.tmp --usf_config $OUTPUT_DIR/$BASENAME.usf_cfg
247 246 rm $OUTPUT_DIR/$BASENAME.usf_cfg > /dev/null 2>&1
248 247 cat $USF_FILE.tmp | $SCRIPT_PATH/BdlexUC.pl $RULES/basic -f > $USF_FILE
249 248 cp $USF_FILE ${OUTPUT_DIR}/${BASENAME}.usf
main_tools/ExploitConfidencePass.sh
... ... @@ -92,9 +92,6 @@
92 92 then
93 93 set -x
94 94 echo -e "## Mode DEBUG ON ##"
95   - REDIRECTION_OUTPUT=""
96   - else
97   - REDIRECTION_OUTPUT=" 2> /dev/null"
98 95 fi
99 96  
100 97 # mode verbose enable
... ... @@ -116,6 +113,8 @@
116 113 exit 1
117 114 fi
118 115  
  116 +print_info "[${BASENAME}] => ExploitConfPass start | $(date +'%d/%m/%y %H:%M:%S')" 1
  117 +
119 118 #-------------#
120 119 # GLOBAL VARS #
121 120 #-------------#
... ... @@ -173,6 +172,10 @@
173 172 echo "LEX_BINODE_SPEERAL=$EXT_LEX/speeral/${lexname}_ext.bin" >> $OUTPUT_DIR/ExploitConfPass.cfg
174 173 print_info "[${BASENAME}] Save config in $OUTPUT_DIR_BASENAME/ExploitConfPass.cfg" 1
175 174  
  175 +#---------------#
  176 +# Check Pass #
  177 +#---------------#
  178 +
176 179 #-----------------------#
177 180 # Segmentation by show #
178 181 #-----------------------#
179 182  
180 183  
181 184  
182 185  
... ... @@ -182,25 +185,25 @@
182 185 # segment using the last generated file
183 186 # and create a ctm file by show
184 187  
185   -print_info "Segmentation by show" 1
  188 +print_info "[${BASENAME}] Segmentation by show" 1
186 189  
187 190 # -> to txt
188   -print_info "Create txt from scored res" 2
  191 +print_info "[${BASENAME}] Create txt from scored res" 2
189 192 cat ${RES_CONF_DIR}/*.res > $INPUT_DIR/$BASENAME.sctm
190 193 cat $INPUT_DIR/$BASENAME.seg | $SIGMUND_BIN/myConvert.pl $INPUT_DIR/$BASENAME.sctm $INPUT_DIR/$BASENAME.tmp
191 194 cat $INPUT_DIR/$BASENAME.tmp | $SCRIPT_PATH/BdlexUC.pl $RULES/basic -f | sed -e "s/_/ /g" | sort -nt 'n' -k '2' > $INPUT_DIR/$BASENAME.txt
192 195  
193 196 # -> to tagger + lemme
194   -print_info "Tag pos and lem in txt file" 2
  197 +print_info "[${BASENAME}] Tag pos and lem in txt file" 2
195 198 iconv -t ISO_8859-1 $INPUT_DIR/$BASENAME.txt > $INPUT_DIR/$BASENAME.tmp
196 199 $SIGMUND_BIN/txt2lem.sh $INPUT_DIR/$BASENAME.tmp $INPUT_DIR/$BASENAME.taglem
197 200  
198 201 # merge sctm and taglem
199   -print_info "Merge scored ctm with tag pos and lem file" 2
  202 +print_info "[${BASENAME}] Merge scored ctm with tag pos and lem file" 2
200 203 cat $INPUT_DIR/$BASENAME.sctm | $SCRIPT_PATH/BdlexUC.pl ${RULES}/basic -f | iconv -t ISO_8859-1 | $SCRIPT_PATH/scoredCtmAndTaggedLem2All.pl $INPUT_DIR/$BASENAME.taglem > $INPUT_DIR/$BASENAME.ctl
201 204  
202 205 # -> new seg
203   -print_info "Create xml file and run Topic Seg" 2
  206 +print_info "[${BASENAME}] Create xml file and run Topic Seg" 2
204 207 $SIGMUND_BIN/tagLem2xml.pl $INPUT_DIR/$BASENAME.taglem $INPUT_DIR/$BASENAME.doc.xml
205 208 rm $INPUT_DIR/$BASENAME.tmp #$INPUT_DIR/$BASENAME.taglem
206 209  
207 210  
... ... @@ -212,12 +215,12 @@
212 215  
213 216 if [ $CHECK -eq 1 ]
214 217 then
215   - if [ ! -s $INPUT_DIR/$BASENAME.show.seg ];then echo -e "ERROR : no Topic segmentation" >> $ERRORFILE; fi
  218 + if [ ! -s $INPUT_DIR/$BASENAME.show.seg ];then echo -e "[${BASENAME}] ERROR : no Topic segmentation" >> $ERRORFILE; fi
216 219 fi
217 220  
218 221 # Segment ctm into several show files and create a seg list by show
219   -print_info "Segment ctm into show files and a seg list by show" 2
220   -$SCRIPT_PATH/ctm2show.pl $INPUT_DIR/$BASENAME.ctl $INPUT_DIR/$BASENAME.show.seg $SHOW_DIR $REDIRECTION_OUTPUT
  222 +print_info "[${BASENAME}] Segment ctm into show files and a seg list by show" 2
  223 +$SCRIPT_PATH/ctm2show.pl $INPUT_DIR/$BASENAME.ctl $INPUT_DIR/$BASENAME.show.seg $SHOW_DIR
221 224  
222 225 #-----------------------------------------------------------#
223 226 # SOLR QUERIES #
... ... @@ -227,7 +230,7 @@
227 230 # concat word + add date 2 day before and after the show #
228 231 # query document & multimedia #
229 232 #-----------------------------------------------------------#
230   -print_info "Create SOLR queries and ASK SOLR" 1
  233 +print_info "[${BASENAME}] Create SOLR queries and ASK SOLR" 1
231 234 for show in $(ls $SHOW_DIR/*.ctm)
232 235 do
233 236 bn=$(basename $show .ctm)
... ... @@ -241,7 +244,7 @@
241 244 if [ $(wc -w "$SHOW_DIR/$bn.queries" | cut -f1 -d' ') -gt 0 ]; then
242 245 query=$(cat $SHOW_DIR/$bn.queries)"&fq=docDate:[$datePattern]"
243 246 echo $query > $SHOW_DIR/$bn.queries
244   - python $SCRIPT_PATH/ProcessSOLRQueries.py $SHOW_DIR/$bn.queries $SOLR_RES/$bn.keywords.tmp $SOLR_RES/$bn.txt.tmp $REDIRECTION_OUTPUT
  247 + python $SCRIPT_PATH/ProcessSOLRQueries.py $SHOW_DIR/$bn.queries $SOLR_RES/$bn.keywords.tmp $SOLR_RES/$bn.txt.tmp
245 248 cat $SOLR_RES/$bn.keywords.tmp | sort -u > $SOLR_RES/$bn.keywords
246 249 cat $SOLR_RES/$bn.txt.tmp | sort -u > $SOLR_RES/$bn.txt
247 250 rm $SOLR_RES/*.tmp > /dev/null 2>&1
... ... @@ -266,7 +269,7 @@
266 269 # 3) Try to find OOVs acousticly in the current segment
267 270 # 4) Generate the .trigg file
268 271 #------------------------------------------------------------------------------------------------
269   -print_info "Build trigger files" 1
  272 +print_info "[${BASENAME}] Build trigger files" 1
270 273 for i in `ls $SOLR_RES/*.keywords`
271 274 do
272 275 basename=`basename $i .keywords`
... ... @@ -275,7 +278,7 @@
275 278 # Tokenize & produce coverage report
276 279 # Use filter you need
277 280 #
278   - print_info "keywords filtering and produce coverage report" 2
  281 + print_info "[${BASENAME}] keywords filtering and produce coverage report" 2
279 282 # Default filter
280 283 cat $i | $SCRIPT_PATH/CleanFilter.sh | ${SCRIPT_PATH}/ApplyCorrectionRules.pl ${LEXICON}.regex | $SCRIPT_PATH/BdlexUC.pl $RULES/basic -t |\
281 284 $SCRIPT_PATH/CoverageReportMaker.pl --out $SOLR_RES/${basename}_tmp_report $LEXICON.bdlex_tok
282 285  
... ... @@ -287,13 +290,13 @@
287 290 # Extract "real" OOV and phonetize them
288 291 # -> petit filtrage persoo pour eviter d'avoir trop de bruits
289 292 #
290   - print_info "Extract OOV and phonetize them" 2
  293 + print_info "[${BASENAME}] Extract OOV and phonetize them" 2
291 294 ${SCRIPT_PATH}/FindNormRules.pl $SOLR_RES/${basename}_tmp_report/report.oov $LEXICON.bdlex_tok | cut -f3 | grep -v "#" | grep -v "^[A-Z]\+$" | grep -v "^[0-9]" | grep --perl-regex -v "^([a-z']){1,3}$" | $SCRIPT_PATH/BdlexUC.pl $RULES/basic -f | iconv -t ISO_8859-1 -f UTF-8 | ${LIA_LTBOX}/lia_phon/script/lia_lex2phon_variante | grep -v "core dumped" | cut -d"[" -f1 | sort -u | ${SCRIPT_PATH}/PhonFormatter.pl | iconv -f ISO_8859-1 -t UTF-8 | $SCRIPT_PATH/BdlexUC.pl $RULES/basic -t > $SOLR_RES/${basename}.phon_oov
292 295  
293 296 #
294 297 # Search INVOC & OOV in the current lattice
295 298 #
296   - print_info "Search INVOC and OOV in the current lattice" 2
  299 + print_info "[${BASENAME}] Search INVOC and OOV in the current lattice" 2
297 300 cat $SOLR_RES/${basename}_tmp_report/report.invoc | grep -v "\b0" | cut -f1 | grep -v --perl-regex -v "^[a-zA-Z']{1,3}$" | grep -v --perl-regex "^[a-zA-Z0-9]{1,3}$" | grep -v "<s>" | grep -v "</s>" | $SCRIPT_PATH/BdlexUC.pl $RULES/basic -t > $TRIGGER_CONFZONE/$basename.tosearch
298 301 cat $SOLR_RES/${basename}.phon_oov | cut -f1 >> $TRIGGER_CONFZONE/$basename.tosearch
299 302  
... ... @@ -304,7 +307,7 @@
304 307 #
305 308 # Produce the boost file for the next decoding pass
306 309 #
307   - print_info "Produce trigg file : $baseseg " 3
  310 + print_info "[${BASENAME}] Produce trigg file : $baseseg " 3
308 311 cat $RES_CONF_DIR/$baseseg.res | $SCRIPT_PATH/ScoreCtm2trigg.pl $TRIGGER_CONFZONE/$baseseg.acousticlyfound > $TRIGGER_CONFZONE/$baseseg.trigg
309 312 done
310 313  
311 314  
... ... @@ -316,14 +319,14 @@
316 319 # 1) Related text are collected in order to find the invoc word with maximizing the ppl (LM proba)
317 320 # 2) The current lexicon is extended with all the valid OOVs
318 321 #-----------------------------------------------------------------------------------------------
319   -print_info "Build extended Speeral Lexicon" 1
  322 +print_info "[${BASENAME}] Build extended Speeral Lexicon" 1
320 323 mkdir -p $EXT_LEX/final
321 324 mkdir -p $EXT_LEX/tmp
322 325 mkdir -p $EXT_LEX/tmp/txt
323 326 #
324 327 # Collect the acousticly found oov and their phonetisation
325 328 #
326   -print_info "Get all OOV and retrieve all phonetisation" 2
  329 +print_info "[${BASENAME}] Get all OOV and retrieve all phonetisation" 2
327 330 for i in `ls $SOLR_RES/*.phon_oov`
328 331 do
329 332 basename=`basename $i .phon_oov`
... ... @@ -341,7 +344,7 @@
341 344 # Extract OOV really added
342 345 #
343 346 cat $SOLR_RES/$basename.phon_oov | cut -f1 | sort -u > $EXT_LEX/$basename.oov
344   - $SCRIPT_PATH/intersec.pl $EXT_LEX/$basename.oov $EXT_LEX/$basename.acousticlyfound > $EXT_LEX/$basename.oov_acousticlyfound $REDIRECTION_OUTPUT
  347 + $SCRIPT_PATH/intersec.pl $EXT_LEX/$basename.oov $EXT_LEX/$basename.acousticlyfound > $EXT_LEX/$basename.oov_acousticlyfound
345 348 #
346 349 # Retrieve all phonetisation
347 350 #
348 351  
349 352  
... ... @@ -351,16 +354,16 @@
351 354 #
352 355 # Merge OOVs and their phonetisation
353 356 #
354   -print_info "Merge OOV and their phonetisation" 2
  357 +print_info "[${BASENAME}] Merge OOV and their phonetisation" 2
355 358 lexname=$(basename $LEXICON)
356 359 cat $EXT_LEX/*.oov_acousticlyfound_phon | sort -u > $EXT_LEX/final/all.oov_acousticlyfound_phon
357 360 cat $EXT_LEX/*.oov_acousticlyfound | sort -u | grep --perl-regex -v "^([a-z']){3}$" > $EXT_LEX/final/all.oov_acousticlyfound
358   -$SCRIPT_PATH/MergeLexicon.pl $EXT_LEX/final/all.oov_acousticlyfound_phon > $EXT_LEX/final/${lexname}_ext.phon $REDIRECTION_OUTPUT
  361 +$SCRIPT_PATH/MergeLexicon.pl $EXT_LEX/final/all.oov_acousticlyfound_phon > $EXT_LEX/final/${lexname}_ext.phon
359 362  
360 363 #
361 364 # Collect + clean retrieved txt
362 365 #
363   -print_info "Collect and clean SOLR txt answers" 2
  366 +print_info "[${BASENAME}] Collect and clean SOLR txt answers" 2
364 367 # choose filter
365 368 # default
366 369 cat $SOLR_RES/*.txt | $SCRIPT_PATH/CleanFilter.sh | $SCRIPT_PATH/ApplyCorrectionRules.pl ${LEXICON}.regex | $SCRIPT_PATH/BdlexUC.pl $RULES/basic -t > $EXT_LEX/final/all.bdlex_txt
... ... @@ -374,7 +377,7 @@
374 377 # - Expected format :
375 378 # <WORD1_STRING> <CANDIDATE1_STRING> <PHON_1>
376 379 #
377   -print_info "Construct map file" 2
  380 +print_info "[${BASENAME}] Construct map file" 2
378 381 rm -f $EXT_LEX/final/${lexname}_ext.map 2>/dev/null
379 382 rm -f $EXT_LEX/final/${lexname}.unvalid_oov 2>/dev/null
380 383  
... ... @@ -392,7 +395,7 @@
392 395 if [ -f $EXT_LEX/tmp/txt/$oov.bdlex_txt ]; then
393 396 nbWords=`wc -l $EXT_LEX/tmp/txt/$oov.bdlex_txt | cut -f1 -d" "`
394 397 if [ $nbWords -eq 0 ]; then
395   - echo "UNVALID OOV: $oov => $nbWords occurrences"
  398 + echo "[${BASENAME}] UNVALID OOV: $oov => $nbWords occurrences"
396 399 echo "$oov" >> $EXT_LEX/final/${lexname}.unvalid_oov
397 400 else
398 401 #
399 402  
... ... @@ -408,12 +411,12 @@
408 411 echo "$phonLine" | sed "s|\t|\t$candidate\t|" >> $EXT_LEX/final/${lexname}_ext.map
409 412 done < $EXT_LEX/tmp/$oov.phon
410 413 else
411   - echo "UNVALID OOV: $oov => no availaible Candidate word in LM"
  414 + echo "[${BASENAME}] UNVALID OOV: $oov => no availaible Candidate word in LM"
412 415 echo "$oov" >> $EXT_LEX/final/${lexname}.unvalid_oov
413 416 fi
414 417 fi
415 418 else
416   - echo "UNVALID OOV: $oov"
  419 + echo "[${BASENAME}] UNVALID OOV: $oov"
417 420 echo "$oov" >> $EXT_LEX/final/${lexname}.unvalid_oov
418 421 fi
419 422 done < $EXT_LEX/final/all.oov_acousticlyfound
... ... @@ -426,7 +429,7 @@
426 429 #
427 430 # Build the final trigger file
428 431 #
429   -print_info "Clean trigg files" 2
  432 +print_info "[${BASENAME}] Clean trigg files" 2
430 433 mkdir -p $TRIGGER_CONFZONE/speeral/ 2> /dev/null
431 434 mkdir -p $EXT_LEX/speeral/ 2> /dev/null
432 435 for i in `ls $TRIGGER_CONFZONE/*.trigg`
433 436  
... ... @@ -437,15 +440,15 @@
437 440 #
438 441 # Compile the speeral extended lexicon
439 442 #
440   -print_info "Compile Speeral extended lexicon" 2
441   -$SPEERAL_PATH/bin/buildmappedbinode $LEXICON.bdlex_phon $EXT_LEX/final/${lexname}_ext.map $AM_SKL $EXT_LEX/speeral/${lexname}_ext $REDIRECTION_OUTPUT
  443 +print_info "[${BASENAME}] Compile Speeral extended lexicon" 2
  444 +$SPEERAL_PATH/bin/buildmappedbinode $LEXICON.bdlex_phon $EXT_LEX/final/${lexname}_ext.map $AM_SKL $EXT_LEX/speeral/${lexname}_ext
442 445  
443 446 if [ $CHECK -eq 1 ]
444 447 then
445 448 check_exploitconfpass_lex_check "${EXT_LEX}/speeral/${lexname}_ext"
446 449 if [ $? -eq 1 ]
447 450 then
448   - echo -e "ERROR : Building Speeral Lexicon $INPUT_DIR " >> $ERRORFILE
  451 + echo -e "[${BASENAME}] ERROR : Building Speeral Lexicon $INPUT_DIR " >> $ERRORFILE
449 452 exit 1;
450 453 fi
451 454 fi
... ... @@ -455,8 +458,8 @@
455 458 # CLOSE #
456 459 #-------#
457 460 # Seem OK
458   -print_info "<= End $BASENAME Solr | $(date +'%d/%m/%y %H:%M:%S')" 1
459   -echo -e "#Solr $BASENAME " >> $LOGFILE
  461 +print_info "[${BASENAME}] <= End $BASENAME Solr | $(date +'%d/%m/%y %H:%M:%S')" 1
  462 +echo -e "[${BASENAME}] #Solr $BASENAME " >> $LOGFILE
460 463  
461 464 # unlock directory
462 465 mv "$OUTPUT_DIR/EXPLOITCONFPASS.lock" "$OUTPUT_DIR/EXPLOITCONFPASS.unlock"
main_tools/FirstPass.sh
... ... @@ -88,9 +88,6 @@
88 88 then
89 89 set -x
90 90 echo -e "## Mode DEBUG ON ##"
91   - REDIRECTION_OUTPUT=""
92   -else
93   - REDIRECTION_OUTPUT=" 2> /dev/null"
94 91 fi
95 92  
96 93 # mode verbose enable
... ... @@ -201,7 +198,7 @@
201 198 then
202 199 print_message $WARNING 2 "[${BASENAME}] $WAV_FILE is not a wav file at 16000 Hz, 1 channel, 16bits\nhave to convert"
203 200 print_message $INFO 3 "[${BASENAME}] avconv -i $WAV_FILE -threads 4 -vn -f wav -ac 1 -ar 16000 -ab 256000 $OUTPUT_DIR_BASENAME/$BASENAME.wav"
204   - avconv -i $WAV_FILE -threads 4 -vn -f wav -ac 1 -ar 16000 -ab 256000 $OUTPUT_DIR_BASENAME/$BASENAME.wav $REDIRECTION_OUTPUT
  201 + avconv -i $WAV_FILE -threads 4 -vn -f wav -ac 1 -ar 16000 -ab 256000 $OUTPUT_DIR_BASENAME/$BASENAME.wav
205 202 WAV_FILE=$OUTPUT_DIR_BASENAME/$BASENAME.wav
206 203 FILENAME=$BASENAME.wav
207 204 print_message $INFO 1 "[${BASENAME}] new wav file : $WAV_FILE"
... ... @@ -223,7 +220,7 @@
223 220 echo $FILENAME > $OUTPUT_DIR_BASENAME/list.tmp
224 221 print_info "[${BASENAME}] $BIN_PATH/lia_plp_mt.32 --lst $OUTPUT_DIR_BASENAME/list.tmp --input_dir $(dirname $WAV_FILE) --output_dir $OUTPUT_DIR_BASENAME --input_type WAV --output_type HTK --nb_coef 12 --cms" 3
225 222  
226   -$BIN_PATH/lia_plp_mt$ARCH --lst $OUTPUT_DIR_BASENAME/list.tmp --input_dir $(dirname $WAV_FILE) --output_dir $OUTPUT_DIR_BASENAME --input_type WAV --output_type HTK --nb_coef 12 --cms $REDIRECTION_OUTPUT
  223 +$BIN_PATH/lia_plp_mt$ARCH --lst $OUTPUT_DIR_BASENAME/list.tmp --input_dir $(dirname $WAV_FILE) --output_dir $OUTPUT_DIR_BASENAME --input_type WAV --output_type HTK --nb_coef 12 --cms
227 224  
228 225 if [ $CHECK -eq 1 ]
229 226 then
... ... @@ -245,7 +242,7 @@
245 242 # Calcul seg file
246 243 print_info "[${BASENAME}] java -Xmx4096m -jar $BIN_PATH/LIUM_SpkDiarization-4.2.jar --fInputMask=${WAV_FILE} --sOutputMask=${SEG_FILE} $BASENAME" 3
247 244 #java -Xmx8000m -Xms2048 -jar $BIN_PATH/LIUM_SpkDiarization-4.2.jar --fInputMask=${WAV_FILE} --sOutputMask=${SEG_FILE} $BASENAME
248   -java -Xmx4096m -jar $BIN_PATH/LIUM_SpkDiarization-4.2.jar --fInputMask=${WAV_FILE} --sOutputMask=${SEG_FILE} $BASENAME $REDIRECTION_OUTPUT #–doCEClustering
  245 +java -Xmx4096m -jar $BIN_PATH/LIUM_SpkDiarization-4.2.jar --fInputMask=${WAV_FILE} --sOutputMask=${SEG_FILE} $BASENAME #–doCEClustering
249 246  
250 247 if [ $CHECK -eq 1 ] && ( [ ! -e $SEG_FILE ] || [ -z $SEG_FILE ] )
251 248 then
... ... @@ -274,7 +271,7 @@
274 271 print_info "[${BASENAME}] Cut PLP file depending to LBL segmentations" 1
275 272 print_info "[${BASENAME}] $BIN_PATH/gcep $PLP_FILE $LBL_FILE 500 $PLP_DIR -FSEG" 3
276 273  
277   -$SPEERAL_TOOLS/gcep $PLP_FILE $LBL_FILE 500 $PLP_DIR -FSEG $REDIRECTION_OUTPUT
  274 +$SPEERAL_TOOLS/gcep $PLP_FILE $LBL_FILE 500 $PLP_DIR -FSEG
278 275  
279 276 if [ $CHECK -eq 1 ]
280 277 then
281 278  
... ... @@ -326,9 +323,9 @@
326 323 todo=$OUTPUT_DIR_BASENAME/plp_${MODS[$i]}.lst
327 324 while [ $redo -gt 0 ]; do
328 325 rm $RES_DIR/*.lock > /dev/null 2>&1
329   - print_info "[${BASENAME}] $SPEERAL_BIN $todo $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR -m $SPEERAL_AM/${MODS[$i]}.hmm -c $SPEERAL_AM/${MODS[$i]}.cls $FORKS --lock $REDIRECTION_OUTPUT" 3
  326 + print_info "[${BASENAME}] $SPEERAL_BIN $todo $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR -m $SPEERAL_AM/${MODS[$i]}.hmm -c $SPEERAL_AM/${MODS[$i]}.cls $FORKS --lock" 3
330 327 # Run speeral
331   - $SPEERAL_BIN ${todo} $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR -m $SPEERAL_AM/${MODS[$i]}.hmm -c $SPEERAL_AM/${MODS[$i]}.cls $FORKS --lock $REDIRECTION_OUTPUT
  328 + $SPEERAL_BIN ${todo} $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR -m $SPEERAL_AM/${MODS[$i]}.hmm -c $SPEERAL_AM/${MODS[$i]}.cls $FORKS --lock
332 329  
333 330 # Check if error
334 331 if [ $CHECK -eq 1 ]
335 332  
336 333  
... ... @@ -386,15 +383,15 @@
386 383 #---------------#
387 384 print_info "[${BASENAME}] Convert .res into .ctm" 1
388 385 # .res => .ctm
389   -$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format CTM --ignore $RULES/asupp --out $OUTPUT_DIR_BASENAME/$BASENAME.1pass.ctm $REDIRECTION_OUTPUT
  386 +$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format CTM --ignore $RULES/asupp --out $OUTPUT_DIR_BASENAME/$BASENAME.1pass.ctm
390 387 print_info "[${BASENAME}] Convert .res into .trs" 1
391 388 # .res => .trs
392 389 echo -e "name $AUTHOR\nfileName $BASENAME\nfileExt wav\nsegFile $OUTPUT_DIR_BASENAME/$BASENAME.seg" > $OUTPUT_DIR_BASENAME/$BASENAME.trs_cfg
393   -$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TRS --ignore $RULES/asupp --out $OUTPUT_DIR_BASENAME/$BASENAME.1pass.trs --trs_config $OUTPUT_DIR_BASENAME/$BASENAME.trs_cfg $REDIRECTION_OUTPUT
  390 +$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TRS --ignore $RULES/asupp --out $OUTPUT_DIR_BASENAME/$BASENAME.1pass.trs --trs_config $OUTPUT_DIR_BASENAME/$BASENAME.trs_cfg
394 391 rm $OUTPUT_DIR_BASENAME/$BASENAME.trs_cfg 2> /dev/null
395 392 print_info "[${BASENAME}] Convert .res into .txt" 1
396 393 # .res => .txt
397   -$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TXT --ignore $RULES/asupp --out $OUTPUT_DIR_BASENAME/$BASENAME.1pass.txt $REDIRECTION_OUTPUT
  394 +$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TXT --ignore $RULES/asupp --out $OUTPUT_DIR_BASENAME/$BASENAME.1pass.txt
398 395  
399 396 print_info "[${BASENAME}] <= P1 End | $(date +'%d/%m/%y %H:%M:%S')" 1
400 397 # unlock directory
main_tools/SecondPass.sh
... ... @@ -88,9 +88,6 @@
88 88 then
89 89 set -x
90 90 echo -e "## Mode DEBUG ON ##"
91   - REDIRECTION_OUTPUT=""
92   - else
93   - REDIRECTION_OUTPUT=" 2> /dev/null"
94 91 fi
95 92  
96 93 # mode verbose enable
... ... @@ -235,7 +232,7 @@
235 232 if [ $RERUN -eq 0 ] || ( [ ! -e $HMM/$speaker.hmm ] || [ -z $HMM/$speaker.hmm ] )
236 233 then
237 234 print_info "[${BASENAME}] $SPEERAL_TOOLS/mllrmap $SPEERAL_AM/${MODS[$i]}.hmm -LR -b$LST/$speaker.lst -d$PLP_DIR_P1/ -t.plp -i3 -c.seg -o$HMM/$speaker.hmm -a$RES_DIR_P1/" 3
238   - $SPEERAL_TOOLS/mllrmap $SPEERAL_AM/${MODS[$i]}.hmm -LR -b$LST/$speaker.lst -d$PLP_DIR_P1/ -t.plp -i3 -c.seg -o$HMM/$speaker.hmm -a$RES_DIR_P1/ $REDIRECTION_OUTPUT
  235 + $SPEERAL_TOOLS/mllrmap $SPEERAL_AM/${MODS[$i]}.hmm -LR -b$LST/$speaker.lst -d$PLP_DIR_P1/ -t.plp -i3 -c.seg -o$HMM/$speaker.hmm -a$RES_DIR_P1/
239 236 fi
240 237  
241 238 if [ $CHECK -eq 1 ] && ( [ ! -e $HMM/$speaker.hmm ] || [ -z $HMM/$speaker.hmm ] )
... ... @@ -253,7 +250,7 @@
253 250 if [ -s $HMM/$speaker.hmm ] && ( [ $RERUN -eq 0 ] || ( [ ! -e $HMM/$speaker.cls ] || [ -z $HMM/$speaker.cls ] ))
254 251 then
255 252 print_info "[${BASENAME}] $SPEERAL_TOOLS/gclust_pdf $HMM/$speaker.hmm $HMM/$speaker.cls -i $SPEERAL_AM/${MODS[$i]}.cls" 3
256   - $SPEERAL_TOOLS/gclust_pdf $HMM/$speaker.hmm $HMM/$speaker.cls -i $SPEERAL_AM/${MODS[$i]}.cls $REDIRECTION_OUTPUT
  253 + $SPEERAL_TOOLS/gclust_pdf $HMM/$speaker.hmm $HMM/$speaker.cls -i $SPEERAL_AM/${MODS[$i]}.cls
257 254 fi
258 255 if [ $CHECK -eq 1 ] && ( [ ! -e $HMM/$speaker.cls ] || [ -z $HMM/$speaker.cls ] )
259 256 then
260 257  
... ... @@ -266,12 +263,12 @@
266 263 ## Speeral decoding
267 264 if [ -s $HMM/$speaker.hmm ] && [ -s $HMM/$speaker.cls ]
268 265 then
269   - print_info "[${BASENAME}] $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR_P1 -m $HMM/$speaker.hmm -c $HMM/$speaker.cls $FORKS --lock $REDIRECTION_OUTPUT" 3
270   - $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR_P1 -m $HMM/$speaker.hmm -c $HMM/$speaker.cls $FORKS --lock $REDIRECTION_OUTPUT
  266 + print_info "[${BASENAME}] $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR_P1 -m $HMM/$speaker.hmm -c $HMM/$speaker.cls $FORKS --lock" 3
  267 + $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR_P1 -m $HMM/$speaker.hmm -c $HMM/$speaker.cls $FORKS --lock
271 268 else
272 269 print_warn "[${BASENAME}] $HMM/$speaker.hmm and $speaker.cls empty, do default decoding..." 2
273   - print_info "[${BASENAME}] $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR_P1 -m $SPEERAL_AM/${MODS[$i]}.hmm -c $SPEERAL_AM/${MODS[$i]}.cls $FORKS --lock $REDIRECTION_OUTPUT" 3
274   - $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR_P1 -m $SPEERAL_AM/${MODS[$i]}.hmm -c $SPEERAL_AM/${MODS[$i]}.cls $FORKS --lock $REDIRECTION_OUTPUT
  270 + print_info "[${BASENAME}] $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR_P1 -m $SPEERAL_AM/${MODS[$i]}.hmm -c $SPEERAL_AM/${MODS[$i]}.cls $FORKS --lock" 3
  271 + $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_CFG[$i]} -r $PLP_DIR_P1 -m $SPEERAL_AM/${MODS[$i]}.hmm -c $SPEERAL_AM/${MODS[$i]}.cls $FORKS --lock
275 272 fi
276 273  
277 274 if [ $CHECK -eq 1 ]
278 275  
279 276  
... ... @@ -323,15 +320,15 @@
323 320  
324 321 print_info "[${BASENAME}] Convert .res into .ctm" 1
325 322 # .res => .ctm
326   -$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format CTM --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.2pass.ctm $REDIRECTION_OUTPUT
  323 +$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format CTM --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.2pass.ctm
327 324 print_info "[${BASENAME}] Convert .res into .trs" 1
328 325 # .res => .trs
329 326 echo -e "name $AUTHOR\nfileName ${BASENAME}\nfileExt wav\nsegFile ${OUTPUT_DIR_BASENAME}/${BASENAME}.seg" > ${OUTPUT_DIR_BASENAME}/${BASENAME}.trs_cfg
330   -$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TRS --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.2pass.trs --trs_config ${OUTPUT_DIR_BASENAME}/${BASENAME}.trs_cfg $REDIRECTION_OUTPUT
  327 +$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TRS --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.2pass.trs --trs_config ${OUTPUT_DIR_BASENAME}/${BASENAME}.trs_cfg
331 328 rm ${OUTPUT_DIR_BASENAME}/${BASENAME}.trs_cfg > /dev/null 2>&1
332 329 print_info "[${BASENAME}] Convert .res into .txt" 1
333 330 # .res => .txt
334   -$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TXT --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.2pass.txt $REDIRECTION_OUTPUT
  331 +$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TXT --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.2pass.txt
335 332  
336 333 print_info "[${BASENAME}] <= P2 End | $(date +'%d/%m/%y %H:%M:%S')" 1
337 334 # unlock directory
main_tools/ThirdPass.sh
... ... @@ -85,9 +85,6 @@
85 85 then
86 86 set -x
87 87 echo -e "## Mode DEBUG ON ##"
88   - REDIRECTION_OUTPUT=""
89   - else
90   - REDIRECTION_OUTPUT=" 2> /dev/null"
91 88 fi
92 89  
93 90 # mode verbose enable
94 91  
... ... @@ -196,11 +193,11 @@
196 193 ## Speeral decoding
197 194 if [ -s $HMM/$speaker.hmm ] && [ -s $HMM/$speaker.cls ]
198 195 then
199   - print_info "$SPEERAL_BIN $LST/$speaker.lst $RES_DIR $SPEERAL_THIRD_CFG -r $PLP_DIR_P1 -m $HMM/$speaker.hmm -c $HMM/$speaker.cls $FORKS --lock $REDIRECTION_OUTPUT" 3
200   - $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_THIRD_CFG} -r $PLP_DIR_P1 -m $HMM/$speaker.hmm -c $HMM/$speaker.cls $FORKS --lock $REDIRECTION_OUTPUT
  196 + print_info "$SPEERAL_BIN $LST/$speaker.lst $RES_DIR $SPEERAL_THIRD_CFG -r $PLP_DIR_P1 -m $HMM/$speaker.hmm -c $HMM/$speaker.cls $FORKS --lock" 3
  197 + $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_THIRD_CFG} -r $PLP_DIR_P1 -m $HMM/$speaker.hmm -c $HMM/$speaker.cls $FORKS --lock
201 198 else
202 199 print_warn "$HMM/$speaker.hmm and $speaker.cls empty, do default decoding..." 2
203   - $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_THIRD_CFG} -r $PLP_DIR_P1 -m $SPEERAL_AM/${MODS[$i]}.hmm -c $SPEERAL_AM/${MODS[$i]}.cls $FORKS --lock $REDIRECTION_OUTPUT
  200 + $SPEERAL_BIN $LST/$speaker.lst $RES_DIR ${SPEERAL_THIRD_CFG} -r $PLP_DIR_P1 -m $SPEERAL_AM/${MODS[$i]}.hmm -c $SPEERAL_AM/${MODS[$i]}.cls $FORKS --lock
204 201 fi
205 202  
206 203 if [ $CHECK -eq 1 ]
207 204  
208 205  
... ... @@ -234,13 +231,13 @@
234 231 #---------------#
235 232  
236 233 # .res => .ctm
237   -$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format CTM --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.3pass.ctm $REDIRECTION_OUTPUT
  234 +$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format CTM --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.3pass.ctm
238 235 # .res => .trs
239 236 echo -e "name $AUTHOR\nfileName ${BASENAME}\nfileExt wav\nsegFile ${OUTPUT_DIR_BASENAME}/${BASENAME}.seg" > ${OUTPUT_DIR_BASENAME}/${BASENAME}.trs_cfg
240   -$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TRS --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.3pass.trs --trs_config ${OUTPUT_DIR_BASENAME}/${BASENAME}.trs_cfg $REDIRECTION_OUTPUT
  237 +$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TRS --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.3pass.trs --trs_config ${OUTPUT_DIR_BASENAME}/${BASENAME}.trs_cfg
241 238 rm ${OUTPUT_DIR_BASENAME}/${BASENAME}.trs_cfg > /dev/null 2>&1
242 239 # .res => .txt
243   -$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TXT --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.3pass.txt $REDIRECTION_OUTPUT
  240 +$SCRIPT_PATH/res2out.pl --dir $RES_DIR --format TXT --ignore $RULES/asupp --out ${OUTPUT_DIR_BASENAME}/${BASENAME}.3pass.txt
244 241  
245 242  
246 243 print_info "<= End $BASENAME P3 | $(date +'%d/%m/%y %H:%M:%S')" 1