sysconfig/script_nuance/tools/split_utd_by_500.pl
2021-06-07 10:03:42 +08:00

26 lines
308 B
Perl

open UTD, "$ARGV[0]" or die;
$nr_utt = 0;
$nr_block = 0;
$head = "";
while (<UTD>)
{
if (not m|/datadigest/|)
{
$head = $head."$_";
}else
{
if ($nr_utt % 500 == 0)
{
$nr_block ++;
open FH, ">$ARGV[0].$nr_block" or die;
print FH $head;
}
print FH;
$nr_utt ++;
}
}