Blame view
tools/lia_ltbox/lia_phon/script/lia_genere_phrase_mbrola
1.14 KB
e6be5137b reinitialized pro... |
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 50 51 52 |
#!/bin/csh # Genere un fichier '.ola' par phrases a partir # d'un fichier texte quelconque # if ( $#argv == 0 ) then echo 'Syntaxe : lia_genere_phrase_mbrola <fichier texte> [-reacc]' exit endif if ( "$1" == "-reacc" ) then if ( $#argv == 1 ) then echo 'Syntaxe : lia_genere_phrase_mbrola <fichier texte> [-reacc]' exit endif set FILE_TXT = $2 set OPT_REACC = $1 else set FILE_TXT = $1 if ( $#argv > 1 ) then if ( "$2" == "-reacc" ) then set OPT_REACC = $2 else echo 'Error: '$2' is an unknown option ....' echo 'The only option accepted here is: -reacc' exit endif else set OPT_REACC = "" endif endif if ( ! -e $FILE_TXT ) then echo 'Error: the file '$FILE_TXT' does not exist ....' exit endif echo 'file='$FILE_TXT $LIA_PHON_REP/script/lia_nett < $FILE_TXT | $LIA_PHON_REP/script/lia_taggreac $OPT_REACC >! $FILE_TXT.ecg $LIA_PHON_REP/bin/lia_split_sentence $FILE_TXT.ecg $FILE_TXT set n = 1 echo ' processing:' while ( -e $FILE_TXT.$n ) echo ' - sentence #'$n $LIA_PHON_REP/script/lia_phon < $FILE_TXT.$n | $LIA_PHON_REP/bin/lia_add_proso >! $FILE_TXT.$n.ola rm $FILE_TXT.$n @ n += 1 end echo 'done' rm $FILE_TXT.ecg |