From c484d537c25296c9c5f0e7b0fd969bd23af50f33 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Thu, 19 Aug 2021 04:01:27 +0000 Subject: [PATCH] add assert --- deepspeech/io/converter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deepspeech/io/converter.py b/deepspeech/io/converter.py index e591a7935..3bfcc1b1e 100644 --- a/deepspeech/io/converter.py +++ b/deepspeech/io/converter.py @@ -49,14 +49,13 @@ class CustomConverter(): # batch should be located in list assert len(batch) == 1 (xs, ys), utts = batch[0] + assert xs[0] is not None, "please check Reader and Augmentation impl." # perform subsampling if self.subsampling_factor > 1: xs = [x[::self.subsampling_factor, :] for x in xs] # get batch of lengths of input sequences - print(xs) - print(ys) ilens = np.array([x.shape[0] for x in xs]) # perform padding and convert to tensor