Speech:LinkTransUtt.pl

=Summary= Title: linkTransUtt.pl Authors: Jon Shallow -- Modeling Group SP16 Updated: Dylan Lindstrom -- Data Group SP17 Location: /mnt/main/scripts/user/

=Description=

This script is used in the creation of new corpora, as seen here. It is a modified version of linkTransAudio.pl.

=Code=
 * 1) !usr/bin/perl
 * 2) Purpose: creates softlinks from a transcript file to the appropriate utterances
 * 3) in the src directory. Links are placed in the directory from which the script is run
 * 4) Unlike linkTransAudio.pl, this script is NOT used in genFeats.pl
 * Use: linkTransUtt.pl 
 * 1) Example: perl /mnt/main/scripts/user/linkTransUtt.pl /mnt/main/corpus/switchboard/5hr/train/trans/train.trans /mnt/main/corpus/switchboard/full/train/audio/utt
 * Use: linkTransUtt.pl 
 * 1) Example: perl /mnt/main/scripts/user/linkTransUtt.pl /mnt/main/corpus/switchboard/5hr/train/trans/train.trans /mnt/main/corpus/switchboard/full/train/audio/utt
 * 1) Example: perl /mnt/main/scripts/user/linkTransUtt.pl /mnt/main/corpus/switchboard/5hr/train/trans/train.trans /mnt/main/corpus/switchboard/full/train/audio/utt

$transcript = "$ARGV[0]"; $src_directory = $ARGV[1];
 * 1) $ext = $ARGV[1];

open FIN, "<", $transcript or die ("Fatal Error: Can not open $transcript!\n"); print "Creating links, this may take a few minutes for large transcripts\n"; while (my $entry = ){ my @line = split ' ', $entry; #create links from transcript file to full corpus utts #syntax: ln -s   $target_file = $src_directory."$line[0].sph"; $cmd = "ln -s -v $target_file $line[0].sph"; #print($cmd."\n"); system($cmd); } print "Complete!\n";