voxforge.org
VoxForge Dev

Changeset 2627

Show
Ignore:
Timestamp:
07/11/08 16:19:09 (2 months ago)
Author:
kmaclean
Message:

Fix to speech submission summary loop - don't try to get "tokens with issues" if there are none

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Trunk/Scripts/Audio_scripts/UserSubmission.pm

    r2623 r2627  
    171171                print "$audio_dir_name moved to 'ToBeProcessed' directory ($samplingrate:$samplingrateformat:$filetype)\n"; 
    172172                # !!!!!! 
    173                 foreach my $line (@{$audio->getTokensWithIssues()}) { 
    174                         my $audioSubmission = $$line[0]; 
    175                         my $mfcFile = $$line[1]; 
    176                         my $beamWidth = $$line[2]; 
    177                         if ($audio_dir_name eq $audioSubmission) { 
    178                                 if ($beamWidth <= 250) { 
    179                                         print "  *check that audio corresponds to prompt in file: $mfcFile; beam width:$beamWidth\n"; 
     173                if ($audio->getTokensWithIssues()) { 
     174                # !!!!!!                         
     175                        foreach my $line (@{$audio->getTokensWithIssues()}) { 
     176                                my $audioSubmission = $$line[0]; 
     177                                my $mfcFile = $$line[1]; 
     178                                my $beamWidth = $$line[2]; 
     179                                if ($audio_dir_name eq $audioSubmission) { 
     180                                        if ($beamWidth <= 250) { 
     181                                                print "  *check that audio corresponds to prompt in file: $mfcFile; beam width:$beamWidth\n"; 
     182                                        } else { 
     183                                                print "                                                                           $beamWidth\n";                                         
     184                                        } 
    180185                                } else { 
    181                                         print "                                                                           $beamWidth\n";                                        
     186                                        confess "error:$audio_dir_name not equal $audioSubmission\n"; 
    182187                                } 
    183                         } else { 
    184                                 confess "error:$audio_dir_name not equal $audioSubmission\n"; 
    185                         } 
    186                 }        
    187                 # !!!!!! 
     188                        }        
     189                } 
    188190        } 
    189191        return \%userSubmission;