timitphonemerec.py
def load_split(data_dir=DEFAULT_DATA_DIR, val=True, mfcc=True, normalize=True):
  """ Load a standardized-TIMIT train, test split.

  Args:
    data_dir: A string. The data directory.
    val: A boolean. If True, return the validation set as the test set.
    mfcc: A boolean. If True, return MFCC sequences and their corresponding
      label Otherwise, return raw audio sequences in their associated
      label sequences.
    normalize: A boolean. If True, normalize each sequence individually by
      centering / scaling.

  Returns:
    A tuple, `(train_inputs, train_labels, test_inputs, test_labels)`. Each is
    a list of sequences. All inputs are 2-D float arrays with shape
    `[length, values_per_step]` and all labels are 1-D int8 arrays with shape
    `[length]`.
  """
  sequence_lists = load(data_dir=data_dir, mfcc=mfcc)
  train_inputs, train_labels, val_inputs, val_labels, test_inputs, test_labels = sequence_lists
  if val:
    test_inputs = val_inputs
    test_labels = val_labels
  if normalize:
    train_inputs = [seq - np.mean(seq, axis=0, keepdims=True) for seq in train_inputs]
    train_inputs = [seq / np.std(seq, axis=0, keepdims=True) for seq in train_inputs]
    test_inputs = [seq - np.mean(seq, axis=0, keepdims=True) for seq in test_inputs]
    test_inputs = [seq / np.std(seq, axis=0, keepdims=True) for seq in test_inputs]
  return train_inputs, train_labels, test_inputs, test_labels
 Load a standardized-TIMIT train, test split.

  Args:
    data_dir: A string. The data directory.
    val: A boolean. If True, return the validation set as the test set.
    mfcc: A boolean. If True, return MFCC sequences and their corresponding
      label Otherwise, return raw audio sequences in their associated
      label sequences.
    normalize: A boolean. If True, normalize each sequence individually by
      centering / scaling.

  Returns:
    A tuple, `(train_inputs, train_labels, test_inputs, test_labels)`. Each is
    a list of sequences. All inputs are 2-D float arrays with shape
    `[length, values_per_step]` and all labels are 1-D int8 arrays with shape
    `[length]`.
  
Load a standardized-TIMIT train, test split.
Load a standardized - TIMIT train test split .
def load_split(data_dir=DEFAULT_DATA_DIR, val=True, mfcc=True, normalize=True):
  sequence_lists = load(data_dir=data_dir, mfcc=mfcc)
  train_inputs, train_labels, val_inputs, val_labels, test_inputs, test_labels = sequence_lists
  if val:
    test_inputs = val_inputs
    test_labels = val_labels
  if normalize:
    train_inputs = [seq - np.mean(seq, axis=0, keepdims=True) for seq in train_inputs]
    train_inputs = [seq / np.std(seq, axis=0, keepdims=True) for seq in train_inputs]
    test_inputs = [seq - np.mean(seq, axis=0, keepdims=True) for seq in test_inputs]
    test_inputs = [seq / np.std(seq, axis=0, keepdims=True) for seq in test_inputs]
  return train_inputs, train_labels, test_inputs, test_labels
def load_split ( data_dir = DEFAULT_DATA_DIR , val = True , mfcc = True , normalize = True ) : sequence_lists = load ( data_dir = data_dir , mfcc = mfcc ) train_inputs , train_labels , val_inputs , val_labels , test_inputs , test_labels = sequence_lists if val : test_inputs = val_inputs test_labels = val_labels if normalize : train_inputs = [ seq - np . mean ( seq , axis = 0 , keepdims = True ) for seq in train_inputs ] train_inputs = [ seq / np . std ( seq , axis = 0 , keepdims = True ) for seq in train_inputs ] test_inputs = [ seq - np . mean ( seq , axis = 0 , keepdims = True ) for seq in test_inputs ] test_inputs = [ seq / np . std ( seq , axis = 0 , keepdims = True ) for seq in test_inputs ] return train_inputs , train_labels , test_inputs , test_labels
Load a standardized-TIMIT train, test split.
Load a standardized - TIMIT train test split .
""" Load a standardized-TIMIT train, test split.

  Args:
    data_dir: A string. The data directory.
    val: A boolean. If True, return the validation set as the test set.
    mfcc: A boolean. If True, return MFCC sequences and their corresponding
      label Otherwise, return raw audio sequences in their associated
      label sequences.
    normalize: A boolean. If True, normalize each sequence individually by
      centering / scaling.

  Returns:
    A tuple, `(train_inputs, train_labels, test_inputs, test_labels)`. Each is
    a list of sequences. All inputs are 2-D float arrays with shape
    `[length, values_per_step]` and all labels are 1-D int8 arrays with shape
    `[length]`.
  """
A tuple, `(train_inputs, train_labels, test_inputs, test_labels)`. Each is
a list of sequences. All inputs are 2-D float arrays with shape
`[length, values_per_step]` and all labels are 1-D int8 arrays with shape
`[length]`.
A tuple ` ( train_inputs train_labels test_inputs test_labels ) ` . Each is a list of sequences . All inputs are 2 - D float arrays with shape ` [ length values_per_step ] ` and all labels are 1 - D int8 arrays with shape ` [ length ] ` .
data_dir
A string. The data directory.
A string . The data directory .
val
A boolean. If True, return the validation set as the test set.
A boolean . If True return the validation set as the test set .
mfcc
A boolean. If True, return MFCC sequences and their corresponding
label Otherwise, return raw audio sequences in their associated
label sequences.
A boolean . If True return MFCC sequences and their corresponding label Otherwise return raw audio sequences in their associated label sequences .
normalize
A boolean. If True, normalize each sequence individually by
centering / scaling.
A boolean . If True normalize each sequence individually by centering / scaling .