Blame view
spkDiarization/scripts/gen_X_Mat.pl
784 Bytes
3f2992b2c
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
#!/usr/bin/perl # Perl program to gather i-vectors written # out in .y files into a single X matrix # # Author: Xavier Bost # email: xavier.bost@univ-avignon.fr # # Synopsis: # # Source file: spkDiarization/data/data.lst # # Retained informations are written in: # spkDiarization/iv/X.dat # use strict; my $line; # current source file line my $file_in; # file containing i-vector my $i_vec; # i-vector open(IN1, "spkDiarization/data/data.lst"); open(OUT, "> spkDiarization/iv/X.dat"); # parsing input file while ($line = <IN1>) { chomp($line); $file_in = "spkDiarization/iv/raw/$line.y"; open(IN2, $file_in); $i_vec = <IN2>; $i_vec = <IN2>; print OUT "$i_vec"; close(IN2); } close(OUT); close(IN1); |