I checked the condition in the code:
source = audiofile_to_input_vector(wav_file, self._model_feeder.numcep, self._model_feeder.numcontext)
source_len = len(source)
target = text_to_char_array(transcript, self._alphabet)
target_len = len(target)
if source_len < target_len:
raise ValueError('Error: Audio file {} is too short for transcription.'.format(wav_file))
This tells me that, whenever duration of audio is less than duration of transcript text spoken, it will raise the error.
I tried to put this condition on my audio files to filter out such audio files but i am not able to recreate text_to_char_array as its coming from another code. What are your suggestions at this point?