Ticket #511 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

mean sample calculation when file duration less than 2 seconds

Reported by: kmaclean Owned by: kmaclean
Priority: minor Milestone:
Component: Acoustic Model Version: 0.1-alpha
Keywords: Cc:

Description

One of the scripts in the acoustic model creation process (WavTools?.pm) reads the first two seconds of a speech audio file to calculate the sample mean.

However, undefined sample errors can occur when the audio file is less than 2 seconds long.

Change History

comment:1 Changed 5 years ago by kmaclean

  • Status changed from new to closed
  • Resolution set to fixed

Fix starting line 133 in WavTools?.pm:

      # !!!!!!
      my $numberSecondsToRead = min($self->lengthSeconds, 2); # lesser of: 2 seconds or duration of entire audio file

			#for (my $x = 0; $x < $sr * 2; $x++) { # read first two seconds of audio to calculate mean
			for (my $x = 0; $x < $sr * $numberSecondsToRead; $x++) { # read first two seconds (or entire audio file if less than 2 secs) of audio to calculate mean
      # !!!!!!

comment:2 Changed 5 years ago by kmaclean

  • Summary changed from Speech Submission validation script to mean sample calculation when file duration less than 2 seconds
Note: See TracTickets for help on using tickets.