Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
#! /usr/local/bin/perl $top_directory = '/home/toyoda/WWW/newscaster/newscaster'; $audio_directory = "$top_directory/audio"; open(SENTENCE_CONF, "$top_directory/sentence.conf") || die "Can't open sentence.conf\n"; $syll_kinds = ; chop $syll_kinds; while($conf = ) { chop $conf; push(@sentence_conf, $conf); } foreach $syll (split(/ /, $syll_kinds)) { open(FIND, "find $audio_directory -name $syll-* -print |") || die "Couldn't run find: $!\n"; local(@tmp_list); while($filename = ) { chop $filename; push(@tmp_list, $filename); } $syllables{$syll} = join(" ", @tmp_list, ""); } srand; for ($newsnum = 1; $newsnum <= 3; $newsnum++) { local(@sentence, @sylls, $conf_idx); push(@sentence, 'audioconvert', '-o', "$top_directory/../news$newsnum.au"); $conf_idx = rand @sentence_conf; foreach $syll (split(/ /, $sentence_conf[$conf_idx])) { @sylls = split(/ /, $syllables{$syll}); push(@sentence, splice(@sylls, rand @sylls, 1)); $syllables{$syll} = join(" ", @sylls, ""); } splice(@sentence_conf, $conf_idx, 1); # print join(",", @sentence_conf, "\n"); # print join(" ", @sentence, "\n"); system(@sentence); } print <<"END"; Content-type: text/html Insane News Caster

NHK(なんか,変で,狂ってる)ニュース放送

[go: Go Back, main page]


トップニュース

次のニュース

終りのニュース


END