Tryag File Manager
Home
-
Turbo Force
Current Path :
/
home
/
cluster1
/
data
/
bu01
/
1121861
/
html
/
poser
/
Foley programs and data
/
spd24_nahuatl_dat_am
/
Upload File :
New :
File
Dir
//home/cluster1/data/bu01/1121861/html/poser/Foley programs and data/spd24_nahuatl_dat_am/linkAm.perl
#!/usr/bin/perl while (<>) { chomp; $in = $_; @t = split (/\//); @s = split (/\./, $t[$#t]); $wordFile = $s[0]; ($lnk, $id, $code) = split (/\_/, $wordFile); push (@{$tokens{$id}}, $in); } @wordIds = sort keys %tokens; foreach $wordId (@wordIds) { $count = 1; @els = @{$tokens{$wordId}}; if (@els < 2) { ($inFile) = @{$tokens{$wordId}}; system "cp $inFile /home/kpfoley/DAT/am/linked/$wordId.wav"; system "cp /home/kpfoley/DAT/am/linked/$wordId.wav /mnt/unagi/spd25/htdocs/nahuatl/hyperlexdict/sounds/citations/am/wav/$wordId\_am.wav"; } else { $count = 1; foreach $el (@els) { system "sox $el tmp\_$wordId\_$count.raw"; $count += 1; #print "$wordId\t$el\t$count\n"; } for($n=1; $n<$count; $n++) { system "cat tmp\_$wordId\_$n.raw >> tmp\_$wordId\_final.raw"; system "rm tmp\_$wordId\_$n.raw"; } system "/pkg/ldc/pkg/sox11/sox -r 22050 -s -w -t .raw tmp\_$wordId\_final.raw /home/kpfoley/DAT/am/linked/$wordId.wav"; system "cp /home/kpfoley/DAT/am/linked/$wordId.wav /mnt/unagi/spd25/htdocs/nahuatl/hyperlexdict/sounds/citations/am/wav/$wordId\_am.wav"; system "rm tmp\_$wordId\_final.raw"; } }