refactor: 脚本及配置文件命名统一用 _ 分隔
将 .sh/.bat 脚本与 .js/.plist/.Dockerfile 等文件中以 - 分隔的文件名 改为 _ 分隔,dcloud-renew 目录改为 dcloud、script_nuance 目录改为 nuance,并同步更新脚本内部引用与 README 路径。 Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>
This commit is contained in:
25
nuance/tools/gather_transcription_from_listfile.pl
Normal file
25
nuance/tools/gather_transcription_from_listfile.pl
Normal file
@@ -0,0 +1,25 @@
|
||||
print "Usage: perl $0 transcription_file path_prefix output_file\n";
|
||||
print "Example: perl $0 /direct/datadigest/en_sg/ives/000.txt /direct/datadigest/en_sg/ives/calls/ ~/ives.list\n";
|
||||
|
||||
open TRAN, $ARGV[0] or die "Cannot open transcription file $ARGV[0] for read.\n";
|
||||
open CORPUS, ">>$ARGV[2]" or die "Cannot open corpus file $ARGV[1] for write.\n";
|
||||
|
||||
if ($ARGV[1] =~ m|/$|) # the parameter "path_prefix" is ended with /
|
||||
{
|
||||
$prefix = $ARGV[1];
|
||||
}else
|
||||
{
|
||||
$prefix = "$ARGV[1]/";
|
||||
}
|
||||
|
||||
while (<TRAN>)
|
||||
{
|
||||
chomp;
|
||||
m|([^ ]+)\s+(.*)|;
|
||||
if ($1 =~ m|\.info$|)
|
||||
{
|
||||
print CORPUS "new_speaker\n";
|
||||
next;
|
||||
}
|
||||
print CORPUS "$prefix$1.ulaw\t$2\n";
|
||||
}
|
||||
Reference in New Issue
Block a user